- Wealth PMS
“It ain’t what you don’t know that gets you into trouble. It’s what you know for sure that just ain’t so.”
Oracle: “what’s funny?”
Neo: “Morpheus. He almost had me convinced”
Oracle: “I know. Poor Morpheus. Without him, we’re lost”
Neo: “What do you mean, without him?”
Oracle: “Are you sure you want to hear this?”
Oracle: “Morpheus believes in you Neo. And no one, not you, not even me can convince him otherwise. He believes it so blindly that he is going to sacrifice his live to save yours.”
That used to be me, with Morpheus’s faith in Neo, about “cheap” stocks. Of course, by cheap I mean, simplistic benchmarks like Price-Earnings. So much so that I was allergic to stocks that had seen significant price appreciation. This held me back from adding companies I already owned, just because my cost base was far below prevailing price. How could I bring myself to buy a stock at 2x of what I had bought for initially? Retaining the x-bagger status was more important to me than increasing my allocation. I was sacrificing ₹ returns by obsessing over % returns.
Conversely, I was drawn to declining stocks. My (only partially sound) reasoning was, low expectations and reversion to the mean had to kick in. There was even a (thankfully brief) flirtation with stocks at 52-week lows. “How much lower can it go?”. Turns out, possible downside from any price is 100%.
It took a few hard lessons to realize there are usually good reasons for a stock to be declining sharply, and that momentum is a thing. Since then, I have looked closer to price trends in addition to fundamental information.
This time I looked at the simplest of price trend indicators, the Daily Moving Average (DMA).
The premise is simple. What if you exit a stock every time it crossed below it’s X-day Daily Moving Average? where X could be any period in days, and Daily Moving Average is nothing but the average of daily closing price stretching back “X” days.
Let’s look at a couple of illustrations to compare buy and hold with a simple DMA-based timing approach.
Here’s the price chart of 3M India from April 2000 to March 2019.
A buy and hold approach spanning 19 years would be nearly a 50-bagger (Rs 517 to Rs 24,036). (Notice there’s some missing data between 2011 and 2013, and again between 2014 and 2016. Unfortunately this is a problem with the python package I used to fetch data from nseindia.com. We’ll see later why this should not prevent us from drawing conclusions)
Overlaying a simple DMA-based rule of exiting the stock every time the price falls below the 500 / 400 / 300 / 200 day Daily Moving Average price, and buying back in when the price crosses above the respective DMA.
This chart has been normalized to a starting point of 100 and is on a log scale to adequately show the changes over time. The orange buy-and-hold line shows the 48x return over 20 years of simply holding 3M India stock all through. The other lines show the value of timing exit and re-entry based on the DMA rule.
Note how the shorter the look-back period, higher the return. Therefore return from applying 200DMA > 300DMA > 400DMA > 500DMA.
Here we do not consider transaction costs of switching in and out and of course STCG (which could be as much as 30% depending on your tax slab), which means real DMA-based timing returns would be much lower than the numbers you see on the chart above, but still substantially higher than a pure buy-and-hold strategy.
You should be rightly skeptical, especially since eye-balling the chart suggests a lot of the DMA-timing outperformance began in 2008-09 and persisted. How do the year-wise returns look?
In 2008, 3M India fell 60% just like the rest of the market. Applying DMA-based entry / exit rules would have limited the damage, and avoided it entirely with 300 and 200 DMA rules. But the outperformance is not just limited to 2008.
Overall, annualized returns from DMA-based timing are better than simple buy-and-hold.
Since 3M India has been an out and out blockbuster stock, what if we considered a staid cement stock like ACC?
The 20 year chart shows similar relative performance for Buy and Hold versus DMA-based timing.
The year-wise returns table also shows consistent outperformance of DMA-based timing over Buy-and-Hold.
What about crappy stocks? Where the dips are decisive, and deadly?
Case Study #3: Vakrangee, “any resemblance of reported numbers to real life are purely coincidental”
DMA-based timing even worked well to preserve some of the returns even in the face of the crash the stock saw in early 2018.
But this is still anecdata. Three stocks, even with 10+ years of annual data each, do not make an investment strategy.
Which is why I tried to do this for all of the Nifty 500 stocks.
Here’s a peculiar problem folks trying to do historical price analysis on Indian stocks face. The exchanges only offer unadjusted prices. Yahoo! Finance has split adjusted but not bonus adjusted prices. Also downloading from Yahoo for hundreds of stocks is almost impossible given how often requests time out. Paid services like quandl offer adjusted prices but a few hundred USD per month is expensive.
And since 356 (> 70%) of the current NIFTY 500 have had either splits or bonuses in the past few years, many of those multiple times, ignoring these adjustments in our analysis is not an option.
My workaround was fairly rudimentary, but I think, effective. I downloaded unadjusted prices from nseindia.com. Then applied some basic logic on daily price changes to identify dates with probable bonuses / splits. If price drop was “significant”, probably means an event occurred, and the appropriate adjustment is then applied to all prices prior to that date. Not bulletproof logic, but it does enough to make the analysis dependable.
This approach however meant I had to live with the missing data between 2011-2012 and some in 2015-16 but 15 years across 350+ stocks is a good sample to test Buy & Hold versus DMA-based timing.
Table below shows overall summary comparison of median returns from NIFTY 500 stocks using the Buy & Hold and DMA-based timing approaches. Interestingly, all DMA-based approaches beat Buy & Hold almost every year, except 2009. Note I haven’t considered transaction costs and taxes.
The shorter the DMA lookback period, the higher the outperformance versus Buy & Hold, almost consistently for all years. Conversely, the longer period average we consider, the closer our results move towards simple Buy & Hold.
Note how a DMA-based exit signal would have helped limit the downside in 2008, which on it’s own makes it worth implementing. The tradeoff in waiting for the corresponding re-entry signal means partly missing out on the recovery in 2009. Make no mistake though, even in the “worst” 500DMA timing scenario, you end up at +46% cumulative return for 2008 and 2009 compared to -15% for Buy & Hold.
Being able to avoid large drawdowns is the ultimate investing superpower.
Central measures like averages and medians can sometimes be misrepresentative of the underlying data. Instead of looking at returns, what if we tracked % of stocks beating Buy & Hold?
Stocks beating Buy and Hold – High in down years, respectable in up years
Chart shows what % of today’s NIFTY 500 (in existence at the time) beat simple buy and hold compared to a timed entry and exit strategy. This means 80%+ stocks beat Buy-and-Hold in 2002 irrespective of DMA strategy. That number varied between just 16% (400DMA in 2009) and 100% (200DMA in 2008 and again in 2018).
Imagine owning a portfolio that was even for the year in November 2008 because you had exit into cash basis the DMA trigger, and having that cash available as markets recovered in 2009.
DMA-based timing seems to work, because it’s effect is persistent over time, as well over a large sample of stocks, exhibiting different volatility and price behaviour.
Like most analysis we do with historic data, ours is plagued with survivorship bias. i.e. we have omitted stocks that did not survive till present day. For example, only 214 of the current NIFTY 500 were
around in the early part of our analysis. The remaining listed during this period.
I examined the issue of company mortality in ‘How risky are mid and small caps?‘
But this is applicable to both the buy-and-hold and the timing-strategy returns, so both sets of returns would be adjusted downwards if this was done right, but the relative performance would remain.
I believe it enough to consider price relative to DMA as a factor when picking stocks for my core value portfolio
As of writing this post, 235 of the 500 NIFTY 500 stocks are trading above 200 DMA, this is down from 252 stocks a month ago. Within the 252 from a month ago, 47 have crossed below their 200 DMA while 30 other stocks have crossed above their 200 DMA.
The summary looks like this. Potential action is just that, potential action based on price movement. It should be combined with an understanding of the fundamentals and positive or negative changes before actually buying or exiting.
I would be particularly watchful of stocks that have crossed the threshold in either direction since history suggests the trend persists at least for the medium term. Here are the stocks that have made the transition above and below 200 DMA in the last month.
A DMA-based approach discussed here and a bottom-up fundamental analysis framework are not mutually exclusive. In fact, incorporating the two and augmenting such a strategy with a satellite momentum portfolio can provide excellent strategy diversification.
Human behaviour repeatedly shows the success or failure of an investment strategy rests less on the underlying intellectual framework, and more on the conviction demonstrated by the investor.
You have to believe.
(Subway fight scene. Agent Smith and Neo. Neo has just rescued Morpheus. He and Trinity have just exited the Matrix but Smith destroys the hard line before Neo can. Morpheus and the rest can only watch helplessly)
Agent Smith: Mister Anderson…
Trinity (whispers): Run Neo Run
Neo: <looks toward the subway exit, then turns around to face Smith>
Trinity (asking Morpheus): What is he doing?
Morpheus: He’s beginning to believe…
(Apologies if the Matrix references did not make sense, but then I’d also ask, what are you doing if you haven’t watched the Matrix)