Monte Carlo Simulation Report
Histogram of Trade Distribution by Percent Return
Candelstick Data for BTC_ETH Pair, Bar Size = 30 Minutes
Candelstick Data for BTC_ETH Pair, Bar Size = 15 Minutes
With some background in finance and a strong interest in statistics, alongside the ever increasing popularity of cryptocurrency, we decided to build a project that involves a variety of skills including, applied mathematics, statistics and machine learning. We are very excited to exercise our skills in programming and mathematics while getting started in the field of quantitative analysis.
What it does
Our program pulls data for currency pair trading data from the Poloniex cryptocurrency exchange and analyzes it to find profitable statistical edges. We developed three trading strategies with different risk and return profiles during our 24 hour hack. We tested these strategies on historical data to learn how our trading strategies would have performed between 1/1/2017 and 3/1/2018, while collecting and reporting notable statistics. These statistics included the largest winning and losing streaks, the winning percentage of trades, averages of winning and losing trades, the average holding period of the trades, and the Sharpe Ratio, or "return to risk" ratio.
The set of trades produced by these strategies were recorded and analyzed. Users can visualize the distribution curve of the set of trades. Users can forecast the future performance of these trading strategy using performing Monte Carlo simulation. This reshuffles the set of trades to get a distribution of equally likely equity curves for a future set of trades. The expected equity and risk for the set of future trades are reported with a 95% confidence interval.
The trading strategies include a trend following strategy, a mean reversion strategy, and a machine learning enhanced mean reversion strategy. The trend following strategy looks at two moving averages of the price series with different look back periods. When the faster moving average crosses above the slower moving average, the strategy signals to buy. The mean reversion strategy issues the buy signal when the price moves away from the average by two standard deviations. It exits when the price returns to the average. We analyzed the market conditions around signals produced by this mean reversion strategy with a support vector machine. These conditions include the previous period's price action, along with the volume and volatility of the market prior to the signal. The support vector machine classified winning signals from losing signals with an approximately 75% accuracy on a test set. The classifier was trained on the Bitcoin-Ethereum currency pair but performed with similar accuracy on other markets.
How we built it
We built this application using Python 3. We used the libraries scikit-learn, NumPy, SciPy, Pandas, Tkinter, and matplotlib to help build our project.
Challenges we ran into
GUI programming, selecting the right machine learning algorithm to analyze signals, and hyper parameter optimization while avoiding over-fitting.
Accomplishments that we're proud of
Proper implementation of machine learning, and finding profitable trading strategies with statistical significance.
What we learned
GUI programming, hyper parameter searching and optimization, avoiding over-fitting data, and useful skills in quantitative finance.
What's next for Statistical Edges in Cryptocurrency Markets
We are confident in the trading strategies we found and analyzed. We plan to continue our work on this platform and trade the mean reverting strategies algorithmically.