Bitcoin Trading Research

AC297r Capstone Project

Daniel Rajchwald, Wenwan Yang, Wenshuai Ye

Background and Introduction

Bitcoin is a virtual currency developed by an anonymous hacker under the name Satoshi Nakamoto in 2009. It is a completely decentralized peer-to-peer system governed by open sourced algorithms. Bitcoin accounts are anonymous. They are just public key addresses without any personally identifiable information attached. Unlike other currencies, bitcoin has a maximum circulation of just under 21 million coins which cause the value of each coin to increase over time. Every transaction is verified by the entire Bitcoin network which makes it nearly impossible to counterfeit a Bitcoin. The motivation of this project is to implement some trading strategies and find the arbitrage opportunities of bitcoin. Some trading algorithms will be introduced in the following part. They are either based on price trend signals or arbitrage opportunities. Our research shows that arbitrage-based trading strategies outperform signal-based trading strategies. There are two ways to find the arbitrage opportunities. The first one is to buy a dual listed stock at a lower price in one market and simultaneously selling it at a higher price in another market. The second is the cross currency arbitrage which is an act of exploiting an arbitrage opportunity resulting from a pricing discrepancy among three different currencies in the foreign exchange currencies. We got the tick level data from Morgan Stanley and it is used to test performance of each algorithm.

Methodology

Given the unique nature of the Bitcoin asset, the natural methodology would be to try a varietyof approaches over different market conditions. Given that techniques are favorable to differenttrading algorithms, we implement each technique with its own algorithm. For example, patternrecognition trading is best implemented when the predictions are made with a predictive confi-dence interval and momentum trading can be optimal when the long and short positions are closedduring the trading cycle rather than just at the end of the trading cycle. Despite the laundry list ofparameters that needs to be tuned for each technique, we compare all algorithms under a commonsimple trading strategy where the positions are only closed at the end and a fixed number of assetsis bought or sold at each trade. We also attempt to merge the effective characteristics of certainstrategies into an ensemble approach. For example, since the momentum algorithm bases its pre-dictions on mean divergence and the HMM algorithm bases its predictions on mean reversion, wecan use a weighted average of the accuracy of the two algorithms over the past trades to constructthe current trade. We hope to get a better understanding of the Bitcoin market environment giventhe relative performance of the algorithms/combination of algorithms over different time periods

Methods

Performance Comparison Using Simple Trading

Conclusions

In the results table, the performance of any algorithm is highly dependent on the time period. For example, the momentum trading algorithm yields negative returns in all periods except the third. There is also little correlation between accuracy and return. We believe the main reason for this to be that most of the time the Bitcoin prices do not change from tick to tick. For example, in the third trading period, 68 percent of Bitcoin tick prices did not change in the next tick. Thus the momentum trading algorithm predicted incorrectly for those 68 percent of ticks since the current prices is either above or below the current moving average. However, it predicts correctly 15.9 percent and incorrectly 15.7 percent when the price changes at the next tick. Similar results hold for pairs trading. We also note that parameterization plays a huge role as pattern recognition trading succeeds over the 3 testing periods only if confidence intervals are used. Pairs trading does well in all three time periods due to the efficient market hypothesis that two different exchanges have to be highly correlated to prevent arbitrage opportunities. HMM does well in all three periods because we picked the best number of hidden states to use for each time period (either 2, 4, or 8). It was often the case that the other hidden states yielded negative returns. More work needs to be done to determine how to initialize the number of hidden states. We also plan to develop an ensemble trading strategies that takes advantage of different algorithms. For instance, combining the predictive power of momentum and HMM trading since the former is based on mean diverting predictions and the latter is based on mean reverting prediction. By taking a weighted average of the accuracy of the two methods over a historical window, once can dynamically determine the best way to trade. Overall, out efforts take a rigorous first step into Bitcoin trading and set the stage for future efforts.