Tag: backtest

Risk Management is Not Free

Now that we are in the middle of a massive virus induced selloff, investors are once again interested in risk management. Similar to how flood insurance is mostly bought after a flood, investors end up paying a hefty premium for fighting the last war. Our experience with offering strategies that try to manage downside risk has been that investors flock to it after a drawdown, only to get disappointed by its returns once the market recovers and getting rid of it right before the next one. Rinse, Repeat.

Risk management is not free

No matter how you hedge your risk (buying options, sell futures, trend-following,) it costs money. There is no system where risk management makes the investor money. So, by definition, hedged investment returns will trail buy-and-hold for long periods of time.

Drawdowns and Returns are sides of the same coin

Equity risk premium exists because of tail-risk that cannot be modeled.

Nothing “normal” about it!

No matter what your time-horizon, there are always periods when you will be deeply in a hole.

Hedging instruments are not perpetual

Equities are perpetual but hedging instruments like futures and options have definite terms. They have their own peculiarities based on risk that is already being priced in vs. true tails.

Simple Moving Averages can help

Being long an index only when it above an SMA is one way to overcome the problems highlighted above. It doesn’t involve hedging instruments, so you don’t have to worry about derivative pricing, expiry, etc. The odds are in your favor in terms of the trend being your friend.

On average, it pays to be long only when the NIFTY is above its 50-day SMA

Most of the large daily moves occur when the index is below the SMA. Higher volatility is not necessarily bad if the drift is higher. But most investors rather sit out the volatility than dive in get their guts punched.

Next-day returns under different SMA “regimes”

What would returns look like if you were long only when the index traded above its SMA? It really depends on your time horizon.

Including the 2008 GFC
Excluding 2008 and subsequent recovery
Annual returns
Get ready to be whip-lashed
Trade-off between lower volatility and higher costs/gross returns.

Problems

  • When it comes to avoiding drawdowns, you win some, you lose some.
  • Transaction costs matter. The above was modeled using an STT of 0.001% and slippage of 0.05% on the sell side. And capital gains taxes have been ignored.
  • Trading this using ETFs would be sub-optimal. So it is not clear how this strategy can be expressed.
  • Outcomes would depend on holding periods. Investors can go a long time under-performing the index and experiencing every bump that comes along.
  • Shorter the SMA period (50-day shown above is not written in stone,) more the transaction costs and slippage.

Different look-back periods

What if you shortened the SMA period to 20 days?

20-days

And what if you increased it to 200 days?

200-days

What about Midcaps?

20-days
50-days
100-days
200-days

Who should hedge?

Most of the time, markets recover. However, the recovery time varies each time and there is no way to time hedging strategies. And each under-lying index behaves differently.

So, the reason to do it is investor’s own psychology and the asset one is long. If you, as a buy-and-hold long-term investor, can stomach the volatility, then there is probably no reason to hedge. Besides, portfolio volatility can be reduced through asset allocation as well (here, here.)

And remember: risk-management, whatever the strategy, involves paying upfront to mitigate risk that may or may-not befall.

Code and more charts on github.

Quant Model in Mutual Fund Wrapper

Most quant/smart-beta model based portfolios in India are built on direct-equity platforms – PMS, RIA, Themes and DIY. Their first major drawback is the 15% capital gains tax that needs to be paid the piper every year. The second one is the ability to track the “all-in” cost of maintaining the portfolio. This is where mutual funds have an advantage. Their pass-through status means that they don’t have to pay capital gains tax on portfolio sales and the end-of-day NAV gives investors the fully baked-in value of their portfolio. That said, mutual funds that wrap quantitative models have been few and far between. A new one has entered the fray: the DSP Quant Fund.

They were gracious enough to share their backtest. What follows is a 30,000 foot analysis.

Cumulative performance looks vs. a broad-market cap index looks good

cumulative performance vs. NIFTY 100 TR

However, excess returns seem to be tapering off…

excess returns over NIFTY 100 TR

Value factor seems to be a drag

If you regress the Quant Fund against the market-cap index and NIFTY strategy indices representing quality and value, you can see that returns have been primarily driven by the market (beta) and quality. Value seems to contribute negatively to overall returns. Part of the diminishing excess returns could be explained by the increasing influence of market beta to the fund’s returns.

drivers of returns

Why not just buy the NIFTY 200 Quality 30 Index Fund/ETF?

cumulative performance vs. NIFTY 200 Quality 30 TR

The SBI Quality ETF that tracks the NIFTY 200 Quality 30 Index has an expense ratio of 50bps. So while comparing the index against the Quant Fund, we need to haircut the index performance by that amount. Also, the Quant Fund comes out at 40bps for direct investors. The former is an ETF with minimal liquidity whereas the latter is an open-ended fund that can be redeemed at NAV – matters when you want to exit.

Qualitatively speaking…

