This repo include code and some data wrappers for my master's degree program. Most analysis was done in R but Python was also used for data gatharing and processing.
It also contains scripts for loading cryptocurrency data from Poloniex (Poloniex_data.py) and quandl (quandl_data.py) , that might be helpful for you.
- You first have to download and save data from poloniex stock exchange and then from quandl using python
python main.py
- Then conduct main analysis using
Rscript main.R
In this paper I study the effect of speculative processes of three cryptocurrency markets :USD/BTC, USD/XRP,USD/ETH on volatility on this markets. Key findings are as follows: 1) The price of theese three exchange rates are predominantly formulated bybased on speculative trade, 2) The speculative processes on USD/BTC market cause volatility (instability) on other two markets , but reverse casuality was not revieled 3) USD/XRP is the mostly speculative pair among these three pairs. Ethereuam is the less speculative ,perhaps due to the fact,that it has much higher fundamental value.
Main approach:
- Estimate volatility of each pair and choose hyperparameters for models based on grid search.
- Clear it from noise
- Define the speculative regressors for each pair as the product of trade volume multiplied by difference in prices
- Treat fitted values as the measure of speculative process
- Fit regression and classification model to predict volatility and top 10% of volatility based on regressors, that represent speculative trade( speculative regressors)
Some concepts steps are derived from paper "Blau B. Price dynamics and speculative trading in Bitcoin // Research in International Business and Finance, Vol. 43, January 2018. pp. 15-21.",but instead I use multivariate analysis for estimation of speculative processes.
Fitted (cleaned from noise) volatilies, that are further used for inference.
As it can be seen coefficients behind XRP are all significant, which indicates, that it's volatility have very high correlation with speculative processes on other two pairs, but reverse is not true.
Prediction of the probability of volatility bieng in max 10%.
ROC-AUC plot, volatility on XRP is highly influence by speculations on other two markets.
- Refactoring
- Test if project is still working