Tag: quant

Strategy 9 with 15 Instruments

Our previous post on Rob Carver’s Strategy 9 experimented with four major Indian indices. We saw that only two of them contributed to out-performance while the others dragged.

Can we just run those that worked and throw away the rest?

The whole point of using multiple moving averages is to avoid overfitting. Hand selecting instruments to trend-follow is also a form of overfitting. Carver repeatedly says that his approach works best on a large set of instruments (start with 100 and whittle down.) However, as an Indian retail trader, we do not have many options. Realistically, we can lay our hands on at most 15 different instruments.

With these 15, we played around with: scaled vs. binary x long-only vs. long-short x equal-weighted vs. inverse volatility weighted.

The results are sobering.

Long-only Equal-weight

Long-short Equal-weight

Long-only Inverse-volatility-weighting

Long-short Inverse-volatility-weighting

Of these, only the scaled long-only equal-weight setup looks promising. However, if you look at how individual instruments performed, it is hard to remain unbiased.

The largest contributor is crypto.

Charts and code are up on github (equal-weight, inverse-volatility-weight)

Strategy 9

In Rob Carver’s Advanced Futures Trading Strategies (Amazon,) there’s a chapter, “Strategy Nine: Multiple Trend Following Rules,” that uses composite trend-following rules to drive a long-short strategy. We explore the strategy through an Indian market participant’s lens.

There are a number of decision points to navigate. Primarily, long-only vs. long-short, binary vs. scaled and equal-weight vs. cost-screen. Some of these are not practical for retail futures traders. For example, you could use the different SMA rules to scale in and out of positions instead of taking a binary approach. However, that implies that each position will need at least a dozen contracts – a capital requirement that is out of reach of a typical retail trader. Another problem is that the Indian market is notoriously expensive to trade. The cost-screen used by Carver throws out a lot of short-term SMAs, making the strategy unresponsive to short-term market moves.

Summarizing NIFTY 50, NIFTY BANK, NIFTY MIDCAP and SMALLCAP indices through Strategy 9:

NIFTY 50 and NIFTY BANK are poor candidates for this system – consistently under-performing buy & hold. The SMALLCAP index doesn’t have futures listed on it – forcing a realistic implementation to be long-only. The MIDCAP index does have futures on it, making long-short possible. The cost-screen version can be safely ignored.

If we decide to use futures for MIDCAP, we need to make sure we don’t blow up because of leverage. The problem with the long-short strategy is the periodic 20% drawdowns. Even at 2x leverage, that’s a capital impairment of over 40%.

However, looking at the equity curve, it may be worth the extra antacid budget?

The next question is, scaled vs. binary?

The scaled long-short version (red line in the chart above) is objectively worse than binary long-short (green line).

So, the version that worked for MIDCAPs is a binary long-short without cost-screen.

For SMALLCAP, given that it doesn’t have listed futures, we’ll have to settle for the binary long-only version without cost-screen.

We interrogated Claude as to the robustness of Carver’s approach. You can read the back-and-forth here.

Code and charts on github.

Factor MAX

The paper Factor MAX and Predictable Factor Returns from Liyao Wang and Ming Zeng presents a twist on momentum investing that goes long the factor that had the largest single-day return in the previous month. It is distinct from factor momentum goes long the factor that had the largest return over a specific formation period.

We have been running factor and model momentum for a while now with mixed results so we decided to have a look at this new strategy in the Indian long-only context.

tl;dr: not so hot!

We selected the NIFTY500 factor indices: LOW VOLATILITY 50 TR, MOMENTUM 50 TR, QUALITY 50 TR and VALUE 50 TR to compare Factor MAX vs. Factor Momentum. Factor Momentum out-performed Factor MAX.

The problem with using a single day’s performance to select a factor is that more volatile factors get picked more often. Here’s a plot of the monthly active factor between the two strategies.

Quality and Low-volatility factors do not jump around every day. Hence, their low representation in Factor MAX. You could use volatility adjusted returns to paper over this. However, we felt that went against the main thrust of the paper that investors systematically under-react to factor-level news embedded in these extreme returns, creating exploitable return predictability.

We ran the same backtest over a subset of our momentum and value models. Factor Momentum bested Factor MAX here as well.

If you want to DIY Factor Momentum based on this backtest, you can do so with cheap index funds:

  • Nippon India Nifty 500 Quality 50
  • Nippon India Nifty 500 Low Volatility 50
  • Nippon India Nifty 500 Momentum 50
  • Axis Nifty500 Value 50

Code and charts on github.

Sector Momentum

Previously, we had looked at using the momentum of S&P 500 Sector SPDRs for potential rotation strategies. How would the Indian story unfold?

We take 16 sector indices, use a 6-month look-back window and go long the sector with the highest returns, holding it for a month.

You end up with higher returns but lower Sharpe – makes sense given the super-concentrated nature of the portfolio.

The 4 points of out-performance (after costs, pre-tax) over the NIFTY 100 index is not much to write home about. Besides, this strategy trailed the benchmark pre-2020. If this were pitched back then, nobody would’ve deployed it and nobody would’ve been around for the post-2020 out-performance. On a positive note, the availability of index funds and ETFs should make this strategy fairly easy to implement.

The main caveat is that the index construction rules themselves are subject to change. Mid last year, SEBI capped the maximum concentration of a single stock for a sector index at 35% and required them to have at least 10 stocks.

Code and charts are on github.

Here are some other things we tried, so that you don’t have to:

Equal-weight all Sector Indices

Inverse-volatility weight all Sector Indices

Equal-weight Sectors in an Up Trend

Inverse-volatility weight Sectors in an Up Trend

The excess returns of these alternatives do not justify the costs.

Macro: Timing the NIFTY 50

Prior research has shown that there is no correlation between GDP growth and stock market returns (see: The Enigma of Economic Growth and Stock Market Returns).

GDP is a trailing measure. However, does the relationship change if we use leading economic indicators?

To answer this question, we look to the OECD Composite Leading Indicator database. It is a monthly time series of CLIs of different regions. Here’s India’s and the G7’s charted from 1980:

If we scatter India’s CLI with next month’s NIFTY 50 returns, we get:

No correlation whatsoever.

However, we know that the market likes growth. So, what happens if we scatter the diff of the CLI over returns?

Noisy, but not hopeless!

Turns out, if you go long NIFTY 50 only when the CLI is improving, you get a 2% boost over the long run return.

The kicker here is that the drawdowns are a lot less severe.

Code and charts are on github.