DSP’s Quant Fund is a low-cost alternative to investors who want something more than market beta but not a full-fledged actively managed fund. It is tax efficient compared to other direct-equity platform solutions that over-weight the quality factor. And it is of comparable cost to most other quant/smart-beta funds/etfs for direct investors. Passive investors should definitely give it a strong look.

Code and charts are on github.

SMA Strategy Transaction Cost Analysis

In our previous blog post on using SMAs to trade ETFs (SMA Strategies using ETFs,) we saw how using SMAs reduced drawdowns and boosted returns. We also saw how our Tactical Midcap 100 Theme out-performed mid-cap mutual funds even after taking into account STT and brokerage costs. Given the increased interest in our newly launched Tactical Midcap 150 Theme, we added transaction cost analysis to our backtests to give investors an idea of what gross and net returns of different SMA look-backs look like over buy and hold.

Annualized Returns

SMA Strategy Transaction Cost Analysis
transaction cost = 0.2%

Take-away

1) SMA strategies on the NIFTY 50 index do not produce excess returns over buy-and-hold. However, the 200-day SMA did keep an investor out of the worst of the 2008 drawdown at a reasonable cost.
NIFTY 50 SMA

2) For other indices, perhaps counter-intuitively, 20-day SMA beat 10-day SMA both in Gross and Net returns.

3) SMA strategies will under-perform buy-and-hold when markets are generally trending up. However, they will out-perform when markets turn negative.
NIFTY MIDCAP 150 TR.20.cumulative
NIFTY MIDCAP 150 TR-20.annual

The RETFMID150 ETF tracking the NIFTY MIDCAP 150 index, continues to be well traded on the NSE. You can access the SMA(20) strategy shown above through our Tactical Midcap 150 Theme.

Code and additional charts on github.

Index Valuations, Part II

In Part I of Index Valuations, we showed how the relative PE (price-to-earnings ratio) and PB (price-to-book ratio) of the NIFTY 50 and NIFTY MIDCAP 50 indices have varied over time. What would a portfolio that weighted each of these based on the relative valuation ratio look like?

Backtest

Suppose, the relative ratio (R) = Ratio(MIDCAP)/Ratio(NIFTY)
Then, at the end of every month, re-weight the protfolio so that portfolio (S1) = R * NIFTY + (1-R) * MIDCAP, and
portfolio (S2) = (1-R) * NIFTY + R * MIDCAP

Ratio can either be PE or PB

PE based weights:
PE weights

PB based weights:
PB weights

It looks like:

  1. a portfolio with PB based weights is a lot less volatile than the PE based one.
  2. PB portfolio recovers much faster that the PE or plain-vanilla indices from deep drawdowns
  3. PB out-performs an equal weight portfolio

You can track and map this strategy to your portfolio using the PB weighted NIFTY/MIDCAP Theme.

Code and charts on github.

Dual Momentum: NIFTY vs MIDCAP

In Global Equities Momentum, we looked at how toggling between US Equity Momentum and World ex-US Equity Momentum ETFs gave superior returns to buy-and-hold. Can the same framework be applied to toggle between NIFTY 50, MIDCAP 100 and bonds?

Relative Performance

For dual momentum to work, you need the excess returns of the two equity assets to be un-correlated (or very loosely correlated.) Here is the plot of rolling 200-day cumulative returns of the equity indices minus that of the 0-5 year bond total return index:

excess returns of NIFTY and MIDCAP
The line marked RELATIVE is the difference between MIDCAP 100 returns and NIFTY 50 returns.

What we see here is that there is a high degree of correlation between the two when it comes to excess returns over bonds. At the same time, however, the relative performance between the two equity indices tends to be sticky. So, a dual momentum model tuned to sniff out the “regime” should be able to give returns better than buy-and-hold.

For reference, here is how buy-and-hold performed:
buy-and-hold NIFTY/MIDCAP/bonds

Backtest

Over different look-back periods, here is how the dual-momentum strategy worked:
NIFTY/MIDCAP dual momentum over different look-back periods

Over 3- and 4- month look-backs, the model does seem to show higher returns and lower drawdowns than buy-and-hold. But this is probably going to over-fit past data. But what happens if we specify the model to use “any” of the lookbacks? i.e., stay in equities if any of the look-backs signals the NIFTY 50 has out-performed bonds over the same period?

NIFTY 50/MIDCAP 100 dual momentum over any lookback

Here are its worst drawdowns:
drawdowns of NIFTY 50/MIDCAP 100 dual momentum over any lookback

A model setup this way has lower drawdowns and returns that better than NIFTY 50 but lower than that of MIDCAP 100 buy-and-hold. It really just boils down to how much pain you can bear – for those with a lot of testicular fortitude, buy-and-hold MIDCAPs are the best. But for the rest of us mere mortals, this strategy makes sense. And unlike an SMA model that checks for potential trades every day, this one checks only once a month. This keeps transaction costs low for long-term investors.

Code and more charts are on github.