Bitcoin USD (BTC-USD) hardly requires an introduction. The crypto asset has made common headlines within the information previously years, as the worth of the asset fluctuated strongly.
On this article, we are going to current a basic trend-following technique by which the purchase & promote alerts might be generated robotically by a set of predetermined guidelines. We’ll execute quite a few backtests to see whether or not such a technique might be helpful for traders/merchants/speculators who would take into account investing in Bitcoin.
After these backtests have been executed, we are going to execute an out-of-sample take a look at to see whether or not the outcomes would have sustained all through 2020.
Historic efficiency of a Purchase & Maintain technique
Investing in Bitcoin just isn’t for the faint of coronary heart. If one would have began buying Bitcoins again in 2014, you’ll have gone via a spectacular uprise, solely to see the worth of your cryptocurrency come again strongly in worth simply as rapidly.
The funding would have slowly appreciated from 2014 to 2016 earlier than it began to extend exponentially in 2017-2018. After this, the worth of the cryptocurrency crashed down solely to rise once more thereafter.
A easy buy-and-hold technique by which one would have bought Bitcoin for $10,000 on the beginning date (17 September 2014) and would have held the funding till right this moment (9 April 2020) would have had the next fairness chart
Supply: Created by the writer
The returns on a month-to-month foundation would have fluctuated considerably as properly, typically going up with 63% solely to say no later with 33%.
Within the chart beneath the underwater fairness is demonstrated, displaying to losses one would have endured by holding BTC within the portfolio all through the previous years
That is proper, the utmost drawdown (the most important decline from high to backside) would have been 83%. For those who would have been unfortunate sufficient to have bought BTC on the high and face this 83% loss, you would wish a value appreciation of roughly 488% simply to get again to even.
Conclusion: It’s clear at this level BTC is ready to admire strongly in value and decline simply as quick once more. Wanting on the underwater fairness chart, displaying the 83% value decline, we assume this value volatility is just too elevated for many traders to just accept.
Within the part right here beneath, we are going to backtest a basic trend-following technique that has been ceaselessly talked about for commodity and inventory investments. We’ll validate whether or not this technique holds any advantage for speculators/merchants who wish to danger a part of their fairness in Bitcoin.
The technique we are going to use to time our entries & exits alerts might be a shifting common crossover system. In whole Four buying and selling techniques might be backtested:
1) SMA technique – A easy shifting common crossover technique: We purchase BTC as soon as it crosses over its easy shifting common. BTC might be bought as soon as it declines beneath the straightforward shifting common. Only one parameter might be used: (NYSE:N) The variety of days used to calculate the straightforward shifting common.
2) EMA technique – An exponential shifting common crossover technique: We purchase BTC as soon as it crosses over its exponential shifting common. BTC might be bought as soon as it declines beneath the exponential shifting common. Only one parameter might be used: The variety of days, N, used to calculate the exponential shifting common.
3) DSMA technique – A double easy shifting common crossover technique: We’ll use 2 easy shifting averages, a quick one (SFMA) and a slower one (SSMA). As soon as the quicker shifting common crosses over the slower shifting common we are going to buy BTC. We’ll exit this lengthy place in BTC as soon as the quicker shifting common crosses beneath the slower shifting common.
4) DEMA technique – A double exponential shifting common crossover technique: We’ll use 2 exponential shifting averages, a quick one (EFMA) and a slower one (ESMA). As soon as the quicker shifting common crosses over the slower shifting common we are going to buy BTC. We’ll exit this lengthy place in BTC as soon as the quicker shifting common crosses beneath the slower shifting common.
The aim of the Technique
The primary goal of this experiment is to run quite a few buying and selling simulations to return ahead with a buying and selling technique which might profit from the upward momentum of BTC, whereas the draw back danger is lowered.
The outcomes of the purchase & maintain technique might be summarized as follows:
To be able to set up a yardstick to measure the draw back danger of the funding, we are going to take a look at the entire drawdown through the funding (“Max Sys DD”). The decrease, the higher.
- Beginning fairness = $10,000 (100% is invested in every commerce, which means all earnings (or losses) might be reinvested on every new commerce
- Purchase costs and promote costs are primarily based on the open costs
- Trades are initiated on the day after the entry/exit sign has been generated (as a way to keep away from look-ahead bias).
- No commissions are considered
- Time horizon: September 2014 – December 2019
- The platform used: Amibroker
Technique 1: SMA Technique
Within the first setup, we are going to backtest what would have occurred in case somebody purchased Bitcoin after the worth crossed above the straightforward shifting common (calculated over N days). A shifting common that’s sometimes used right here for shares is the 50 or 200-day shifting common. Right here we are going to backtest the buying and selling technique for N = (10, 20, 30, …, 200). The closing costs are used to calculate the shifting averages and if a commerce sign happens, the commerce might be initiated on the closing value of the following day.
From this desk we are able to see the next:
- After we use mover than 90 days to calculate the straightforward shifting common, lower than 30 commerce alerts are generated. This leads to a pattern measurement that’s too small to attract any statistically related conclusions.
- One of the best outcomes are achieved for shifting averages primarily based on a 10-day or 20-day depend. These outcomes additionally obtain the bottom drawdowns.
- The variety of winners is comparatively low, which is what we are able to count on as these shifting common methods are vulnerable to false breakouts. The aim of this buying and selling system is to seize the foremost a part of a development, to not be proper on every particular person commerce.
Technique 2: EMA Technique
On this technique we do precisely the identical as underneath Technique 1, solely now will we use an exponential shifting common by which the more moderen value knowledge may have a bigger affect on the calculation of the shifting common.
The outcomes might be discovered within the desk right here beneath
The primary findings are just like these of Technique 1:
- We are able to maximally use 120 days to calculate the exponential shifting common
- Greatest outcomes are achieved for decrease day counts, reminiscent of 10 days or 20 days. Solely these parameters lead to first rate decrease most drawdowns.
- The technique will generate lots of shedding trades, however the primary aim is being achieved: seize nearly all of any uptrend and decrease the draw back danger whereas doing so.
Technique 3: DSMA Technique
We’ll use 2 easy shifting averages: a quick one (SFMA) and a sluggish one (SSMA). If SFMA crosses above SSMA we purchase Bitcoin on the opening value of the following day. If the quicker common crosses beneath the slower common, we are going to exit the deal on the opening value of the following day.
The outcomes might be discovered within the desk right here beneath. This time I’ve sorted the outcomes primarily based on the variety of trades the backtest generated (the highest 20 is proven):
That is proper, solely Four backtests resulted in additional than 30 trades. The outcomes are somewhat poor, the utmost drawdown continues to be excessive and the entire web revenue % is poor in contrast with the identical outcomes from technique 1 & 2. We aren’t going to analyze this technique additional at this level, because the variety of trades generated is simply too restricted to be taken critically.
Technique 4: DEMA Technique
We might be quick right here, the outcomes are similar to those underneath Technique 3:
No have to additional examine Technique 4 (nor Technique 3), because of an absence of adequate generated trades.
Out of Pattern Testing
We’ll now take a look at how the buying and selling methods would have carried out in 2020.
From the outcomes mentioned right here above, it might have made sense to make use of a easy/exponential shifting common crossover system to generate trades on Bitcoin, ideally solely utilizing 10 or 20 days to calculate the shifting common.
Within the desk beneath we are going to see how the shifting common methods would have achieved in 2020:
Technique 1: easy shifting common crossover primarily based on 10 & 20 buying and selling days:
Technique 2: exponential shifting common crossover primarily based on 10 & 20 buying and selling days:
If we might have used the EMA crossover system with a parameter of 20 days within the 12 months 2020, the next trades would have been generated:
That is what you’ll have gotten following the purchase & maintain technique (you obtain Bitcoin on 1 January 2020 and bought it on 9 April 2020):
The purchase & maintain technique would have resulted in a decrease Internet Revenue although one would have confronted once more a big drawdown of 52%
– Each the straightforward & exponential shifting common buying and selling techniques would have resulted in a better web revenue in 2020
– The chance of the Four out-of-sample backtests is low, in contrast with the danger of a purchase & maintain technique (just like what we noticed with the in-sample backtests).
– Regardless that the timeframe was somewhat quick (solely Three months and some days), each buying and selling techniques generated quite a few alerts which might have been simply executed on the opening value of the following day.
Comment: Please take into accout any funding in Bitcoin is uncovered to a excessive diploma of danger. Whereas the methods offered on this article exhibit a technique to decrease the danger publicity, anybody investing in Bitcoin ought to all the time take the high-risk character of any cryptocurrency into consideration.
Disclosure: I/we have now no positions in any shares talked about, and no plans to provoke any positions throughout the subsequent 72 hours. I wrote this text myself, and it expresses my very own opinions. I’m not receiving compensation for it (aside from from In search of Alpha). I’ve no enterprise relationship with any firm whose inventory is talked about on this article.