Posts

Beating Bitcoin with a Simple Trend Following Strategy - Part 3

avatar of @tradewatchblog
25
@tradewatchblog
·
·
0 views
·
4 min read

Welcome back to the third and final part of Beating Bitcoin with a Simple Trend Following Strategy.

If you missed the first two posts in the series, you can check them out on Hive or Leo Finance:

Hive - Part 1 | Hive - Part 2

Leo - Part 1 | Leo - Part 2

Recap

In part 1 we discussed Bitcoin's lengthy pull back and recovery cycles (drawdown phases) and suggested investors could achieve superior real and risk-adjusted returns vs buy-and-hold by applying a simple trend following strategy.

We then explained the most basic of trend following strategies, the moving average cross, and went on to show a moving average cross strategy outperforming buy-and-hold over a 2 month period.

In part 2 we looked at how our strategy performed in bull, bear and ranging markets, and then pulled all that together, demonstrating superior real and risk-adjusted returns over a 2 year period covering each of those market profiles.

In part 3 we will share strategy performance over the past 7 years and the actual parameters behind the strategy - moving average types and speeds.

A very rewarding hold

On January 1, 2014 one Bitcoin was worth $740.

Though this was the start of a bear market and price fell below $200 in 2015, if you're still holding a Bitcoin you purchased at the start of 2014, you've done very well regardless, realizing a gain of more than 3500% as of yesterday's close:

If you were really savvy and/or lucky and decided to invest one year later at the start of 2015, you bought a lot closer to the lows and you'd be sitting on 8700% as of yesterday's close.

In either scenario, your account experienced significant drawdowns exceeding 83%.

The trend is your friend

Let's look at how our simple trend following strategy would have performed using both start dates.

If we start the strategy on Jan 01, 2014 we generate a return exceeding 11 200%:

If we start the strategy a year later on Jan 01, 2015 we generate a slightly larger return exceeding 13 000%:

In either case, the largest drawdown experienced was just over 30%.

Timing isn't everything

Note that the performance of the buy-and-hold strategy is much more dependent on timing / dumb luck.

Our trend following strategy is much more robust: whether you start trading the strategy at the start of a bear market, or at the start of a bull market, you generate comparable returns over time.

Given where we are and may be in the current cycle, this is especially significant - though we are likely a long way from the top, we are most definitely a long way from the bottom - the perfect buy-and-hold ship has long sailed.

The strategy

As discussed, this is a very basic strategy: a moving average cross that opens a buy position when the fast moving average crosses above the slow moving average and closes that buy position when the opposite signal occurs.

We use a 3 day exponential moving average for our fast MA and a 7 day smoothed moving average for our slow MA.

As we want to be out of the market sooner rather than later if we turn lower, we want the fast moving average to be as reactive as possible (within reason), hence 3 day and exponential.

For the same reasons, we also want a reactive and relatively fast slow MA - 7 days / a week was the logical place to start - results weren't improved on either side, so it stuck.

The smoothing reduces volatility in the curve, giving us a little more breathing room than a simple moving average and reducing false signals.

Regarding money management, the strategy uses no leverage and is always either 100% in Bitcoin or 100% in cash.

Coding the strategy

If you're familiar with Pine script you should be able to code the above without too much drama, you'll need to calculate the smoothed MA manually as this type isn't native. If you'd like to test the strategy over different time periods yourself, you'll also need to code in a testing window function, as once again, not native.

The code

As a little Christmas gift to the Hive and Leo communities, I'll be making my code available free until this post reaches pay out. If you'd like a copy, just send me a DM via Discord @ Tradewatch#6599 and I'll send it through. There's some relaxed terms //commented out in the code, so please read and respect those.

A reminder re: past and simulated performance

Once again, past performance, and especially simulated and hypothetical performance, does not guarantee a strategy will achieve same or similar results in to the future.

These results over account for commission charges, but they do not account for live environment considerations like execution time and slippage.

Though the strategy has indeed performed well in forward testing since it was designed in 2019, as it is a buy-side-only trend following strategy - it does rely on Bitcoin trending up (or at least trading in a substantial range) - if Bitcoin does begin trending down permanently (or trade in a prolonged tight range) this strategy will also lose money, albeit at a slower pace.

It's also worth noting that in the event of further BTC strength in the coming years, it may be harder to achieve growth multiples than it was in the past ie growth from $25 to $50 is an easier hurdle than growth from 25K to 50K.

--

Posted Using LeoFinance Beta

Santa pic sourced from pixabay.com