Search
Close this search box.

Using Moving Averages get more out of Equity markets

Share

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

  1. Compared the performance of Nifty Next 50 against Nifty 50.
  2. Compared the performance of Nifty 50 Equal Weight vs Nifty 50 vs Nifty 50 over the last 20 years.
  3. 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.
  4. 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.
  5. 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.

  1. If the previous close value > Moving Average, we invest in Nifty index for the month
  2. 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.

moving average investment strategy
buy and hold nifty

 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.

reduce losses in the portfolio rolling returns maximum drawdown

As expected, lower volatility in moving average based method.

rolling risk

nifty 50 calendar year returns sensex
performance

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.

Why?

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?

Additional Read/Links

CapitalMind: Time the market, sleep better

NiftyIndices, ValueResearch

6 thoughts on “Using Moving Averages get more out of Equity markets”

  1. Good analysis. Recently some mutual funds have launched STP (Systematic Transfer Plan Strategy), wherein funds move from Liquid fund to Equity fund, whenever equity market corrects. For instance you invest Rs. 10 lakhs in a liquid fund and define very clearly that if market corrects 1%, 1% of the liquid fund moves to equity and if market corrects by 5%, 5% of liquid fund moves to equity fund. Any analysis of this type of strategy?

    1. Deepesh Raghaw

      Hi Harish,
      Thanks!!!
      Have not tested this. Therefore, can’t comment. Looks a fine concept.
      However, the problem with this on too much cash is that the cash may never get invested. Or you may shun it at the wrong time.
      Long term back-testing of such a strategy ignores emotions that people experience on a real-time basis.
      It is frustrating to sit on cash when the markets keep running up. Or when the markets fall, you may get invested too soon.

  2. Hi Deepesh,
    I wanted to apply the same analysis on Nifty Momentum 30 Index. Is there some site or ready tool using which it can be done. I have the historical data of the index. Wanted to see whether the performance goes up materially (higher returns or lower drawdowns) to justify higher tax incidence.

    Thanks

    1. Hi Parag,
      So, you want to apply Dual Momentum kind of approach for Momentum index.
      I am not aware of any free software that allows you to do that.
      I use Excel sheets to do such analysis.
      My scripting skills are non-existent. Hence, I have to make do with excel.

  3. Sir,

    How to manage amount allocation in this strategy?

    For eg. if we start with 1000 rs and invest it in Nifty50 for a month as per the strategy and after 1 month the Nifty50 values at 995 which is below 100SMA, do we have to shift this 995 to liquid fund or shift 1000 rs to liquid fund?

    Regards
    Ravi

    1. Hi Ravi,
      You have to shift the current value (995).
      To be honest with you, the approach I discussed is not very practical impractical. Taxes will cause a lot of drag on the portfolio.
      If there was a mutual fund that could this for you under a wrap structure, could have thought about it.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.