Tag: backtest

Cross-Asset Time-series Momentum

Trend-following systems typically use the past performance of a particular asset to trigger a buy or a sell on that asset. A research paper that came out in 2019 looked at whether the historical performance of multiple assets can be used to trade them.

Pitkäjärvi, Aleksi and Suominen, Matti and Vaittinen, Lauri Tapani, Cross-Asset Signals and Time Series Momentum (January 6, 2019). Available at SSRN: https://ssrn.com/abstract=2891434

From the abstract:

We document a new phenomenon in bond and equity markets that we call cross-asset time series momentum. Using data from 20 countries, we show that past bond market returns are positive predictors of future equity market returns, and past equity market returns are negative predictors of future bond market returns.

Unfortunately, the paper did not look at Indian markets to check if this worked. So, we rigged up a simple backtest to see for ourselves.

Rules

A simplified equity-bond cross-asset trading strategy at the beginning of month t can be constructed as follows: Compute the past 12-month equity return (E past) and the past 12-month bond return (B past). If:

a) E past is positive and B past is positive: Buy equity
b) E past is negative and B past is negative: Sell equity
c) E past is negative and B past is positive: Buy bonds
d) E past is positive and B past is negative: Sell bonds
e) Otherwise, invest in the risk-free rate.
Hold the portfolio for one month and then repeat the same procedure in month t+1 (source.)

Backtest

We used the NIFTY 50 TR index to represent equities, NIFTY GS 10YR index for bonds and the CCIL Index 0-5 TRI for risk-free rate.

Since our risk-free index starts only from 2004, our backtest only goes back 16 years. However, the markets have been through a lot since then, so it is unlikely we are losing much by not being able to go back much earlier.

The 12-month look-back approach massively under-performs the NIFTY 50 TR buy-and-hold. We shortened the look-back to 3-months to see if we could make the strategy more responsive to trend reversals.

To our dismay, we saw only marginal improvements in overall returns but the draw-down profile of the long-only portfolio was much better.

Conclusion

While the approach outlined in the paper might be valid for the selected subset of markets, it fails a simple backtest on Indian market indices.

Code for the backtest can be found on github.

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.