For the next few blog posts, I'd like to show how one would go about testing and deploying an automated trading strategy. We, of course, could look at traditional markets, but I was a little curious whether technical and fundamental measures held up in the cryptocurrency markets. So, with my curiosity peaked, I set out to test whether we could apply a quantitative approach to cryptocurrency investments that outperformed the market (Bitcoin) over time.
Disclaimer: This is not a recommendation to invest in cryptocurrency markets or a recommendation that one should deploy any strategy in the cryptocurrency markets. This market is only used to show the process one would employ to analyze and deploy an automated trading strategy. The assumptions made in creating the model are hypothetical.
If you've ever read a book on factor investing, you've probably read that, over time, exposing yourself to various factors will lead to outperforming the market in the long run. This typically leads back to your typical "markets are efficient" argument you have with detractors, but having worked in capital markets for 10 years I'm convinced that markets aren't always efficient, and it's the long-term, disciplined investor who wins out. Having said that, one of the best books I've read on the subject is by James O'Shaughnessy's, "What Works on Wall Street". He shows that over a long period of time, a value-based approach with a momentum overlay always outperforms the market. I want to test this approach in the cryptocurrency markets.
This is where it gets tricky and we're going to have to make some assumptions that may actually result in the strategy being uninvestable, but we'll give it a shot nonetheless. Momentum is easily defined as the price change over a period of time. Value, on the other hand, is not easily defined, but for this backtest, I'm assuming that projects that are more valuable will have more activity and more contributing coders than those that are less valuable. Cryptocurrency software is typically housed in public software repositories. For example, this is where you can find the code base for Bitcoin. This is where we will pull the "value" data from.
As an additional disclaimer, this data doesn't actually speak to the value of the software/asset, it's really just a broad assumption so that I can show readers how to run a backtest process. In actuality, an investment in Bitcoin or any cryptocurrency doesn't actually give you ownership to anything other than that asset, meaning that blockchain apps that have a use and potential economic cash flows don't have the traditional ownership structure of equity markets, ownership in the cash flows of the business. Because of this, it's actually difficult to value a cryptocurrency asset from a traditional fundamental valuation standpoint and no one really has a good answer to how these assets should be valued. However, as engagement with a blockchain asset increases, in theory, the value of the underlying asset should increase as well, due to additional buying demand, to use the underlying app or asset. This serves as the connection between engagement and value.
Hypothesis: Alpha is greater than zero when investing in the top 5 names ranked by momentum, selected from the top 50% of names ranked by a value factor.
- Data engineering - aggregating the data needed to run the analysis
- QA - test the data for data quality issues
- Preliminary data summarization
- Developing the backtest
- Summarizing portfolio results
- Building the auto trader
- Deploying the auto trader to a newly created server