I'm sharing a simple backtest of trading strategies & ideas I find online for 30 days.
Today we go over a simple MACD crossover and analyze its historical performance.
Let's put the strategy to the test. Check it out below!
The MACD is an indicator commonly used for its trend identification properties.
The MACD is typically calculated by subtracting the 26 EMA from the 12 EMA.
A 9 EMA of the MACD, termed the "signal line," is then plotted on top of the MACD line, which acts as a trigger.
Strategy Rules:
Entry Rules:
1. MACD line is greater than the Signal line on the previous day, indicating a bullish crossover. 2. The MACD line is below the Signal line on the day before the previous day, ensuring that the crossover has just occurred.
Exit Rules:
1. The MACD line is below the Signal line on the previous day, indicating a bearish crossover. 2. The MACD line was above the Signal line on the day before the previous day, ensuring that the crossover has just occurred.
Being a trend following strategy, strength in the asset definitely correlates to better performance.
Drawdowns are heavily reduced as exposure in the markets are way less and more focused on strong regimes.
If we look at the return to drawdown ratio, we can see that is not that bad when we compare to buy and hold.
We decreased our drawdown by 75% and decreased our return to drawdown by around half.
It's a good indication of risk mitigation when comparing to simple buy and hold.
There's a skew to the right side of the axis as it is expected from trend following systems.
We can expect higher average returns and lower win rates because we are trying to take advantage of trends.
Predicting a trend is hard but if we bet enough times, eventually we get it.
Now let's take a look at other correlated assets.
They all display some sort of resemblance and XRP showcasing outperformance.
This is because XRP has experienced extreme positive periods back in 2017 which helps in trend strategies.
Now let's look at the same strategy but on traditional assets:
1) NASDAQ Composite 2) SPX 3) Amazon 4) Apple
We can see that such a simple strategy is not optimal in traditional markets.
This is natural as this markets are more "mature" and require better strategic approach to make strategies work.
AAPL does display good returns to this day which is interesting.
Now let's take a look of red flags with these assumptions:
1) The fees and slippage used for these tests might be misleading because we don't know how much real costs there were in the past. Also slippage is heavily influenced by liquidity and the size at the time of trades.
2) Survivorship biases are not taken into consideration in these tests. For the sake of simplicity, I randomly picked assets that were available in Bitstamp, and used them for this simple testing.
A careful backtester will use all assets from those times, including the failures.
3) We know that these things have gone up in the past and we don't know if they ever will again. This is an assumption we make and further thought into it might be wise.
Conclusion:
This is just meant as a test of a common indicator and how it has performed historically with over-simplified rules.
Optimization and a more strategic approach is required to make it robust and produce returns that are actually attractive.
Good luck!
I hope you've found this thread helpful.
Follow me @pedma7 for more as I'll be sharing more backtests in the following weeks.
Day 9: "EMA Positive and Volume Expansion Strategy"
I'm sharing a simple backtest of trading strategies I find online for 30 days.
Today we go over a strategy that displayed 78% win rate since 2016.
Let's put the strategy to the test. Check it out below!
This idea emerged when I was researching ideas around volume and trend and has been laying around in my own research folders.
The simple concept is about trying to understand if after a volume expansion in a positive trend, we can extract some profits from that.
So we use two exponential moving averages to gauge higher timeframe trend and then we look at the current volume to understand its relationship to the average volume.
If it's above average than we assume there's some interest for whatever reason and we buy the next bar open.
I'm sharing a simple backtest of trading strategies I find online for 30 days.
Today we will be looking into a momentum strategy and how it has performed vs a simple buy and hold.
Let's put the strategy to the test. Check it out below!
Even though this idea of a breakout is well known by momentum and trend-following traders, I got the idea for this backtest from this interview:
In the interview @therobotjames also mentions a momentum strategy he used in crypto back in 2020/2021.
James mentions the following ideas:
1) "Around price extremes, conditional returns tend to be higher" 2) "Around a new high it's a good place to be long" 3) "Around a new low it's a good place to be short"
These are core fundamental principles for any trend/momentum system.