Author: shyam

SMA Strategies, Part III

In Part II of SMA Strategies, we saw how we could reduce drawdowns by making sure that we go long only when the slope of the SMA is positive. i.e., when the SMA is trending higher. Here, we will look at cross-overs.

While previous strategies compared the current value of the index vs. its SMA, a cross-over strategy uses a smaller look-back SMA instead of the index. Essentially, go long if SMA(N/4) > SMA(N).

NIFTY 50 Cumulative Returns

Cross-over only

NIFTY%2050

Cross-over with slope check

NIFTY%2050

The stand-alone slope check from Part II has lower peak drawdowns than the cross-over versions. The additional averaging of recent prices leads to a lagged response. Given the proclivity of our markets to cliff dive, a lagged response will result in higher drawdowns. It could, however, lead to lower transaction costs by papering over short-term mean-reverting moves.

Code and additional charts are on github.

Book Review: Scarcity

In the book Scarcity: Why having too little means so much (Amazon,) authors Sendhil Mullainathan and Eldar Shafir show how scarcity impairs judgment, and decision making.

The book lays out how scarcity – of time, money and attention – ends up creating tunnel vision that trades short-term hacks to longer-term solutions. However, the book is short on solutions and long on anecdotes. It is almost reads like a teaser to Nudge. The book is also a strong endorsement for having a bit of slack in our lives.

Toward the end of the book, I couldn’t help but conclude that the only way not to fall into the scarcity trap is to automate an increasing amount decisions that we make. Everything from buying toothpaste to scheduling appointments can be handled by bots so that we can take longer naps.

Recommendation: worth a read.

SMA Strategies, Part II

In Part I we saw how a simple tactical strategy that can be implemented by ETfs out-performs an actively managed mutual fund even after transaction costs. However, there are more than a million ways to implement an SMA strategy. Everything from picking the lookback period, cross-overs and enveloping are all open questions. There is no single “best” way to do it. Here, we add a simple check that makes sure that the SMA is trending higher before going long.

Quite simply, for an N-day SMA, we compare Nth-day to N/2th-day. If it is higher, then we go long.

Cumulative returns

NIFTY 50

NIFTY%2050

NIFTY MIDCAP 100

NIFTY%20MIDCAP%20100

NIFTY SMLCAP 100

NIFTY%20SMLCAP%20100

Take-away

The gross returns are lower than the “raw” strategy that we saw in Part I. However, the drawdowns for the 10-day SMA are a lot shallower. Shallower drawdowns allow a bit of leverage to be employed. This could be a good starting point for a NIFTY futures trading strategy.

In Part III, we look at how cross-over strategies perform.

Code and charts are on github.

SMA Strategies using ETFs

A simple moving average of an index is nothing but the average of closing prices of that index over a specified period of time. We did a quick backtest to see how an SMA based toggle between going long an index vs. cash performed.

Cumulative returns

NIFTY 50

NIFTY%2050

NIFTY MIDCAP 100

NIFTY%20MIDCAP%20100

NIFTY SMLCAP 100

NIFTY%20SMLCAP%20100

Feasibility

The backtest, unsurprisingly, shows that shorter the SMA look-back period, better the performance. However, the boost in performance comes at the expense of higher number of trades. Lower look-backs are only viable now thanks to brokerages where you would pay zero for these trades (however, you still pay the securities transaction tax.) To see how this would shake out in the real world, have a look at how our Tactical Midcap 100 Theme has performed in the last ~2 years:

The Theme used the M100 ETF (Motilal Oswal Midcap 100 ETF) with a 10-day SMA toggle to switch between the ETF and LIQUIDBEES. The blue line represents zero brokerage and 0.1% STT and the green line represents a brokerage of 5p and 0.1% STT. The chart shows it beating an actively managed midcap fund across all transaction fee scenarios.

The snag is that this strategy is tough to scale. The M100 ETF just doesn’t trade enough for this strategy to absorb more than Rs. 10 lakhs. And there is no small cap ETF on the horizon to implement the strategy in that space.

The second problem is that M100 trades to a wide premium/discount to NAV (see: ETF Premium/Discount to NAV.) This is another layer of risk that an investor could do without.

However, things seem to be moving in the right direction. Reliance Capital launched a new ETF recently that tracks the NIFTY MIDCAP 150 index. Their ETFs usually trade better – tighter spreads, narrower tracking errors, better liquidity. Hopefully, it will emerge as a stronger alternative to M100 and allow these strategies to scale. We setup the Tactical Midcap 150 Theme that uses the RETFMID150 ETF instead of the M100 ETF for those who are interested.

In Part II, we will see how adding a simple check on the SMA can reduce drawdowns.

Code and charts are on github.

Getting Bullish on Crypto

Jan 2018 was the height of crypto-fever. Every punter I knew was “trading” it. Then came crypto-winter. Then the RBI banned banks from doing business with any entity dealing with cryptos. And now we are going through a new phase: crypto-indifference.

Bitcoin was hailed as “digital gold.” And crypto’s were supposed to supplant fiat currency (aka, regular currency) as a store of value and a medium of exchange. Never going to happen. And that is a good thing.

I had talked quite a few of our investors out of “investing” into cryptos last year. And it proved to be a good call. Now is the time to have a re-look.

Will crypto’s ever be a store of value or a medium of exchange or an alternative to fiat currency? No. But they don’t need to be any of those to be useful. There are a lot of use-cases where a “score” needs to be kept within a closed network. Situations like voting within your apartment complex or splitting bills with your roommates or friends. There are micro-payment use-cases where you don’t need to have a charge-back facility. I see the core ideas behind the crypto+blockchain toolset being embedded in applications that a network would use everyday. And there is sufficient plumbing available now to do these experiments faster.

It is still an open question as to who and how these will be monetized. But now that the punters have pretty much written off cryptos, it allows the space to step back and innovate without the distractions of a ticker-tape.

Does this mean that you should go out and buy a bunch of bitcoin? No! I remain bearish on the price of all cryptos, including bitcoin. But I am now bullish on their value.