A Decade of Evidence of Trend Following Investing in Cryptocurrencies
AA Decade of Evidence of Trend Following Investing inCryptocurrencies
Evans Rozario
University of Cambridge
Samuel Holt [email protected]
James West
Globe Research
Shaun Ng
Globe Research
September 28, 2020
Abstract
Cryptocurrency markets have many of the characteristics of 20th century commodities mar-kets, making them an attractive candidate for trend following strategies. We present adecade of evidence from the infancy of bitcoin, showcasing the potential investor returns incryptocurrency trend following, 255% walkforward annualised returns. We find that cryp-tocurrencies offer similar returns characteristics to commodities with similar risk-adjustedreturns, and strong bear market diversification against traditional equities. Code availableat https://github.com/Globe-Research/bittrends .
1. Introduction
Trend following is one of the highest capacity investment strategies of the last hundred years, withthe managed futures industry managing $325bn of investor money [4]. Returns in commoditiesmarkets have become less impressive over the last decade [9] with under-performance againstthe S&P 500 and poor returns [5]. In spite of this, trend following continues to offer low realizedcorrelations with other traditional asset classes and thus effective diversification particularly intimes of crisis [6].Bitcoin [11] was introduced in 2009 as a digital currency and alternative to fiat currencies (e.g.USD, GBP, JPY) offering fast settlement, decentralization and inflationary hedge [2], resemblinga commodity. In fact the US, the CFTC classifies bitcoin as a commodity [12]. Bitcoin bearsmany similarities to gold: speculative safe-haven assets [7] and their decentralised nature shieldsthem from many financial variables, such as inflation and political factors. This suggests Bitcoinhas effective hedging and diversification benefits [13] against global indices, but unlike gold, thereturns and volatility of Bitcoin have historically been greater, leading to larger price swings andrisk. With average assets under management of crypto hedge funds increasing from 21.9 millionUSD to 44 million USD in 2019 [12] and the most common strategy among crypto-funds beingquantitative, there is great opportunity for trend following funds to enter bitcoin. We obtain abottom-up estimate of $323m for maximum AUM capacity, showing significant room for growthand investment.To begin, we implement vanilla trend following, optimise parameters to maximise Sharperatio and determine the fit to digital asset markets by assessing returns, Sharpe ratio, Sortinoratio, exposure and drawdown. Utilising the Sharpe and Sortino ratios, we will gauge the attrac-tiveness of risk-adjusted returns and upon assessing correlations, investigate the suitability ofBTCUSD as a hedge against the S&P 500. Then we extend to exponential and double exponen-tial moving average strategies, determining features that are relevant and compare performanceto the vanilla strategy and the S&P 500. 1 a r X i v : . [ q -f i n . S T ] S e p . Methodology Price data
We use bitcoin to dollar exchange spot price data bitcoincharts [3] for the Bitstamp exchange,between September 13th 2011 and December 12th 2019. The data was then resampled in hourlytime frames, with missing data filled forward. For this period, the data set contained 72,299rows, of which 5,835 contained missing values and the mean date of the missing values wasMarch 14, 2012. We expect these missing values to have resulted from the lack of tradingliquidity during the infancy of Bitcoin [14]. In this case, filling does not affect results becausewe are more interested in recent data and expect phenomena during 2011-2012 to be irrelevantin recent data and trends. We obtained daily OHLC data from Yahoo! Finance [15] over thesame period.(a) BTCUSD closing prices (b) S&P 500 closing prices
Figure 1:
Spot price between Sept 13, 2011 and Dec 12, 2019
Strategy implementation
We implemented the trend following strategies, of simple, exponential and double exponentialmoving average strategies. The strategy parameters, the long and short windows vary from − hours for BTCUSD and − days for S&P 500. The strategy generates a "buy"signal when the short window rolling average rises above the long window rolling average andsimilarly it generates a "sell" signal when the short window rolling average falls below the longwindow rolling average.The strategies were back tested using a starting amount of 10,000 USD, and the maximalvolume of respective assets were bought or sold for each "buy" or "sell" signal. We optimized forSharpe ratio with the short and long window sizes, noting the Sortino ratio, drawdown, exposureand return for that back test. We assumed negligible transaction fees, bid-offer spread, slippageand market impact from trades. Vanilla Trend Following
We use the traditional trend estimation techniques spanning simple moving averages (SMA),exponential moving averages (EMA) and double exponential moving averages (DEMA), whichwe briefly summarize.The simple average [1] for a short and long rolling window of fixed size: let N be a fixedwindow size and ( x , x . . . ) be data-points. Then for n ≥ N the simple average of a rollingwindow ( x n − N +1 , . . . x n ) is defined as 2a) BTCUSD spot Sharpe ratio (b) S&P 500 futures Sharpe ratio Figure 2:
Risk adjusted SMA trend following returns (Sharpe ratios) in 2019. Note thatBTCUSD spot is computed with hourly resolution and S&P 500 uses daily return data.SMA ( n ) = 1 N n (cid:88) i = n − N +1 x i (1) Exponential Moving Average (EMA)
This is a weighted moving average placing greater weights on more recent prices [8], whereas thesimple average places equal weights on all prices and does not account for recent price action.Let α = N +1 and Y ( n ) be the closing price of the n th day, then the n th EMA is thusEMA ( n ) = (cid:40) SMA (1) n = 1 αY ( n ) + (1 − α ) EMA ( n − n > (2) Double Exponential Moving Average (DEMA)
Based on the EMA, the DEMA reduces noise and the lag time of signals [10]. Therefore, it isfaster reacting and more receptive to fluctuations in recent prices. To compute this, we start bycalculating EMA(EMA)(n), which is the n th EMA of the array of EMAs of our data-set. ThenDEMA(n) is defined DEMA ( n ) = 2 EMA ( n ) − EMA(EMA) ( n ) Parameter optimization
Trend following strategies have two parameters to optimize over: the long average duration andthe shorter average duration. We illustrate the risk-adjusted returns surfaces according to theseparameter values in Figure 2, illustrating for 2019 the rather different return characteristicsbetween BTCUSD and S&P 500 in this time period.We employ a walk-forward approach to parameter estimation without great care for therobustness of the fitted parameter values. In particular, we take the optimal (long, short)parameter pair for the next time period to be the optimal values found in the previous period.
3. Results
Over the last few years years, the SMA strategy has potential to provide attractive Sharpe ratiosand risk-adjusted returns if the long and short windows are hyper-optimised. Compared to its3ounterparts, the optimal SMA strategy provides the best Sharpe ratios, with notably poorSharpe ratios from EMA and DEMA in the 2017-2018 and 2018-2019 data slices. Investigatingthe 1 year data slices before 2016, we find impressive optimised Sharpe ratios from EMA andDEMA, often outperforming SMA but we find the optimised parameters for such Sharpe ratiosare large and exceed hourly time scales. However, performing the same analysis (Figure 3) onthe S&P 500 1 year data slices, we note very low and negative Sharpe ratios, which suggests themaxima from the heat-map of S&P 500 SMA 1 year horizon (Figure 2 (b)) are non-robust andunstable; small perturbations around maxima cause drastic shifts in Sharpe ratio.(a) BTCUSD trend following returns (b) S&P500 trend following returns(c) BTCUSD best possible Sharpe Ratios (d) BTCUSD parameter values
Figure 3:
Risk adjusted returns (Sharpe ratios) from trend following the BTCUSD spot mar-kets and the S&P500 between 2011 and 2020. Best possible values are computed across allpossible BTCUSD strategies, fitted on a rolling yearly horizon in a walkforward fashion (i.e. theparameter used for year Y + 1 takes the optimal parameter value obtained in year Y .Investigating Figure 3 (b), we note that for the EMA strategy that uses the 2015-2016 dataslice as training, there is no Sharpe ratio. This is because optimising long and short windows for2015-2016 and testing on 2016-2017 with such parameters, leads to no executed trades. Usingrecent data slices (2015-2016, 2016-2017, 2017-2018) we note variable and sub-par performancefrom all strategies with Sharpe ratios < 1 and negative Sharpe ratios from SMA and EMA using2016-2017 and DEMA using 2017-2018 as training data. Considering all training data slices,we find no predictable and attractive Sharpe ratios from using trend following strategies on 1year training data commencing year Y, for test data commencing year Y+1. This statementshould be tested again with more mature Bitcoin markets, where we can investigate with moredata slices. Combining walk forward returns from BTCUSD SMA from 2011 - 2019 we achievea return of 73700%, which is an annualised return of 255%.4 .2 Diversification from traditional assets Over the last decade, there have been long periods with negative or no correlation betweenBTCUSD and S&P 500, suggesting BTCUSD could be an effective temporal hedge against theS&P 500 and trend following as an asset is a stock market diversifier.During our entire dataset (2011 - 2019) BTCUSD spot prices and equities returns exhibiteda small negative correlation, albeit not statistically significant.Analysing Figure 3 (d) and repeating the same analysis for EMA and DEMA, we noticethe optimal short window is generally above 200 hrs. Moreover, for EMA and DEMA, the sizeof long and short window appear to be positively correlated, with correlations > . . For allstrategies, window sizes show little trend with date with large variations in both long and shortwindows from 200-1000 hrs. However, the sample size of rolling windows is very small andgiven the young nature of Bitcoin, this assertion should be retested when Bitcoin markets havematured. (a) Daily returns correlation (b) Daily returns scatter plot Figure 4:
For period 12.12.2011 - 12.12.2019: (a) 20 day rolling correlation of S&P 500 SMAvs BTCUSD SMA daily returns data.
Throughout the decade or so long period for which we have data, we find trend following strate-gies to be consistently profitable regardless of averaging strategy used. Moreover the highestpossible achievable risk-adjusted rewards are similar to commodities markets.
Strategy Short (hrs) Long (hrs) Sharpe Ratio Sortino Ratio
SMA 141 781 1.0907 0.7969EMA 721 951 1.3515 12.9827DEMA 791 981 1.3165 2.2121
Table 1:
Best possible BTCUSD spot trend following over full period (September 13 2011 toDecember 12, 2019)
4. Conclusion
The last decade has seen consistent and attractive returns from trend following in cryptocurrencymarkets. Whilst this paper has only studied the bitcoin-dollar exchange rates, the extremelyhigh levels of correlation between cryptocurrencies in recent years means that most results willcarry over to other digital assets. 5eturns are overall reasonably robust to methodology used for determining trends and toparameter choices for trend following algorithms. Over a decade long walkforward test, usinga simple yearly regime for parameter estimation, we find reasonable consistency in estimates,and find that simple strategies taking simple moving averages of approximately 10 and 40 daysconsistently perform well, with a slight dropoff in more recent times. Sharpe ratios for suchstrategies are consistently around the 0.5 to 1.5 range (with only one year loss making) as withcommodities trend following strategies decades ago, in spite of the different volatility character-istics of cryptocurrency markets. Of particular interest to practitioners is the notable absenceof profitable intra-day trend following strategies for BTCUSD spot markets, in spite of theconsiderable interest afforded to such strategies.The last decade has been a length bull run for US equities markets, meaning that there isno data since the infancy of bitcoin covering its mechanics in a prolonged recession. Regard-less, during this period there was no significant correlation between daily returns of BTCUSDexchange rates and US equities. This, combined with the strong positive returns from trendfollowing points to cryptocurrencies as a fertile ground for portfolio diversification, particularlyagainst the inflationary environment of 2020.The code and results for this project can be found at: https://github.com/Globe-Research/bittrends .
5. Acknowledgements
The research in this paper was made possible by resources provided by Globe Research as partof Globe, a pioneering cryptocurrency derivatives exchange, available at https://globedx.com .6 eferences [1] Htrotugu Akaike. “Maximum likelihood identification of Gaussian autoregressive movingaverage models”. In: Biometrika
International Review of Financial Analysis
59 (2018), pp. 105–116. issn :1057-5219.[3] Bitcoincharts. http://api.bitcoincharts.com/v1/csv/ .[4] Jean-Philippe Bouchaud et al.
Trades, Quotes and Prices: Financial Markets Under theMicroscope . Cambridge University Press, 2018, pp. 366–367. doi : .[5] Claude B Erb and Campbell R Harvey. “Conquering misperceptions about commodityfutures investing”. In: Financial Analysts Journal
InternationalReview of Financial Analysis
63 (2019), pp. 322–330. issn : 1057-5219.[8] AJ Lawrance and PAW Lewis. “An exponential moving-average sequence and point process(EMA1)”. In:
Journal of Applied Probability (1977), pp. 98–113.[9] Y. Lempérière et al.
Two centuries of trend following . 2014. arXiv: .[10] Patrick G Mulloy. “Smoothing data with less lag”. In:
Technical Analysis of Stocks andCommodities
Bitcoin: A peer-to-peer electronic cash system . Tech. rep. Manubot,2019.[12] pwc and Elwood Asset Management. . .[13] “Safe haven, hedge and diversification for G7 stock markets: Gold versus bitcoin”. In: Economic Modelling
87 (2020), pp. 212–224. issn : 0264-9993.[14] Tetsuya Takaishi and Takanori Adachi. “Market efficiency, liquidity, and multifractality ofBitcoin: A dynamic study”. In:
Asia-Pacific Financial Markets https://finance.yahoo.com/quote/%5EGSPC/ .7 ppendix A Risk adjusted return surfaces (a) EMA (b) DEMA Figure 5:
BTCUSD Sharpe ratio heat-maps for 2019(a) EMA (b) DEMA