Over the past few weeks, we have been testing investment ideas and testing the performance against the simple Buy-and-hold index funds.
In some of my previous posts, I have
- Compared the performance of Nifty Next 50 against Nifty 50.
- Compared the performance of Nifty 50 Equal Weight vs Nifty 50 vs Nifty 50 over the last 20 years.
- Considered the data for the past 20 years to see if the Price-Earnings (PE) multiple tells us anything about the prospective returns. It does or at least has in the past.
- Tested a momentum strategy to shift between Nifty 50 and a liquid fund and compared the performance against a simple 50:50 annual rebalanced portfolio of Nifty index fund and liquid fund.
- Compared the performance of 2 popular balanced funds against a simple combination of an index fund and a liquid fund.
In this post, we test a moving-average based strategy and see how it fares.
Moving Average Based Nifty Strategy
A moving average is nothing but the average of closing price of Nifty over a lookback period. For instance, 100-day moving average is the average of closing price of Nifty over the 100 previous trading days.
On the first trading day of each month, we compare the previous Nifty close value and 200-day (or 100-day) Nifty moving average.
- If the previous close value > Moving Average, we invest in Nifty index for the month
- If the previous close value < Moving Average, we invest in Liquid Fund for the month
Essentially, it is a moving average based entry and exit strategy. You invest (or enter) in Nifty if Nifty is higher than the Moving average. Alternatively, you invest in a liquid fund. You test this condition only once every month.
The intent is to test out a strategy that is easier to execute. For instance, we can do this check every day. However, given our daily commitments, this is not possible for most of us. Therefore, we test this condition on the 1st of every month or the first trading day of the month. Moreover, the daily test of strategy will result in more churn in the portfolio, potentially leading to higher transaction and tax costs.
A Moving average based strategy is a rule-based strategy, much like the Buy-and-hold Nifty 50 strategy. The advantage of rule-based strategies (like the moving average based) is that you eliminate human biases (or hope to eliminate).
In both Buy-and-hold and Moving-average (MA) rule-based strategy, the underlying equity portfolio is always in Nifty 50 only. Nifty 50 puts together top 50 companies by free-float market cap and gives weight to each stock as per the market cap (this is also a rule).
The difference between Buy and Hold and MA based strategy is that:
Buy-and-hold Nifty is a strategy where you buy Nifty (index fund) and never sell it.
Similarly, Moving-average rule-based strategy is one where you buy Nifty only when your rule suggests. Else, you keep your money in the liquid fund. Hence, the money is not in the equity portfolio all the time. The momentum strategy we tested in one of our earlier posts is a similar ruled based strategy.
What do the results tell?
I use 100-day and 200-day Moving averages to test the performance against Nifty 50. I have used Nifty Price Index in this exercise. Have used HDFC Liquid fund for the liquid fund.
Remember, the equity portfolio in all three consists of Nifty 50 PRI.
The source of outperformance (or underperformance) is the amount of time the moving average strategies spend outside of Nifty 50 (in liquid fund) and when they do it.
Outperformance, if any, comes by containing the downside, exiting Nifty much before a sharp drawdown. At the same time, underperformance can happen by being late to the party when the Nifty is rallying.
I compiled the data since January 1, 2001 until June 12, 2020.
Let us look at the performance data.
You can see you can reduce drawdowns sharply by relying on a moving average based investment strategy.
In the following figure, you can see you can reduce drawdowns sharply if relying on moving average based investment strategy. The maximum drawdown in Nifty is ~60% while 100 MA strategy has a maximum drawdown of ~29%. If the sharp drawdowns worry you, a moving based strategy can be good for you.
As expected, lower volatility in moving average based method.
Now, this graph is interesting. Nifty 50 (Buy-and-hold) has outperformed 100-day MA strategy in 13 out of 19 full years. That’s more than 2/3rd of the time. Still, 100 MA strategy has done better since the beginning of 2001.
Because 100 MA has protected the downside well. Look at the year 2008. Nifty 50 lost 51.8%. 100 MA strategy lost only 6.3%. Look at the current year (2020). Nifty has lost 18%. 100 MA has lost just 2.4%.
In fact, the bulk of the outperformance has come in the year 2001-2010. Nifty grew 389% in the first decade while 100 MA grew 602.7% cumulatively. In this decade, Nifty has grown 62% while 100 MA has grown 39.7%. Rolling returns data will also attest to that.
So, you must be prepared for long durations of underperformance. Even in this 20-year data, there are stretches of 3-4 years where 100 MA based method has underperformed every year.
Remember, the above performance does not consider the impact of taxes and transaction costs.
Need to keep this in mind
No active investment strategy, no matter how good, works all the time. There will be times when your strategy will underperform the widely followed benchmark indices such as Nifty 50 and Sensex. And this can happen for long periods, as we have seen in our previous posts. Therefore, as an investor, you must have the confidence, conviction, and courage to stick with the strategy through periods of underperformance. Or else, you will only do damage to your portfolio.
I copy the extract from my post on momentum portfolio using Nifty and Liquid fund.
No strategy, no matter how good, will work if you can’t stick to it. We get uncomfortable if we are making less or losing more than our colleagues, neighbours and even the market. Here is the matrix.
Everybody else is losing money. We are losing money. (We are OK).
Everybody else is losing money. We are not losing money. (We are OK)
Everybody else is making money. We are making money. (We are OK)
Everybody else is making money. We are not making money. (We are NOT OK. We might shun strategy at the wrong time).
To be honest, this is the greatest strength of the index funds and the buy-and-hold strategy. It is easier to stick to such an investment plan. It is easier to manage emotions (not that simple though). Our investment behaviour does not mess up our portfolio. Along with proper asset allocation and regular rebalancing, it becomes a formidable investment strategy to beat, potentially creating behavioural alpha. At least, it can avoid negative alpha.
Do you plan to use a Moving Average based strategy in your investments?