SSOC18 / ssoc18-wiki

Shadi's Summer of Code 2018
0 stars 1 forks source link

[mickmek] analysing btcusd spread vs orderbook (16h) #1

Closed shadiakiki1986 closed 6 years ago

shadiakiki1986 commented 6 years ago

Hi @MickMek Here's the github issue that we will keep updating to track our progress.

Comment set 1 on the current notebooks

Comment set 2

MickMek commented 6 years ago

Hi @shadiakiki1986 Updates on project progress:

No available historical dataset on BTCUSD orderbooks online, setted up a script that takes snapshots of the orderbook every minute, and stores the information in a folder as an csv file. It sets up its own database of historical order books, and the rest of the code calculates spread/volatility based on this historical data.

For the alert system, the historical dataset of BTCUSD prices (OHLC) were downloaded, with current (live) cryptocurrencies price. The code runs analysis on cryptocurrencies prices, cryptocurrencies correlations, and correlations to gold and SP500 (to take into account some kind of overall financial market trend). Next step is to figure out how to define a crash in the market, as in the conditions to activate the alert.

All of the codes are now in my folder on the server. Some of them do not compile completely due to several issues faced:

shadiakiki1986 commented 6 years ago

Ok. Let's meet tomorrow and change the recording to be into a database instead of files on disk. Also, I install packages on the server globally with sudo. I'll install your requested package and let you know. About file paths, I noticed that the path you used was a full path. Just use a relative path to the notebook. Anyway, you won't need it if we change to using a database

And I don't think crashes in BTCUSD are correlated with s&P. We don't care anyway. We just measure a price change > 5% from the opening

On Sun, Jun 24, 2018, 20:33 MickMek notifications@github.com wrote:

Hi @shadiakiki1986 https://github.com/shadiakiki1986 Updates on project progress:

No available historical dataset on BTCUSD orderbooks online, setted up a script that takes snapshots of the orderbook every minute, and stores the information in a folder as an csv file. It sets up its own database of historical order books, and the rest of the code calculates spread/volatility based on this historical data.

For the alert system, the historical dataset of BTCUSD prices (OHLC) were downloaded, with current (live) cryptocurrencies price. The code runs analysis on cryptocurrencies prices, cryptocurrencies correlations, and correlations to gold and SP500 (to take into account some kind of overall financial market trend). Next step is to figure out how to define a crash in the market, as in the conditions to activate the alert.

All of the codes are now in my folder on the server. Some of them do not compile completely due to several issues faced:

  • Unable to install krakenex (Python package) to run complete code on the server

  • Unable to find file path on server, in order to direct the code where to download and extract data

  • Errors in the results for gold and s&p500 analysis (must revise)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/teamshadi/ssoc18/issues/1#issuecomment-399773314, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAOhLohhQa78sOQYWqPXJ6mEyFyt_Sxks5t_82BgaJpZM4UzeQn .

MickMek commented 6 years ago

Update:

Best_min/max_bid and spread are now stored in postgresql table called btcprice, code in server (0.2-mick) also, spread and volatility database analysis was completed in the second part of the code. I'm having some issues with the crontab, I have tried to run the python script with the command python ./0.2-mick-pd_postgre....py, but it need python3 package installed. Any other way I can run the script?

shadiakiki1986 commented 6 years ago

In your command, use "python3 filename.py" instead of "python filename.py"

On Tue, Jun 26, 2018, 10:40 MickMek notifications@github.com wrote:

Update:

Best_min/max_bid and spread are now stored in postgresql table called btcprice, code in server (0.2-mick) also, spread and volatility database analysis was completed in the second part of the code. I'm having some issues with the crontab, I have tried to run the python script with the command python ./0.2-mick-pd_postgre....py, but it need python3 package installed. Any other way I can run the script?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/teamshadi/ssoc18/issues/1#issuecomment-400211583, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAOhGYolAFBle_x3eY_IhuWO5TFnFB5ks5uAeWHgaJpZM4UzeQn .

MickMek commented 6 years ago

I've done that, it still asks for a module named '_tkinter' from the python3-tk package

shadiakiki1986 commented 6 years ago

I just looked at your script. You need to erase everything after data.to_sql('btcprice', con=engine, if_exists='append') in 0.2-mick-pd_postgresql.py. The purpose of the scheduled job is just to record the data. No point in "plotting" after that

shadiakiki1986 commented 6 years ago

Also, remove your "from matplotlib ..." import line

MickMek commented 6 years ago

Update: The tasks are now completed, with all codes and scripts on the server.

Issues:

shadiakiki1986 commented 6 years ago

@MickMek I added a few points to the steps so we wrap up this project. Let's get them done to close this and move on to quickfix or deepcognition.ai

MickMek commented 6 years ago

Update: email test completed successfully (for 0.1% decrease), as well as code organization and updated crontab jobs. A readme file was also added to the folder.

Edit: noticed error in code, it was alerting for price hikes over 5%, change it to alert for price crashes over 5%

shadiakiki1986 commented 6 years ago

@MickMek as discussed, please

MickMek commented 6 years ago

UPDATE: @shadiakiki1986 the password have been removed from the notebooks, script notifications modified, and the files are ready to be committed into the repository.

shadiakiki1986 commented 6 years ago

OK just committed the code. Thanks for your effort on this project