Analyzing Cryptocurrency Markets Using Python
blog.patricktriest.com
blog.patricktriest.com
- it is not really pertinent to compute the correlation between prices. This takes the currencies trend into account since prices, contrary to e.g. "returns", are non stationary. This will lead to a biased higher correlation. Just do a ".pct_change()" before the correlation.
- also averaging the price between exchanges is a bit naive. It hides arbitrage opportunities and does not reflect the underlying traded volume. A VWAP would at least provide a better approximation.
There has been a lot of money pouring into crypto recently because most people are speculating on the space as a whole. Bitcoin's price is too high for smaller investors to make a significant amount of money on, but when a big Bitcoin move makes the news, those investors want a piece. They then pour money into the smaller coins, hoping to get a larger return on their investment.
All of this is to say that I think this is the opposite of spurious correlation. However, that doesn't make the correlation meaningful in any way. When ETH or BTC jumps and makes the news, the other coins tend to follow because the whole space is speculative right now.
TL DR the analysis is just a couple of time series correlation coefficient heatmaps.
That being said this is a great tutorial for people just starting out with data handling and analysis in pandas.
[1] https://nbviewer.jupyter.org/github/ghgr/HFT_Bitcoin/blob/ma...
You can watch a couple dozen the Bitcoin markets trade in real-time all on one chart with my site: https://bitcoin.clarkmoody.com/tickers/
It gets very interesting when the price really starts to move, since all the markets tend to move in lockstep. The response time reveals how active the trading bots are, making sure to reduce arbitrage opporunities.
ML can definitely help trading by using things like Ensemble Learning[2] but I would argue that for the novice it isn't going to add much to a trading strategy than doing other analysis on their own would do.
[1] https://cran.r-project.org/web/packages/caret/index.html
The final result is real-time analytics of trading on main exchanges and for major pairs: https://cointradeanalysis.com
Some feedback/ideas:
1) things like xrp_usd need more decimal places for price (Max price 0.16, Min price 0.15, you really need at least 4 decimal places.)
2) What you call "Amount" should really be called "Volume".. "Count orders" should be "Count Trades" or perhaps just "Trades".
3) The buy/sell graph: i would place the buy/sell bars beside each other (instead of having sell underneath pointing down). This would make it much easier to see which is higher, buy or sell.
2) Corrected, thank you very much.
3) The first option was like you describe, but something I did not like about it - I'll think about it :)
Next step: prediction! As an active research subject, crypto-currencies may be the ideal candidate for using deep learning to forecast non-stationary time series data.
Theory and Algorithms for Forecasting Non-Stationary Time Series
As many developers hang out here I want to point out that the Stellar Foundation has a rolling competition for developers: https://www.stellar.org/lumens/build/. You can see here all the projects submitted to the last round: https://galactictalk.org/t/sbc2017april
- Do you own Stellar Lumens?
- Are you involved in any Stellar related projects?
I'm not trying to give investment advice in my post. You should definitely not be buying Lumens if you don't need them. Most of them are going to be given away: https://www.stellar.org/about/mandate/
I got some of those ICO coins back then - i registered with username/password back then
Still have username/password but i am unsure where to actually login? Anyone familiar w/ Stellar knows how to get to the account?
If you head to https://launch.stellar.org/#/login you can log in. I got a message prompting me to contact Support, which I've done and now awaiting a reply.
Check out Open Bazaar for an entire market place that's facilitated via cryptocurrencies.
Would this be considered data science? It doesn't dive into machine learning, or anything advanced computer science wise.
It would be much more interesting to see the author dive into which events lead to fast price changes. How quickly are price shocks on other markets are reflected on GDAX? How are changes in outright contracts like BTC/USD and ETH/USD reflected in ETH/BTC? Do USD denominated pairs drive price discovery more or less than EUR denominated ones, and does this change when US based traders are asleep? Lots of stuff to look at here.
> In July 2013, it was reported that Panther Energy Trading LLC was ordered to pay $4.5 million to U.S. and U.K. regulators on charges that the firm's high-frequency trading activities manipulated commodity markets. Panther's computer algorithms placed and quickly canceled bids and offers in futures contracts including oil, metals, interest rates and foreign currencies, the U.S. Commodity Futures Trading Commission said.[109] In October 2014, Panther's sole owner Michael Coscia was charged with six counts of commodities fraud and six counts of "spoofing". The indictment stated that Coscia devised a high-frequency trading strategy to create a false impression of the available liquidity in the market, "and to fraudulently induce other market participants to react to the deceptive market information he created".[110]
I guess it's HFT if it's executed fast enough.
[1] https://en.wikipedia.org/wiki/High-frequency_trading#Strateg...
Look at real players with hundreds of employees. None of them make their money from market manipulation. It's all from low-latency arbitrage. If you're fast, you can make way, way more money doing legitimate trading than market manipulation.
Knowledge.
> If I put 2 buys either I will have double profit or double loss. If I put 1 buy 1 sell I get zero.
Yea, so it pays to know if something is correlated to avoid this. It also pays to know if something is correlated and their spread gets out of whack short term allowing you to profit from the expectation they'll return to being correlated.