Tag: quant

Factor Momentum Performance Update

Factor performance tends to be sticky. If Value, Momentum, Quality, etc. out-performed in the recent past, they continue to out-perform in the near-future.

AQR wrote a paper on it back in January 2019: Factor Momentum Everywhere. More recently, the folks at Research Affiliates extended the research in their Factor Momentum paper. Based on AQR’s research, we setup a portfolio that mimics this for both US and Indian stocks in December 2019. We called it Factor Momentum III and Model Momentum Theme.

The performance of the US portfolio has been gangbusters. It sidestepped the Corona Crash of 2020 and has been on a tear since then. The Indian experience, however, has been disappointing.

US Factor Momentum

The Indian portfolio suffered from its inability to go into cash/bonds during crashes. Being fully invested took a bite out of its overall performance.

India Factor Momentum

The Indian version comes up short even if you compare its stats with its component factor portfolios.

India Factor Momentum Statistics

The intuition behind the Radar Plot above is that the larger the area under the points, better the strategy. Model Momentum is in pink and it pales in comparison to most of its constituents. Surprisingly, the Financial Strength Value Theme (light green,) that is rebalanced annually, beat out everything else.

What explains the underperformance?

  • Not being able to go into cash/bonds meant a larger hill to climb during recoveries. However, cash is a double-edged sword. If you get the timing wrong, you might end up going into cash after the bottom and watch the market recover helplessly. Unless the trend formation period is really short, cash is not a viable option.
  • High transaction costs can also be playing a role here. The difference between Gross and Net returns is ~15%. Not as high as a pure momentum strategy but not trivial either. Also, US portfolios do not incur STT and brokerages are essentially zero.
  • Maybe 20-months is too short a window to judge such a slow-moving strategy. The research looks solid and maybe all we need is to give it some time?

Ranking and Visualizing Model Performance Metrics

On StockViz, we have over 50 quantitative models that are available for investing. They all have different risk and return profiles. It is fairly simple to pull up, say, the Sharpe Ratio of a particular model by navigating to its home page. However, it doesn’t say how it compares to all the other models we have going.

Let’s say you are looking to invest in one of our “Rapid-fire” Momo strategies. Our oldest ones are Relative, Velocity and Acceleration. Their (gross) performance metrics are displayed in a table.

Relative
Velocity
Acceleration

If you add net performance metrics into the mix, you’ll end up with a combinatorial explosion. How do you pick the “best” one of them to invest in?

Enter Radar Charts.

These charts show you the relative rank of each of these models against all the other 50+ models we have going. Intuitively, larger the area under the yellow (net) lines, better the model.

The only caveat with these Radars is that you should compare them against models of similar vintage. For example, we went live with our All Star momentum model in May 2020. Since then, the market regime has been extremely favorable to momentum strategies. It should come as no surprise that its Radar looks like the Queen’s Crown.

With that caveat out of the way, Radars are a great way to visualize how models square up against each other.

Synthetic Indices

Popular indices, like NIFTY 50 & MIDCAP 150, are useful if you are benchmarking long-only portfolios. However, if you have a long-short portfolio, then you need a long-short benchmark.

When Are Contrarian Profits Due To Stock Market Overreaction? (Lo, MacKinlay, 1990) describes a naïve portfolio construction process that is fit for purpose.

For momentum, portfolio weights are in proportion of excess returns over an equal-weighted index and for mean-reversion, they are the inverse.

For example, if you subtract the returns of each of the components of the NIFTY 50 index with the returns of NIFTY 50 EQUAL-WEIGHT index and divide by 50, you end up with the portfolio weights for the next day. Each look-back period used to calculate returns will produce a different set of weights (and a different synthetic index.)

As impractical as constructing such a portfolio may seem, they are useful as a benchmark for long-short mean-reversion/momentum portfolios. Here are index returns since April 2020 with 20- and 50-day look-backs.

This is especially interesting if you are looking at market dislocations and subsequent recoveries. Here are indices since June 2019 with 5-, 20- and 50-day look-backs.

Counter-intuitively, naïve mean-reverting long-short seems to out-perform momentum.

Transfer Entropy

In investing, we are always trying to find the relationship between two entities. For example, to hedge a long portfolio, we typically calculate the “beta” with respect to an index and use that to go short the index. Here, the biggest assumption is that the relationship is linear (or at least, piecewise linear.)

However, relationships in finance are typically non-linear. Using the math behind calculating entropy is one way to overcome the “beta” problem.

Introduction

From Wikipedia: Transfer entropy is a non-parametric statistic measuring the amount of directed (time-asymmetric) transfer of information between two random processes.

It tries to answer a simple question: what the effect of one entity over another, given a lag?

From StackExchange: TE(X↦Y)=0.624 means that the history of the X process has 0.624 bits of additional information for predicting the next value of Y. (i.e., it provides information about the future of Y, in addition to what we know from the history of Y). Since it is non-zero, you can conclude that X influences Y in some way.

Quick Look

Luckily, both R and python have libraries that help calculate transfer entropies between two variables.

Here’s the TE between Stock Futures and the NIFTY with a 500 day lookback and a single-day lag. FLOW_TO is a measure of information flow from the stock to the index and FLOW_FROM is the opposite direction.

Next Steps

This has interesting applications in portfolio risk management. Instead of calculating beta and hoping for the best, we could use TE to get a better understanding of how the individual constituents are affected by the index and hedge only those that have large values.

This post was inspired by Concepts of Entropy in Finance: Transfer entropy. Code and images for this post are on Github.

Euclidean Distance for Pattern Matching

Most of us have learnt how to calculate the distance between 2 points on a plane in high school. The simplest one is called the Euclidean Distance – a pretty basic application of the Pythagorean Theorem. The concept can be extended to calculate the distance between to vectors. This is where it gets interesting.

Suppose you want to match a price series with another, ranking a rolling window by its Euclidean Distance is the fastest and simplest way of pattern matching.

For example, take the most recent 20-day VIX time-series and “match” it with a rolling window of historical 20-day VIX segments and sort it by its Euclidean Distance (ED.)

Here, the ED has dug up a segment from November-2010 as one of the top 5 matches. Take a closer look:

While not a perfect match, it “sort of” comes close.

Sometimes, a simple tool is good enough to get you 80% of the way. This is one of them.