Research

Macro Regime Engine: Monte Carlo & Walk-Forward Results

Spent the last week rebuilding the MRE in Python & Javascript so I'd be able to run forward analysis and the results were nothing short of brilliant.

March 17, 2026by @DurdenBTC

I had an egregious thought pop into my head last week on a muggy Monday night.

“What if TradingView goes offline, gets hacked or worse.. they change their PineScript implementation or the assets they offer and my MRE (Macro Regime Engine) is no longer viable.”

Python version of the MRE. Performance shown vs $SPX starting in 2006.

Solid; it doesn’t match TV’s MRE 1 for 1 but it gets close enough (minus the drawdown which I wasn’t happy with but it left room for improvement).

Backtests are backtests.. everyone’s got a strategy that looks good in hindsight. The question is whether the edge holds up when you start shaking the tree.


Monte Carlo Analysis

For the Monte Carlo jitter test, I ran 3,000 simulations randomizing every entry and exit date by ±2 trading days. This simulates real-world execution slippage, you’re not always going to catch the exact bar the regime flips.

The result: 100% of simulations were profitable, 98.3% cleared an 8% CAGR, and the median profit factor was 9.48.

The 5th-to-95th percentile CAGR range was 8.2% to 9.6%: extremely tight.

The strategy simply does not care if you’re a day or two late on execution.

That’s the hallmark of a signal that’s capturing a real macro regime shift, not some fragile micro-timing edge.

I also ran 3,000 bootstrap simulations resampling actual trade returns with replacement.. 100% profitable, 91.2% above a 5% CAGR, median 8.3%.


Walk Forward Analysis

The walk-forward is where it gets interesting.

I used an expanding window: 5-year train, 2-year test, 1-year step, giving 15 out-of-sample folds spanning 2011 through early 2026. 14 out of 15 folds were profitable out-of-sample.

The one losing fold (2021-2023) posted a -0.9% CAGR.. basically flat during a period where the macro regime was genuinely ambiguous post-COVID.

Mean out-of-sample CAGR was 8.9% with a 0.90 Sharpe and -8.9% average max drawdown.

Here’s the kicker: the out-of-sample Sharpe was actually higher than the in-sample Sharpe (0.90 vs 0.83). That’s an 8% improvement out of sample, the opposite of what you see with curve-fitted garbage.

Conclusion? Zero overfitting signal.


Takeaways

The bottom line: the MRE isn’t a backtest artifact.

It’s a regime classification system that identifies persistent macro environments.. Goldilocks, Reflation, Inflation, Deflation, and positions accordingly.

The edge comes from the macro regime itself being slow-moving and persistent, not from optimized parameters or cherry-picked lookback windows. When you jitter the timing, the returns barely move.

When you walk it forward through two decades of wildly different markets: GFC, QE infinity, COVID, the 2022 rate shock, the 2024-25 AI boom, it keeps working.

That’s the whole point. You don’t need to predict the future.

You just need to correctly identify the present.


Extras

I’ve been floating the idea of potentially releasing this on DurdenBTC.com as part of the members area. I’ve already done the work to port it from Python to Javascript but I need to stress test it. I don’t want people following this as a signal, its merely a “backup” to the actual MRE on TradingView.

However it would be good for a confluence and could be interesting for folks to track if they wish. I’m still mulling this idea around in my head.

Anyway, that’s all for today.

Thanks for reading!

— Durden out.

✊🧼

Want the live dashboards behind these insights?

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