Author: shyam

SMA Distance, Part I

Simple Moving Averages (SMA) have been used since time immemorial to trigger trading and risk-management decisions. They are also used to divide a time-series into different regimes to study derivative properties (volatility, for example.) One way to go about it is to simple split it based on whether the index is trading above an SMA or below it. But the binary split maybe too crude to model. Another way to go about it is to measure the percentage distance between the SMA and the index.

The distance

The formula is pretty simple: distance = SMA(n)/index -1 where n is the look-back period (50, 100, etc…)

If you vary n and plot the distance over time for the S&P 500, you get:
SP500.sma.distance
And the same thing for the NIFTY 50:
NIFTY50.sma.distance
-ve distance => Index > SMA (index is trending higher)

On the face of it, it looks like there is some pattern to it. The next post in this series will dive deeper into it. See Part II.

Code and charts are on github.

US vs. Indian Midcaps

According to investopedia, home country bias refers to the tendency for investors to favor companies from their own countries over those from other countries or regions. This tendency to invest in our own backyard is not unusual or surprising; it is a worldwide phenomenon. This bias is also understandable. After all, we are inclined to recognize and value domestic brands, and consequently, to trust in their solidity and ability to perform well on our behalf. Investors who exhibit home country bias with their investments tend to be optimistic about their domestic markets, and are either pessimistic or indifferent toward foreign markets.

Indian financial media will have us believe that investing in Indian midcaps is the road to riches. There is some truth in it. If you compare returns since early 2000’s, Indian midcaps trounced US midcaps:
US.IND.MIDCAP.2001

But something broke in 2010:
US.IND.MIDCAP.2010

The reasons are many. However, if you think back to 2008, Indian banks came out fairly unscathed from the credit crunch. Investors expected Indian markets to out-perform. But exactly the reverse happened. Year-on-year returns did not really call an early winner either:
US.IND.MIDCAP.annual

This is precisely why investors should diversify across geographies. When it comes to markets, anything can happen.


RUA: Russell 3000 Index tracks the performance of the 3,000 largest U.S.-traded stocks which represent about 98% of all U.S incorporated equity securities.
MID: S&P Mid-Cap 400 Index tracks a diverse basket of medium-sized U.S. firms.

Russell 3000 and the Cap-Weight opt-out

At first, the US Russell 3000 Value index (RAV) out-performed Growth (RAG) for over 6 years. Then 2008 happened and everything got crushed. Since then, Growth has out-performed Value by a huge margin.
Russell 3000 growth vs. value

Look at the chart closely, however, and you will notice that plain-vanilla cap-weight (RUA) is bang in the middle. Sure, it trailed Growth by about 60% cumulated over 15 years. But equities are only a part of a diversified portfolio and going cap-weight doesn’t require you to choose between Growth and Value – an endless debate that even academics are divided over. Cap-weight is good enough.

Besides, Growth out-performed Value by a noticeable margin in only 4 out of 15 years. Otherwise, the returns have been more or less on par:
Russell 3000 growth vs. value annual returns

There will always be debate over which strategy is “better” but sometimes, given a choice between Chocolate Chip and Very Berry Strawberry, picking Vanilla and sticking with it over the long haul makes the most sense.

Book Review: Radical Markets

In Radical Markets – Uprooting Capitalism and Democracy for a Just Society (Amazon,) the authors propose a number of “radical” ideas to fix democracy and capitalism. It is a riveting read, especially if you find the current system lacking in a number of areas.

Two ideas that stood out:

  1. To fix corruption in property assessments for taxation, allow owner self-assessments, publish those prices and allow anybody to pay that price to the owner and occupy the property. Radical but effective!
  2. Get rid of one-person-one-vote by allowing people to trade their “voice credits.” The buyer of these voice credits owns a square-root of those may votes. For example, if someone is very passionate about building a steel fly-over, they can start buying these VCs from citizens who are indifferent to it. A 100 such VCs translate to 10 votes in favor. This can then be defeated by 11 individual voters who cast one vote each. A near perfect solution to make sure that minority voices are not swamped by majoritarian rule while still making sure that the majority carries!

Some of the ideas around trading VCs and voting mechanisms can be implemented within smaller groups – apartment building associations, for example – right away. However, the ideas around immigration might never see the light of day. The book is worth a read even if you are not looking for radical ideas – the authors set the current problems that our systems face in their historical context.

The logical end point of institutional investment and diversification is the coordination of all capital to extract maximum wealth from consumers and workers.
A simple but Radical reform can prevent this dystopia: ban institutional investors from diversifying their holdings within industries while allowing them to diversify across industries.

Recommendation: Must Read!

S&P 500 SMA Regimes

In the post Mixture model over S&P 500 returns, we looked at how mixture models can be used to classify returns as belonging to “bull” or “bear” regimes. Unfortunately, we found that using it to trade the index itself was a losing proposition. This lead us to ask ourselves whether a mixture model was any better than a simple moving average based classifier.

Daily returns

If we split returns that occur over different moving averages (50-, 100-, 200-days) and plot their densities, we can see how losses are more frequent when the index is trading below some moving average:
S&P 500 simple moving average returns density plot

Avoiding being long the index when it is trading below a moving average seems to be a good idea. And a quick back-test shows the 200-day average is the one to watch:
S&P 500 long-only SMA returns

All the moving-average “systems” above out-performed the mixture-model based system.

Take-away

Simple beats complex, most of the time.

Code and charts are on github.