Research

Building a Tactical Macro Regime Engine That Actually Survives the Backtest

My journey coding an indicator for TradingView that would’ve sidestepped the bulk of every major drawdown since 2000 and performed like B&H.

December 2, 2025by @DurdenBTC

Everyone wants the magic indicator that triples their money. I know, because I spent years hunting for it. Eventually I realized that’s a dead end; markets are just probabilities, and the only real edge is tilting those probabilities in your favor.

I switched to just wanting one indicator that stopped lighting my portfolio on fire every time the macro gods felt displeased with us mortals making too many positive returns.


Over the last few weeks I’ve spent countless hours in the lab (aka my home office) working through iteration after iteration of a tool I could use as a ‘guiding light’ for my portfolio. I’ve spent so many hours staring at the Pine Editor in TradingView my eyes are starting to dampen; not to mention the countless bags of coffee I’ve ripped through.

“Nothing in the world is worth having or worth doing unless it means effort, pain, difficulty… I have never in my life envied a human being who led an easy life. I have envied a great many people who led difficult lives and led them well.”

- Theodore Roosevelt

Those countless hours eventually paid off with actual clarity, a better understanding of what macro forces actually drive asset markets and most importantly… an idea.

This idea roughly speaking helped me stitch together a Tactical Macro Regime Engine that, on paper, tracks buy-and-hold SPX… with an 11% max drawdown. As a high level risk overlay; this is exactly the kind of trade frequency, drawdown protection & performance I’m looking for because this will enable me to tactically add some percentage of leveraged exposure during these periods to outperform (more on that later).

Each asset’s state (bull/bear) maps to two regimes at once, so you get a 4-way voting system:

Sum them up, and you have four numbers. Highest one wins. That’s the current regime and dictates how you should be positioned at a high level.


4. Teaching It Not to Freak Out Over Every Wiggle

Raw votes are noisy. Markets don’t move in clean four-act plays; my first backtest of this confirmed that theory quite vividly given the system was risk-off for a good portion of the 2014 melt-up.

So I added three layers of sanity:

  1. Minimum votes.
    A regime only “counts” if it has at least X confirming assets.

  2. Vote lead.
    It also has to beat the second-best regime by at least Y votes.
    If Goldilocks has 10 votes and Reflation has 9, we need logic around these results.

  3. Time confirmation (hysteresis).
    Even if a new winner appears, we don’t switch signals immediately. It has to stay in charge for N bars before the regime officially flips.

That gives you a smoothed regime line, reducing the noise and increasing effectiveness. This completed the foundation of the system in a logical sense.

Then I layered on a risk mode, because regimes and portfolio decisions are not the same thing:

On the chart:


5. Daily vs Weekly: Giving Macro a Longer Memory

Early versions of my indicator used daily (timeframe) VAMS for every asset, and it worked… okay. I spent hours fine-tuning each VAMS signal on an asset by asset basis and had a sort of eureka moment.

A lot of these macro-heavy series are slow-moving oil tankers:

They don’t care about a Tuesday headline. They care about the next 6–12 months.

So I split the world:

In code it’s literally the same VAMS function, just swapping timeframe.period for “W” on the macro symbols.

The result:
On a daily chart, you still see tactical shifts.
Underneath, the regime engine itself is anchored to weekly macro data where it makes sense.


6. Turning It Into an Actual Strategy (Not Just Pretty Colors)

Once the matrix was behaving, I did the irresponsible thing every trader eventually does…I pointed it at ES1! from 1999 onward and asked the stupidest possible question:

‘What if I just buy when it’s green and sit out when it’s red?’

Eyeballing it made me feel good, really good. Now I needed to know the actual stats.

Does this beat buy & hold or at least hold par with it? Does it have less max drawdowns? How many trades would I be doing per year?

It was time to backtest.

So I converted the indicator into a full TradingView strategy:

Backtest on ES1! from 1999 → now, with my current daily/weekly mix and settings:

Is this statistically perfect? No.
Is it suspiciously good for a first real iteration? Yes.
Do I trust it blindly? Absolutely not.

But here’s the key:

It converts macro confusion into binary positioning decisions.
All while massively cutting drawdowns and only giving up a modest amount of upside vs full buy & hold. In certain cycles it outperforms B&H.

For a survivalist, that’s the trade. For an optimizer, my brain lit up with the amount of things I can overlay on this to squeeze a higher % during risk-on periods.


7. Where It Still Fails (And Why That’s the Whole Point)

Is it perfect? Obviously not. I think the important realization here is that no system will ever be perfect. The objective is to skew the probabilities in our favor as much as possible. The only perfect system would be one where it knows the future. So where does this system underperform?

Some examples:

In other words:
This is not a holy grail.
This is a macro-aware binary overlay.. think of it as your seatbelt to the markets.

If the cost of avoiding catastrophic accidents is occasionally missing a sunny Sunday drive, I’ll live.


8. How I Actually Intend to Use It

I’m not about to plug this into a black box and go to the beach.

The plan:

  1. Baseline exposure.
    ES (and BTC) allocations sized based on VAMS regime.

    • Strong Risk-ON → fully deployed, maybe even running my put-spread overlay.

    • Deflationary Risk-ON → deployed, but with more hedging / shorter leash.

    • Risk-OFF → light or flat, hunting hedges, income, or just waiting.

  2. Overlay with tactical tools.
    I still use local liquidity dashboards, tuned trend indicators and vol/stress metrics for entries/exits & sizing inside a regime. VAMS doesn’t replace those; it tells me when they matter more or less.

  3. Mental model.
    The biggest value is psychological:
    When that background flips from green to red, I don’t have to argue with myself.
    My macro checklist has already voted.

Here is a view of my ‘stress dashboard’ which is a super simple composite of the SOFR Spread, VIX, MOVE & DXY. Feel free to copy it and use it yourself.


9. The Road Ahead

This is Version 0.1. I fully expect it to embarrass me in public at some point.

Things on the roadmap:

There is a lot more work to be done and to be frank, the work never ends because all edges decay.. you’re in a constant fight against an ever-shifting landscape.

I’ve mulled over whether to release this publicly for free on TradingView or keep it proprietary and I’ve leaned towards the latter. This will be an ongoing ‘living’ project with no ‘done’ date.

I will share signal switches & updates via my X profile & this substack.


10. Final Thoughts: You Don’t Need Certainty, You Need Exit Routes

The point of this whole project isn’t to “beat the market.”

If you want max upside and max pain, you can just buy SPX, never look at a chart again, and let the Fed do whatever it does between now and 2035.

The point is to have system-driven rules for when the world changes.

That’s what this Macro Regime Engine is:
a way to translate a chaotic macro tape into a simple question:

“Is this a time to survive, or a time to press?”

Right now, Version 0.1 says: you can survive and play offense if you respect the regimes.

If you’ve made it this far and want to see how I iterate on this, hit subscribe, share this with the one trader friend who still thinks “macro is a meme,” and feel free to roast my parameter choices in the comments.

I’ll be in the War Room, arguing with a matrix of 20+ tickers so you don’t have to.

Fin.

— Durden out.

✊🧼

Not financial advice. Manage risk. The market’s real engine is liquidity.

Want the live dashboards behind these insights?

Free subscribers get research updates. Paid subscribers get live macro tools + signal alerts.