Beat the Market (Part 4) - Using a Market Regime Filter to Improve Risk-adjusted Returns

The Basic "Beat the Market" strategy works quite well, but there are some enhancements we can add to improve the risk-adjusted return, i.e. make the ride smoother.

You often hear the media or market commentators talking about "bull markets" and "bear markets". They're usually referring to the movement of the market from a historical high or low point by some arbitrary amount, e.g. "the market has rebounded by 20% from the recent lows so we're now in a bull market!"

Market cycles

Underlying the naming of these phases ("bull" and "bear") is the observation that markets go through cycles. These are often related to cycles that the economy goes through, i.e. booms and recessions (although they are not typically synced).

Cycles in financial markets, unlike in physics, do not have a consistent duration or amplitude, but often share similar observable characteristics. Like Mark Twain said, "History doesn't repeat itself, but it often rhymes."

Market regimes

A market regime is a phase of the market cycle. We can categorize cycles into any number of market regimes we wish to, based on any number of criteria. Each regime is a discrete (i.e. separate and not overlapping) state.

On Wall Street, market strategists talk about "risk-on" and "risk-off" regimes. They typically use inputs like equity returns, volatility, credit risk, interest rates, and liquidity indicators to create indicators that tell them which environment we're in.

As is wont with Wall Street, some firms come up with more complex indicators. For example, State Street Global Advisors (SSGA) has their proprietary Market Regime Indicator (MRI) which classifies the market into five different regimes: Crisis, High Risk Aversion, Normal, Low Risk Aversion and Euphoria.

Source: SSGA's MRI indicator. Description from their report: "The MRI employs a quantitative framework and forward-looking market indicators, including equities and currency-implied volatility, as well as credit spreads, to identify the current market risk environment."

What's the point of looking at market regimes? They can help us identify environments in which certain asset classes or strategies perform better or worse, and thus make adjustments that can improve the risk-adjusted return of our strategy.

Market regime models are most useful when they're relatively persistent (do not change too often), and when they can be used to predict future asset price movements.

They're most frequently used in tactical asset allocation investment strategies, which adjusts the mix of a portfolio's assets dynamically to try and improve the risk-adjusted returns versus a passive investment strategy. It's based on the ideas that: 1. a fixed weight diversification strategy is insufficient to protect from large losses, as during a crisis the correlations of different asset classes often trend towards one, and 2. the optimal portfolio can differ in different regimes.

Simply put, we want to be more aggressive during "safer" market regimes, and more cautious during "riskier" ones.

There are many methods we can use to classify markets into different regimes. On the one extreme, some quants use complex methods like Hidden Markov Models, Azran-Ghahramani Clustering and Gaussian Clouds to tease out different regimes (full disclosure: I have not used nor have any idea how those methods work).

For our purposes, we'll keep it super simple.

Using the 200 day moving average as a market regime filter

One of the most commonly used technical indicators by market practitioners is the 200 day moving average.

A moving average is calculated by summing a stock's prices over a certain number of periods and then dividing that by the total number of periods used. For example, a 5 day moving average is just the sum of the closing price1 of a stock divided by 5.

The orange line in the chart below shows the 200 day moving average for the SPY:

The stock price (light blue line) and the 200 day moving average (orange line) for the SPY (SPDR S&P 500 Trust ETF). Notice how the 200 day moving average is much "smoother" than the "choppy" stock price.

Moving averages help to smooth out the choppy short term movements of a stock's price by creating a series of average prices, and help us visualize price trends. Traders use moving averages to identify support and resistance zones for stocks, and also as a trading signal in the case of moving average crossovers.

We'll be using the 200 day moving average as a way to classify a market regime – if the stock price is above this we're in a bullish regime, and if it's below we're in a bearish one.

Why 200 days? Why not 100 or 300? The exact choice of the number of days is somewhat arbitrary. If the number is too small you'll get a lot of whipsawing above and below the moving average, making it less useful as a market regime classifier. If the number is too big, the moving average will be too insensitive to price changes and you'll miss a large part of the change in trend.

We can (and should) test the number of days which returns the best results, but for now we'll use the 200 day moving average as it's commonly used. It also happens to be the metric of choice for the legendary trade Paul Tudor Jones:

"My metric for everything I look at is the 200-day moving average of closing prices. I’ve seen too many things go to zero, stocks and commodities. The whole trick in investing is: “How do I keep from losing everything?” If you use the 200-day moving average rule, then you get out. You play defense, and you get out."  – Paul Tudor Jones, in Tony Robbin's Money

Using market regimes to enhance the Beat the Market strategy

The main purpose of the market regime filter in our Beat the Market strategy is that it reduces downside risk.

Just from observation we can see that if we stayed out of the market when the SPY was below its 200 day moving average during the brutal 2000 to 2002 and 2007 to 2009 downturns, we would have avoided a lot of pain.

Staying out of the market during the Dotcom crash (2000 to 2002) and Global Financial Crisis (2007 to 2009) when the SPY was below its 200 day moving average (200dma) would have saved you a lot of pain, but also note the many whipsaws along the way (times when the SPY cuts above or below the 200dma, only to quickly reverse.

What happens if for our Beat the Market strategy we bought SHY (the 1 to 3 year Treasury Bond ETF) if the SPY were below its 200 day moving average every month end when we evaluated the strategy?

We would have avoided some pain, as the Maximum Drawdown has decreased from -22.5% in the Basic "Beat the Market" to -16.0%. The 200 day moving average filter did help to reduce the downside risk, keeping us out of the market during bearish periods like the Global Financial Crisis.

But we also had to give up some returns, as the compounded annual returns has dropped from 15.30% to 14.18%.

Adding relative momentum to the bond portfolio

Is it possible to get some extra downside protection with even better returns?

To do that we will need to use one additional insight: Relative momentum also works for bonds.

To take advantage of this we will add one additional ETF to our arsenal, TLT (iShares 20+ Year Treasury Bond ETF).

During bearish periods when the SPY is below its 200 day moving average, we will check the prior 3-month (63 trading days) performance of both SHY (short term Treasuries) and TLT (long term Treasuries), and buy whichever one has done better.

SHY and TLT have effectively formed our simple bond portfolio.

Using this modification, we can get an even better Compounded Annual Return (CAR) of 16.43% for the enhanced "Beat the Market" strategy, with a slightly lower Maximum Drawdown (MDD) of 21.43%.

2003-2020 "Beat the Market" Basic "Beat the Market" Enhanced SPY
Compounded Annual Return 15.30% 16.43% 10.31%
Maximum Drawdown -22.52% -21.43% -55.19%
CAR/MDD 0.68 0.77 0.19

Hence, using a market regime filter and relative momentum on our bond portfolio to enhance the strategy, we've improved our risk-reward ratio (using CAR/MDD or the Calmar Ratio in this case) from 0.68 to 0.77.

A nice improvement!

In the next part of this series we'll look at how you can put the Beat the Market system to work for you.


  1. You can also use the open, high or low prices to calculate a moving average, but the closing price is most commonly used.