The Macro Regime Engine: A Breadth-Based Signal for Owning Stocks

The Macro Regime Engine is a stock market investing tool built on breadth. It checks twenty-six markets every morning and tells you whether to own stocks or hold cash. Over twenty-three years of testing it earned more than buy and hold with about a quarter of the worst loss.

Annual return
11.5%
Worst drawdown
−13.1%
Sharpe ratio
1.03
Trades a year
3.8
Markets watched
26
These figures come from a backtest on the S&P 500 ($SPY) from January 2003 to June 2026. Over the same period buy and hold returned 9.4% a year with a worst drawdown of −56.5% and a Sharpe ratio of 0.50. The results are hypothetical.

What the Macro Regime Engine is

The Macro Regime Engine is a tool I built to answer one of the oldest questions in investing, which is whether this is a good time to own stocks. Every morning before the market opens it gives one of two answers. When it says risk-on, I own the S&P 500 and the Nasdaq through the $SPY and $QQQ funds. When it says risk-off, I sell them and hold cash in short-term Treasury bills until the answer changes.

The engine is a rules-based system written in Python. After the market closes each day, every one of the twenty-six markets it watches works out its own vote. The engine counts those votes to make the next morning's call, and nobody overrides the result.

It took me almost a year to build. The first version was a simple indicator on TradingView. I kept testing it, improving it and strengthening it, and it eventually outgrew TradingView and became a Python system of its own.

It measures breadth across twenty-six markets

Most market timing tools look at the stock market alone. The engine looks at breadth, which is the number of markets that are moving in the same direction at the same time. It watches twenty-six of them. They include stock indexes, commodities, currencies, inflation expectations, the yield curve and corporate credit.

The idea behind it is simple. When investors are confident, the evidence shows up in many places at once. Stocks rise, credit gets cheaper, commodities firm up and the currencies that depend on growth strengthen. Each of those markets has its own buyers and sellers, so broad agreement among them is strong evidence that conditions favor risk. When that agreement starts to break down, it has usually done so before the stock market's largest declines.

Each market casts a vote every day. The engine uses the votes to place the economy in one of four regimes that professional investors use, which are Goldilocks, Reflation, Inflation and Deflation. The regimes describe whether growth and inflation are rising or falling. The regime and the vote count together decide whether the engine is risk-on or risk-off.

The engine is slow to change its mind on purpose. It waits until the evidence has held for a while before it switches, so a single bad week does not move it. It also checks the trend in stocks themselves, which protects against the rare case where the wider picture looks healthy while stocks are already falling. Once a signal has been published it never changes afterwards.

The Macro Regime Engine's backtest from 2003 to June 2026: the position strip of risk-on and risk-off days, growth of $1 on a log scale with the regime as the background, the regime votes, the growth voters and the drawdown from peak.
The engine's backtest from January 2003 to June 2026. The blue line shows the engine trading the S&P 500, the black line shows it trading the Nasdaq, and the grey line shows buy and hold.

It has beaten buy and hold

I tested the engine on more than twenty-three years of history, from January 2003 to June 2026. Over that period it returned 11.5% a year on the S&P 500. Buying the index and holding it returned 9.4% a year. A dollar that followed the engine grew to $12.70, and a dollar in buy and hold grew to $8.20.

The engine earned that higher return while taking much less risk. It was out of the market on roughly 30% of days, and its worst loss from a peak was 13.1%. Buy and hold lost 56.5% during the financial crisis. That gap matters more than it first appears. A portfolio that falls 56.5% has to gain 130% to get back to where it started, and a portfolio that falls 13.1% has to gain 15%.

The same signals worked on the Nasdaq as well. Applied to $QQQ they grew a dollar to $33.20 over the same period.

It moved to cash before the three largest declines

The engine's losses were small because it moved to cash before each of the three largest stock market declines of the period. In all three cases breadth weakened before prices collapsed, and the engine sold when it did.

Moved to cashEventS&P 500 declineBought back
December 2007The financial crisis−56%April 2009
February 20, 2020The COVID crash−34%May 2020
November 2021The 2022 bear market−25%January 2023

In each case the engine returned to stocks once breadth had recovered, which was within a few months of the market's low.

