TrendYCMacro (Quantpedia’s market timing strategy)
Quantpedia's TrendYCMacro holds the S&P 500 while its trend is up and the yield curve is not inverted. When either fails, it stays in stocks only while real retail sales, industrial production, and housing starts are all higher than a year earlier, and holds Treasury bills otherwise.
Designed by Ladislav Ďurian and Radovan Vojtko (Quantpedia), 2023. Implemented and tracked by Tactfolio.
| Mar 2008 to Nov 2026 | Strategy | SPY |
|---|---|---|
| Annual return (CAGR) | 10.0% | 11.7% |
| Worst drawdown | −22.5% | −51.5% |
| Sharpe ratio | 0.82 | 0.66 |
| Volatility | 12.6% | 19.7% |
| Annual return since publication (Sep 2023) | 9.3% | 17.6% |
| Feb 1993 to Nov 2026 | Strategy | SPY |
|---|---|---|
| Annual return (CAGR) | 11.6% | 10.7% |
| Worst drawdown | −22.5% | −55.2% |
| Sharpe ratio | 0.89 | 0.64 |
| Volatility | 13.3% | 18.5% |
| Annual return since publication (Sep 2023) | 9.3% | 17.6% |
TrendYCMacro is a stock market timing strategy from Ladislav Ďurian and Radovan Vojtko of Quantpedia, published in 2023. It reads three kinds of warning signs: the S&P 500’s own trend, the Treasury yield curve and the growth of the real economy. It holds stocks while the trend is up and the yield curve is not inverted, and while the economy is still growing if either fails.
Key points#
- It holds either the S&P 500 or Treasury bills, checked once a month.
- Price trend and the yield curve decide when to be in stocks.
- Strong economic data can keep it in stocks through a short break in the trend.
- From March 2008 its worst drawdown was about 23%, against 51% for the S&P 500.
- It can sit in cash for a long time when the yield curve stays inverted, as in 2023 and 2024.
What is TrendYCMacro?#
TrendYCMacro is a timing rule that uses three signals together because each one alone misses some bear markets. A bear market is a long, deep fall in stock prices.
- Price trend reacts late and whipsaws in corrections. To whipsaw is to sell and then buy back soon after at a worse price.
- An inverted yield curve warns months before a recession, but its timing is loose.
- Economic data confirm a recession, but late.
The yield curve compares interest rates on short and long Treasury loans. It is inverted when short rates are higher than long ones. A recession is a period when the economy shrinks.
The authors tested these signals on US stocks from 1927 and found that they work best together. Trend and the yield curve decide when to be in stocks. Growth data can then keep the strategy invested through a trend break that turns out to be a correction rather than a recession.
How does TrendYCMacro work?#
TrendYCMacro checks three signals at the close of the last trading day of each month.
- Trend holds when the S&P 500 (SPY) is above its 200-day average and has beaten Treasury bills over the last 200 days.
- Yield curve holds when the 10-year Treasury yield is above the 3-month yield (FRED series T10Y3M).
- Macro holds when real retail sales (RRSFS), industrial production (INDPRO) and housing starts (HOUST) are all higher than a year earlier. It uses the latest figures as they stood on each day.
- Hold SPY if trend and yield curve both hold, or if macro holds. Otherwise hold Treasury bills (BIL).
Treasury bills are short-term loans to the US government, the usual stand-in for cash. FRED is the free economic database of the Federal Reserve Bank of St. Louis.
The paper measures the second part of the trend test with a Rachev ratio of daily returns over bills. With the paper’s settings, that is the same as a higher average daily return than bills.
Here is a made-up example. At a month end, SPY is below its 200-day average, so the trend test fails.
But retail sales, industrial production and housing starts are all up on a year ago. Macro holds, so the strategy holds SPY.
How is this version different from the paper?#
In the paper, macro can only keep a position the strategy already has. It cannot move it back into stocks.
Tactfolio’s Enter / Exit block can remember a holding. But its triggers are single conditions that cannot read economic data.
So this version has no memory of last month’s holding, and good macro data can also bring the strategy back in. That makes it return to stocks sooner after some sell-offs.
What the backtest shows#
Figures quoted in this article's text were measured on prices through September 25, 2026. The chart and tables are recomputed after every market close.
The ETF-era test starts in March 2008. Since then it returned about 10.4% a year, against 12% for the S&P 500 and 8.5% for a 60/40 stock and bond mix.
Its worst drawdown was about 23%, against 51% and 32%. A drawdown is how far a portfolio falls from its last high point. Its risk-adjusted return, the return for each unit of risk, was above both.
It gained 1% from March 2008 through that year, while the S&P 500 lost 29%. Its worst drawdown ran from April to November 2011 and was recovered by January 2013.
It gave up a lot in 2019 (5% against 31%) and in 2023 and 2024 (5% and 10% against 26% and 25%). In those years the yield curve was inverted. With industrial production or housing starts below their year-earlier levels, it spent much of those years in bills.
Since publication in September 2023 it has returned about 12% a year, well behind the S&P 500.
With simulated fund history the test starts in 1993, when real retail sales begin. It returns about 11.8% a year, ahead of the S&P 500’s 10.9% with far smaller losses. From 2000 to 2002 it made 0%, 3% and 17% while the S&P 500 lost 10%, 12% and 22%.
Keep in mind that these are hypothetical results. They replay the rules on past prices and data after trading costs, so they are not a track record. See how to read a backtest for what to look at first.
When does TrendYCMacro struggle?#
- Long yield curve inversions. When the curve stays inverted but no recession comes, as in 2023 and 2024, it can sit in bills through a rising market.
- Mixed economic data. All three growth measures must be positive. So one weak series is enough to turn it defensive when the trend fails.
- Fast crashes. Trend and growth data both react after the fact.
How to try TrendYCMacro on Tactfolio#
The live strategy at the top of this page runs the paper’s signals on SPY and BIL with FRED data. Copy it to try fewer macro series or a different trend. You can use the same economic data as conditions in your own rules in the visual builder.
You can also compare it with Growth-Trend Timing, which uses similar growth data with only a trend rule.
Year by year
| Year | Strategy | SPY |
|---|---|---|
| 2026* | −2.3% | 7.9% |
| 2025 | 21.6% | 17.7% |
| 2024 | 9.9% | 24.9% |
| 2023 | 4.9% | 26.2% |
| 2022 | −11.9% | −18.2% |
| 2021 | 28.7% | 28.7% |
| 2020 | 40.0% | 18.3% |
| 2019 | 4.6% | 31.2% |
| 2018 | −4.7% | −4.6% |
| 2017 | 21.7% | 21.7% |
| 2016 | 10.4% | 12.0% |
| 2015 | 1.1% | 1.2% |
| 2014 | 13.5% | 13.5% |
| 2013 | 32.3% | 32.3% |
| 2012 | 16.0% | 16.0% |
| 2011 | −8.4% | 1.9% |
| 2010 | 10.3% | 15.1% |
| 2009 | 14.0% | 26.4% |
| 2008* | 0.8% | −28.7% |
| Year | Strategy | SPY |
|---|---|---|
| 2026* | −2.3% | 7.9% |
| 2025 | 21.6% | 17.7% |
| 2024 | 9.9% | 24.9% |
| 2023 | 4.9% | 26.2% |
| 2022 | −11.9% | −18.2% |
| 2021 | 28.7% | 28.7% |
| 2020 | 40.0% | 18.3% |
| 2019 | 4.6% | 31.2% |
| 2018 | −4.7% | −4.6% |
| 2017 | 21.7% | 21.7% |
| 2016 | 10.4% | 12.0% |
| 2015 | 1.1% | 1.2% |
| 2014 | 13.5% | 13.5% |
| 2013 | 32.3% | 32.3% |
| 2012 | 16.0% | 16.0% |
| 2011 | −8.4% | 1.9% |
| 2010 | 10.3% | 15.1% |
| 2009 | 14.0% | 26.4% |
| 2008 | 1.6% | −36.8% |
| 2007 | −2.5% | 5.1% |
| 2006 | 5.5% | 15.8% |
| 2005 | 4.8% | 4.8% |
| 2004 | 10.7% | 10.7% |
| 2003 | 21.0% | 28.2% |
| 2002 | 16.5% | −21.6% |
| 2001 | 3.3% | −11.8% |
| 2000 | 0.1% | −9.7% |
| 1999 | 20.4% | 20.4% |
| 1998 | 28.7% | 28.7% |
| 1997 | 33.5% | 33.5% |
| 1996 | 22.5% | 22.5% |
| 1995 | 38.0% | 38.0% |
| 1994 | 0.4% | 0.4% |
| 1993* | 9.3% | 9.3% |
* Partial year.
The rules as implemented
This is the exact tree Tactfolio runs monthly, rebalancing every run, with signals and trades at the close. Open it to inspect or copy it.
Make it yours
Copy TrendYCMacro and change one rule
Swap a fund, change a lookback or pick another rebalance day. Then compare your backtest with this one, and run your version on paper.
Needs Plus, $12 a month or save 25% paid yearly. Plus and Pro start with a 7-day free trial. 14-day money-back guarantee.
Sources and caveats
- Ladislav Ďurian and Radovan Vojtko, Avoid Equity Bear Markets with a Market Timing Strategy (2023)
- Quantpedia, Avoid Equity Bear Markets with a Market Timing Strategy: Revisiting Our Research (2023)
- The trend test is SPY above its 200-day average and a Rachev ratio above 1 on the last 200 daily excess returns; with the paper's 50% tails that ratio exceeds 1 exactly when the mean daily return beats Treasury bills' (BIL), which is how it is built here.
- The yield curve test is the 10-year minus 3-month Treasury spread (FRED T10Y3M) above zero; the paper uses monthly yields.
- The macro test is real retail sales (RRSFS), industrial production (INDPRO), and housing starts (HOUST) all higher than a year earlier, the authors' 2023 revision.
- In the paper the macro test can only keep an existing stock position. Enter / Exit can remember a holding, but its triggers are single conditions that cannot read economic data, so the rule has no memory here: the macro test can also bring the strategy back into stocks, which the authors' rule would wait on.
- Each economic figure counts only from the day it was published, read as it stood that day with later revisions only once released: at a month end the latest figure is the previous month's, the one-month lag the source describes.
- Signals and trades use the close of the last trading day of each month, as in the source.
Common questions#
What is TrendYCMacro?#
It is Quantpedia’s S&P 500 timing strategy. It holds stocks when the price trend is up and the yield curve is not inverted. It also holds stocks when real retail sales, industrial production and housing starts are all growing, and Treasury bills otherwise.
What is the yield curve signal?#
It compares the 10-year and 3-month Treasury yields. When the short rate is higher, the curve is inverted, which has come before most US recessions.
How is this version different from the paper?#
In the paper, good economic data can only keep an existing stock position. Here they can also bring the strategy back into stocks, because this version does not remember last month’s holding. The paper’s Rachev ratio test is built exactly, as a comparison of average daily returns.
Does TrendYCMacro still work?#
Since publication in 2023 it has returned about 12% a year. It trailed the S&P 500 while the yield curve stayed inverted. The live record on Tactfolio shows how it is doing now.
Can I automate TrendYCMacro?#
Yes. Copy the live strategy and run it in Trade, on a Tactfolio paper account or in your own Alpaca account, paper or live. Trade runs it on a daily schedule and only trades when its rules call for a switch. It is long only, holds US-listed ETFs, and trades the starting balance you choose.
Keep exploring
Run it automatically
The funds it holds
How its funds compare
- SPY vs VOO: fees, holdings and returns compared
- BIL vs SGOV: fees, holdings and returns compared
- QQQ vs SPY: fees, holdings and returns compared
- IVV vs SPY: fees, holdings and returns compared
Learn the ideas behind it
- Tactical asset allocation vs strategic, with backtests
- Trend following: how it works and what it costs
- Max drawdown: what it is and how to calculate it
Check the numbers
- Do classic strategies still work after publication?
- CAGR calculator and reverse CAGR calculator
- Monte Carlo simulation: will your money last?