Tag: trend following

Mahalanobis Distance with Trend

Previously, we constructed a portfolio that switches between equities and bonds based on the Mahalanobis distance between them. Here, keeping everything else the same, we add a trend filter to the same set of indices.

The composite regime-switching model ends up with superior Sharpe Ratios. However, if you don’t switch to bonds (and stay in cash, earning zero), then you maybe better off with a simple trend model.

The alpha seems to be in earning the risk-free rate when things are “bad” and getting long equities only when things are “favorable.”

Code and charts are on github.

Trending Momo Models

Previously, we discussed how applying a trend filter to a midcap momentum index could make sense. Then, we extended that to our homegrown momentum models. In both cases, there are certain situations where trended momentum side-steps deep drawdowns. However, if you are only looking at “raw” returns, you would be better off with monthly rebalanced momentum versions.

In this post, we run a similar test on the Momo versions of our homegrown momentum models.

Momentum (momo)
Velocity (momo)
Acceleration (momo)

The problem with high turnover strategies, beyond transaction costs, is the higher operational risk it entails. You could probably get away with postponing trades by a day or two in the monthly rebalance strategies but with these, you need automated trading systems.

You can track these strategies here: Tactical Momo (Momentum), Tactical Momo (Velocity) and Tactical Momo (Acceleration).

Code and charts: github

Trending Momentum Models

Momentum is known to trend. Our previous post explored trend overlays on momentum indices. The question now is, does it make sense to do the same to our own homegrown momentum models?

Our Momentum, Velocity and Acceleration models created between 2013 and 2015 have a monthly rebalance schedule. As a risk management measure, trailing stop-losses were introduced to them in 2016 and their momo versions – Momo (Relative) v1.1, Momo (Velocity) v1.0 and Momo (Acceleration) v1.0 – were born.

While these momo strategies do well with sudden market crashes, the problem has always been markets that grind down. Does a trend overlay on the original strategies perform better than momos after transaction costs?


The trend-overlay strategies seem to avoid drawdowns and perform better than their momo counterparts. The post-2020 Corona Crash market rally was one for the record books. So, a strategy that sidesteps the crash may not necessarily perform better during the rally but the full dataset will show superior performance. What if we took the crash data out of the picture?


It looks like Momentum and Acceleration strategies saw big pickups in performance. A trend overlay on Velocity resulted in lower drawdowns but that came with a big performance penalty.

You can track these strategies here: Tactical Momentum, Tactical Velocity and Tactical Acceleration.

Code and charts: github

Trending Momentum

Can a simple moving-average be used to time momentum indices? Returns from 2010 through 2015 of NIFTY MIDCAP150 MOMENTUM 50 TR and NIFTY200 MOMENTUM 30 TR under different SMA strategies look like this:

It appears the moving averages with short lookbacks can at least help reduce drawdowns, if not boost returns. If you pick the “best” config from the dataset and apply it across data from 2016 through 2022, it looks promising.

Should expect trend returns to be much lower after incorporating taxes and transaction costs but the lower drawdowns merit a closer look.

Given how our trend-midcap strategy has performed, we expect trend effects to be stronger in midcap-momentum than in the largecap version.

Code and charts: github