The results were tested on data the engine had never seen

A backtest can be made to look good by adjusting the rules until they fit the past, so I tested for that. I set the engine's rules using data from 2003 to 2015 only. It then performed better on the years from 2016 to 2026, which it had never seen. It also passed all seven of the forward tests I ran on it.

The rules have been frozen since June 2026. Every signal since then has been published live with its date, and the weak months are on the record next to the good ones.

What members get

Members see the engine's current signal on a dashboard every morning before the market opens. They also receive an alert as soon as the signal changes. The dashboard shows the current regime, how each of the twenty-six markets voted and the complete backtest, so you can check the work for yourself. The engine's code stays private.

The signal changes about four times a year. On most mornings a member looks at the dashboard, sees that nothing has changed and gets on with the day. The engine earns its keep on the few mornings a year when the signal is different.

What it cannot do

The engine does not predict crashes. It recognises when conditions have turned against stocks and moves to cash, and it has no way of knowing whether a crash will follow. Its patience also has a cost. Because it waits for evidence before it buys back in, it can be late to return when the market recovers quickly. It trades only about four times a year, so it will not suit anyone who wants frequent activity.

The numbers on this page come from a backtest, and a backtest always looks better than real trading. It assumes that every trade happens at the day's closing price, and it leaves out trading costs and taxes. I treat these results as the best case and expect real results to be somewhat lower.

How it fits into the portfolio

The Macro Regime Engine manages the stock portion of my portfolio. A second system called the Tailwind Trend Indicator manages Bitcoin, Ethereum and gold. Both follow a principle I call survival is alpha. An investor who avoids the deepest losses starts every recovery with more capital, and that advantage compounds over time.

Frequently asked questions

What is the Macro Regime Engine?

The Macro Regime Engine is a rules-based tool that tells you when to own US stocks and when to hold cash. It measures breadth across twenty-six markets every morning. When most of them agree that conditions favor risk it owns the S&P 500 and the Nasdaq. When they stop agreeing it holds cash.

Is it a risk-on, risk-off indicator?

Yes. The engine has two states. Risk-on means it owns the S&P 500 and the Nasdaq, and risk-off means it holds cash. It decides between them from the breadth of twenty-six markets and the macro regime they point to.

What is market breadth?

Breadth is the number of markets that are moving in the same direction at the same time. The engine watches stock indexes, commodities, currencies, inflation expectations, the yield curve and corporate credit. Broad agreement among them is strong evidence that conditions favor stocks, and that agreement has usually weakened before the largest stock market declines.

Has it beaten buy and hold?

Yes, in a backtest that runs from January 2003 to June 2026. The engine returned 11.5% a year on the S&P 500 and buy and hold returned 9.4% a year. The engine's worst loss was 13.1% and buy and hold's worst loss was 56.5%. These are hypothetical results from a backtest.

What are the four macro regimes?

The four regimes describe whether economic growth and inflation are rising or falling. Goldilocks is rising growth with falling inflation. Reflation is rising growth with rising inflation. Inflation is falling growth with rising inflation. Deflation is falling growth with falling inflation.

How often does it trade?

It trades about four times a year. In the backtest it averaged 3.8 trades a year and was invested on 70% of days.

Does it predict crashes?

No. It recognises when conditions have turned against stocks and moves to cash. It cannot know whether a crash will follow, and it can be late to buy back in when the market recovers quickly.

How do I get the signal?

Members see the signal on a dashboard every morning before the market opens and receive an alert when it changes. Membership costs $7 a month.

Sources and methodology

The figures on this page come from the engine's backtest on the S&P 500 ($SPY) and the Nasdaq 100 ($QQQ) from January 2003 to June 2026. The rules were the same for the whole period. Trades were made at the daily close, cash earned no interest, and no trading costs or taxes were deducted. The results are hypothetical.

The table lists the engine's moves to cash before the three largest S&P 500 declines of the period. The size of each decline is the index's fall from its peak to its low. The engine's design draws on published research into market regimes and leading economic indicators, which is listed below.

Related on Tailwind Macro

First published February 20, 2026. Research and education, not investment advice. See the disclaimer.