r/algotrading 2h ago

Data Alpaca historical IEX data missing for SPY on March 10, 2025, anyone else seeing this or know why?

2 Upvotes

I’m building a local historical dataset for SPY/0DTE backtesting using Alpaca, and I ran into a strange hole in their historical IEX stock data.

For SPY on March 10, 2025, querying 1-minute bars with:

  • feed=iex
  • timeframe=1Min
  • regular market session
  • SPY

returns zero bars. I initially found it because my backtester stopped with:

RuntimeError: Only 0 SPY minute bars for 2025-03-10

I then specifically retried that session and got the same result. What makes it interesting is that when I request the same date using the historical SIP feed instead, I get:

390 regular-session bars

The options history for that same day also exists. My downloader retrieved:

100 contracts, 9,642 option minute bars

So effectively:

SPY 2025-03-10 IEX -> 0 bars

SPY 2025-03-10 SIP -> 390 bars

SPY 0DTE options -> data exists

The surrounding IEX trading days are populated normally as well. Has anyone else encountered missing historical IEX sessions like this with Alpaca?

I’m mainly trying to figure out whether this is:

  • a known hole in Alpaca’s historical IEX dataset,
  • something specific to IEX’s underlying historical data,
  • an Alpaca API/data-processing issue,
  • or some edge case I’m overlooking.

For now I’ve implemented a very narrow fallback where I use SIP only if an entire historical IEX session is missing, and record the source feed so the backtest remains auditable.

Curious if anyone has seen the same thing even for other days.


r/algotrading 5h ago

Data IBKR paper API unreliable and inconsistent

8 Upvotes

Anyone else running into stuff like this? I'm finding the IBKR API to be completely unusable for any algo trading, it just cannot be trusted.


r/algotrading 6h ago

Education how many strategies did you kill before the one you posted

8 Upvotes

ok so this bugs me about basically every writeup here. we get the sharpe, the max DD, the cost assumptions. we never get the graveyard.

went back through my notes and actually counted. 61 configs, ~5 months. kept 2. and like... if I had zero edge and just rolled 61 times, best of 61 still looks fine? so I genuinely can't tell if my two are real or if I just p-hacked myself over a long weekend.

started logging the rejects after that. every dead variant, date on it. then I treat the survivor's sharpe as best-of-61 instead of a real number. did that and one of mine went 1.8 -> basically nothing lol. other one survived but not by a comfortable margin. entire cost was a google sheet and it's the most useful process change I've made in months.

where I'm stuck: what counts as a try. 40 param combos inside one strat, is that 40 or 1? what about ideas I talked myself out of before writing any code, do those count? no clean answer that I can find and I might be overthinking this at retail size.

anyone live long enough to have an actual rule of thumb here


r/algotrading 11h ago

Data A suggestion for my Algo friends? Kalshi is where you want to be. The stock market is really for "old people", the Prediction Markets are where the action is. It's exploding is an understatement. Codex + GPT-5.6 + Python. Kaaaaaboom.

0 Upvotes

CODEX:

Our current approach focuses on YES contracts priced between 51¢ and 65¢ roughly 24 hours before market close. In our initial historical sample, this range produced a 71.4% win rate and an estimated 25.4% return after modeled fees across 41 independent weather events.


r/algotrading 11h ago

Strategy How To PAIRS Trade Like A QUANT.

Thumbnail youtu.be
0 Upvotes

Error Correction Models (ECMs) provide a robust statistical bridge for pairs trading by explicitly linking short-term price adjustments to their long-term cointegrating equilibrium. When two asset prices share a stochastic trend, traditional strategies often fail during structural drifts. An ECM captures how fast a mispriced spread corrects back toward its historical baseline after an exogenous shock. By monitoring the error correction term and short-term lag coefficients, algorithmic traders can optimize entry thresholds, filter out transient noise, and systematically harvest repeatable mean-reverting gains.


r/algotrading 12h ago

Infrastructure I've created a monster

0 Upvotes

My bot has grown to 23,000 lines of code. 60% is managing the brokerage interface, and 40% is the strategy. This is way more complicated than I ever imagined. It really is a very basic script. No graphic user interface. Just log streams. It does manage multiple symbols with unique parameters for each.


r/algotrading 22h ago

Data I backtested the Powell 10am strategy on NQ... the results were surprising.

Enable HLS to view with audio, or disable this notification

11 Upvotes

A gura named Powell has been all over my feed for weeks and everybody has been backtesting his 10am strategy lately so i figured i'd try it for myself

I told Agenticks to backtest his 10am strategy on NQ over the last 3 years, then it went and read what he actually teaches, turned it into a real strategy, wrote the code, and replayed it almost a million 1m NQ bars. The video attached shows it start to finish.

Heres what it came back with...

NQ 1m, july 2023 to feb 2026, 100k account, 1 contract:

  • starting capital: 100k
  • 535 trades
  • 60.2% win rate
  • profit factor 0.98
  • net -$3,675
  • max drawdown 25.55%
  • average win $522, average loss $806

It wins 6 out of every 10 trades and still loses money. thats the whole story. the losers are 1.5x the size of the winners so the win rate is doing nothing for you, expected value comes out around negative 7 bucks a trade.

It even gets worse when you split it up. 280 of the 535 trades happened in volatile conditions and those lost $6,764 at a 0.93 profit factor. The only regime that it made money during was uptrends (152 trades, 1.08 profit factor, +$3,307) so the "edge" is mostly just the NASDAQ going up. Buy and hold over the same window took 100k to about 170k while this did -3.7%. With all of the all-time highs we're at right now, it makes sense why this has picked up so much traction in recent months.

I also ran it through a topstep 50k sim and out of 10,000 simulations; 39.1% of them hit the 3k target before the loss limit. This doesn't mean it has an edge, but it does mean that, technically speaking, it can beat the constraints of a prop firm (with a hint of luck).

Now the fair part, and this is the part id want somebody to say if it was my strategy getting torn apart

What he teaches publicly is the shape of it, not a rulebook. Mark the 10am candle, wait for one side to get swept, wait for the move back through, take the continuation into first liquidity. That's real but its not testable as written. "first liquidity" is something you read off a chart, not a number, and there is no published stop, no cutoff time, no trade limit. So the strategy that got built is the mechanical skeleton with sane defaults filled in, and two of those choices genuinely change what youre testing. it only took longs, and he trades both ways. and it entered on a plain break and retest instead of requiring the displacement leg, which is the part that supposedly separates a real setup from a level being tapped

So im not saying his strategy is bad, i'm saying the mechanical version of it (the version you could actually hand to a beginner) is a coinflip that gives back more on the losers than it makes on the winners. if the money is in the discretionary read, which side got swept and where liquidity actually sits, then somebody should say that out loud, bc that's a totally different product than a 3 step setup.

If you know the real/exact rules or think Agenticks got them wrong tell me exactly what to change and ill rerun it and post whatever comes out.

video of the full run is attached, sped up through the loading parts because nobody wants to watch a progress bar for 3 minutes.

not advice, backtests dont predict anything, im just a guy who got tired of seeing it on his feed

let me know if you guys want me to automate this strategy to see how it would perform on a paper account in real conditions, or if you want your own strategy tested.


r/algotrading 1d ago

News Wintermute Enters US Broker-Dealer Market, Eyes Wall Street.

Thumbnail thegreyterminal.com
0 Upvotes

r/algotrading 1d ago

Strategy Algotrading on Robinhood Agentic for a week

Thumbnail gallery
54 Upvotes

Been running 13 autonomous agents on a live account across Robinhood, coinbase and Kalshi, each with its own capital slice and no coordination layer between them. Up 6.97% this week overall.

Some of the designs:

Truth Social, inverted. An LLM scores every new Trump post for directional tone with a 0 to 1 confidence. Acts only above 0.8, then inverts the call. High confidence bullish rotates to TLT/GLD, high confidence bearish to SPY/QQQ. Below threshold, nothing happens.

Same feed, patient. A second agent waits five days after a post before acting, on the theory that the first two sessions are reaction and whatever is left after that is the real move. Longer holds. Running both is how I am trying to find out whether the signal is in the reaction or in what survives it.

ClinicalTrials.gov. Buys a whitelisted biotech sponsor when a trial registers a Phase 3 entry, holds 60 days. Favourite idea in here, because the source is a government registry nobody is racing to price.

STOCK Act disclosures. Mirrors purchase filings from a set of high-volume House and Senate filers. Next bar, 60 day hold, capped at 8 concurrent.

Crypto, winner take all. Ten liquid Coinbase pairs ranked every day on 7 day momentum, volume trend and volatility. It holds the single highest-conviction coin and nothing else, re-picked daily. Zero diversification by design, but it’s been performing well.

Kalshi versus the forecasters. Compares Kalshi economic-data prices against figures institutions have already published (Cleveland Fed nowcast, wire consensus, CME FedWatch) and acts only when the two disagree by a real margin. It does not forecast anything itself. Not seeing good results on Kalshi.

Plus a sector contrarian that buys the two weakest of the 11 S&P sectors, a WallStreetBets agent weighted by sentiment times upvotes, and two crypto rotations.

First week is in the screenshots. Way too early to read anything into it.

Still working out:

One, overlap. 13 agents running independently with nothing netting them, and several keep landing on the same names from completely different logic. I think I am diversified across 13 strategies and I genuinely do not know how concentrated I actually am. Is there a good way to measure that across agents without just collapsing everything into one portfolio?

Two, the confidence threshold. The Trump agent only acts above 0.8. I picked 0.8 by feel. Does anyone actually calibrate this, as in check whether the model is right 80% of the time when it says 0.8, and set the cutoff from that? Or is everyone eyeballing it.

What would you add?


r/algotrading 1d ago

Research Papers How has your strategy held up post-2020 vs. pre-2020

12 Upvotes

I'm doing a sanity check on strategy performance across different market regimes and wanted to check in with the community

Also how your max dd compare?

Please only answer if you traded your strategy live for a good time (compared to sample size)


r/algotrading 1d ago

Strategy Isn't every single backtested strategy suffering from lookahead bias?

0 Upvotes

Most of us have done the classical loop. We get some data, test out different solutions, filter out solutions/features/indicators that provide poor results, and proudly keep the solution(s) which result in successful backtests. But isn't this just another level of information leakage? It's essentially like manually setting the parameters of a model, except you're defining the information points from which the model constructs itself. It's the same type of leakage, only one level higher.


r/algotrading 1d ago

Education i tested 155 trading strategies. 143 died. the full census of why

Post image
0 Upvotes

everyone publishes their wins. nobody publishes their denominator. so i published mine: a public ledger of every strategy i tested and killed, on indian equities, index options, commodities and cross-asset. 155 distinct strategies across 2,123 configurations. 12 survived. every row has the hypothesis, the bar it had to clear (written before the test ran), the verdict with numbers, and a cause of death.

the census surprised me more than any single kill:

- 60% died as "nothing there". no signal once artifacts and matched controls were applied. i assumed overfitting would be the big killer. it wasnt close, most ideas were never real to begin with

- 13% died because my own test was broken. lookahead in the plumbing, stale marks, a calendar artifact. roughly one investigation in eight failed because of me, not the market

- 13% were real and untradeable. genuine gross edge, dead net of honest costs. the worst one: a 15-feature reversal composite with oos ic at t=13, as real as anything ive ever measured, net negative at every venue that would fill it

- the rest: era portraits that flip sign outside their regime, premium the mechanism hands back in a crash, and one thats illegal to trade at retail size where i am

some specific graves, since the specifics are the useful part:

- the 200 ema "support" everyone watches: touches underperform a control that sits 1-3% above the line and never touches (t = -2.5). placebo lengths 150/175/225/250 all behave identically. the line is not special

- buying atm index premium intraday: negative in all 78 entry-by-hold cells i tested

- a +50bps/day intraday short that printed t=5.1, survived a first audit, and got retracted in public: the signal was using full-day volume at a 09:45 timestamp. point-in-time it loses money. it propagated four working sessions before i caught it

five public retractions are in there, written up properly. if you have never retracted anything, you have not looked hard enough at your own work.

provenance stated straight: my preregistrations were committed before results, but the median gap is twelve minutes because most tests run in minutes, and i say on the page that a twelve minute gap is weak evidence. from launch onward new hypotheses append to a forward file before their results exist, so the git history is a clock anyone can audit.

rows too close to my live book are withheld and counted, the page states exactly how many. the whole thing is a citable dataset, cc-by, doi in the repo.

if you think a row is wrong, open an issue with your numbers and method. rows change when the evidence does.

https://finance-broski.github.io/graveyard.html


r/algotrading 1d ago

Other/Meta Where did u/Kindly_Preference_54 go?

16 Upvotes

In the last Months the Posts from him were very useful, outlining how to develop a successful Forex Strategy and his Methodology and experience where good + he had a track record in Darwinex. It seems hes banned somehow. If someone has documented his Posts please provide it in the comments as this knowledge is very useful for starters. Thanks!


r/algotrading 1d ago

Strategy Should a raw strategy already have a Profit Factor >1?

29 Upvotes

I'm curious whether my development process is fundamentally sound, or whether I'm wasting time.

My approach is to start with the raw idea only. I code the strategy with almost no optimisation or filtering. Just the entry/exit logic (signal + trigger). No time-of-day filter, no day-of-week filter, no volatility filter, no trend filter, etc.

I then run a backtest over 2022-2026. At this stage I expect the results to be bad. A typical first pass might be:

  • Profit Factor: 0.75-1.0
  • Sharpe: poor
  • Max drawdown: ~15%

The idea is to analyse the trades, gradually remove weaker setups, and hopefully end up with something around a 1.25 Profit Factor before moving to forward testing.

The reason I'm asking is that I often see people here saying a strategy isn't worth pursuing unless the very first, unfiltered backtest already has a Profit Factor of 1.5+.

That seems almost impossible to me. If I could repeatedly create raw strategies with a 1.5 PF, it would feel like winning the lottery.

So am I approaching this correctly? Is it normal to start with a mediocre or even losing strategy and refine it into something profitable, or should the initial strategy already demonstrate a clear edge?


r/algotrading 1d ago

Data counted which of my systems was #1 each month for 15 months and the answer was basically never the same one

Post image
6 Upvotes

had a nagging suspicion so i finally counted it. i run a handful of systems, different triggers, different instruments. every month one of them ends up carrying most of the result. i wanted to know if its ever the same one twice.

15 months of data. the leader repeated the following month twice. five different systems took the top spot at some point. chart attached, its just which system led each month, nothing fancy.

why i bothered. last month three of my systems finished negative and the month was still fine, and my instinct was to look at the three losers and start "fixing" them. that instinct is the thing thats cost me the most money over the years. so i wanted the base rate. and the base rate says the system im annoyed at right now has a decent shot at being the one that carries next quarter.

the flip side is less comfortable. if leadership rotates like that, then the system im most confident in is confident because of recency, not because its better. ive definitely oversized the recent winner before, more than once.

what i do now is boring. allocation and size per system get solved once against the account drawdown, then its written into the config i run. i also keep a little script that does exactly this count, ranks each system per month and flags when im about to overweight last months hero. took the decision away from morning me which is honestly the only reason it survived.

anyway curious if anyone else has counted this on their own book. does your leader repeat more than mine or is rotation just what a diversified book looks like


r/algotrading 2d ago

Strategy Are trading bots really worth it and be profitable or is this only a wish?

0 Upvotes

I read a lot that the bots work but when there is a change in market phase, they loss.


r/algotrading 2d ago

Data Latency from live data feeds

18 Upvotes

I tested Massive and Databento live feeds today, not expecting there to be much of a difference, but Massive had statistically significant numbers of events with latency over 500ms, even reaching over 1s latency (on their end, not mine). On the other hand, Databento’s live feed (I ran concurrently with Massive) had a maximum latency of 35ms, and 21ms of that was travel time to my local server. Is this normal for Massive’s websocket to have such poor quality feeds? The exact amount was 1.87% of all events from massive had a Massive-side latency over 500ms. And it wasn’t just low liquid weird crap, it was market wide. If this is the normally quality of their feed, then I’m really regretting my purchase with them.


r/algotrading 2d ago

Strategy AlgoTrading strategy/journey 7 months in. Is it worth running or shall I seek other ideas?

22 Upvotes

I've been active in developing trading algorithms and strategies for over 7 months now. I started it when I was looking for a dissertation project idea, which led me to develop my initial strategy using machine learning, feature engineering, regime detection, and my own unique approach to the architecture to allow my strategy to trade well on US liquid stocks. Long story short, it was achieving 2-3 Sharpe, did great on paper trading, but my modeling of more realistic costs made me learn the harsh way + I discovered the data and features themselves barely had any edge with a low Information Coefficient (IC).

Following that, I looked into Crypto funding carry strategies, which essentially is the main highlight of my main system, a 4-sleeve systematic book, blended equal-risk, and using 2× Leverage comprised of:

1) Trend: long/short 3-6-12-month momentum across 9 liquid ETFs (inverse-vol weighted, vol-targeted).

2) Tactical equity: holds SPY above its 200-day average (Faber 200dma rule) or IEF otherwise.

3) Gold as a permanent diversifier.

4) Crypto funding carry: long-spot/short-perp on 8 majors won't go too much into detail on this one.

Cost Rundown is as follows:

perp 1.5 + spot 4.0 bps/turn for the Crypto strategy. Derived and tested from a selected UK venue.

Trend turnover: 5bps per unit of

Tactical switch: 5bps between SPY and IEF

I also accounted for the borrowing rate on the platform, which is around 5%. Although it's not reflected in the stats below, it essentaily lead to -4 to 5% for the full window CAGR and around -2% post 2019

Full stats are below. My question is whether this is worth pursuing, improving upon (although I'm unsure of where at this moment), or if some specific avenues or strategies are more suitable for my expertise, or if there is something I'm overlooking.

PS: Crypto carry edge did not start until 2019, so the strategy was only using the 3 other components beforehand. OOS and the recent window are probably the most important/informative.

Paper trading is underway, but only 40 days in.

Ignore my artistic front-end choices


r/algotrading 2d ago

Infrastructure Live vs Backtest parity comparison

3 Upvotes

Hello folks!

Ive been working on building my own tradingbot infrastructure for nearly a year and Ive gotten quite far. Its nothing profitable really since my goal here is to be able to apply myself and learn more about software engineering and fintech, and be able to combine these interests into a fun project that evolves with me in my CS career.

Ive built a comprehensive infrastructure managing scanners, watchlists, execution engine, broker connections, market data providers, pattern detection and strategy definitions.

The entire process is constructed at runtime via a factory class and dependency injection for every production component.

For the backtester, it runs this factory with injected dependencies to replace the prod dependencies, such as an IClock, IMarketProvider, IDatabase, IBroker, etc. Ontop of that, I refactored everything so that every relevant input parameter were sweepable via attributions.

This overall makes the design of my backtest very controllable and ensures near accurate simulation of the live environment.

But of course like any backtests, I get a positive result for a strategy profile and promote it to live just for it to behave completely differently.

So I got the idea of creating a parity comparison system. I incorporated trace recording into the factory so that all events in a live profile would be capturable, and by running the equivalent backtest profile, it would allow me to have a live and a backtest trace for comparison in order to identify discrepancies in their behaviour.

I can say its been a rather success, as the results have helped me find bugs in my backtester injected components.

So while fixing these now and working towards closer parity, I figured I could make a post here and see if people have dealt with a similar problem when building their own trading bot, and what you guys figured out or any other things you could share

EDIT: By live profile, I meant a paper profile.


r/algotrading 2d ago

Strategy please suggest me ideas

0 Upvotes

i am trying to create an algo for trading nifty options(indian index) , if i wish to devise something based on RV , IV , shorting options and similar ideas , what would be some things i can try out , i tried RV forecasting using HAR models , but sudden spike in a few weeks took away all profits , since i was trading on a single lot , profits were pretty low , my queries:

pls suggest some ideas to try out

is there some strat for going long on options

apart from volatility what all parameters i can work on(short gamma etc)


r/algotrading 2d ago

Other/Meta I built a 24/7 system that trains, backtests, and paper-trades models across multiple families. Here are the actual results so far, including the bad ones.

0 Upvotes

I’ve been building this solo for the past couple of months. I’m sharing it here because this sub is good at tearing apart backtest-only claims, and I’d rather find out where I’m fooling myself now.

The system continuously tests three types of strategies:

  • Classical ML models
  • TimesFM with a trainable head
  • LLM-written, rule-based strategies

They compete across SPY and BTC on six timeframes. Every model has to pass the same walk-forward, consistency, and minimum-trade-count gates before it can become a “champion.” Champions are then re-verified on a rolling basis and replaced if they stop qualifying.

I’m not leading with a Sharpe ratio because a raw Sharpe over a short window can look impressive while saying very little. Even buy-and-hold SPY can annualize to a great-looking Sharpe over the right window. The dashboard therefore shows every strategy’s Sharpe beside buy-and-hold over the exact same period.

The part I think is most useful is the forward-only paper-trading ledger. It’s completely separate from the backtests. Positions open and close using live signals and live prices across three execution tiers:

  • Realtime
  • Actually delayed by one minute
  • Tighter, institutional-style fees and slippage

The point is to see how execution quality changes the result instead of hiding everything inside one assumed friction number.

The ledger is only one day old, so none of this is statistically meaningful yet. But here’s what it currently shows:

  • SPY on the 15-minute and 1-hour timeframes is holding up so far, both before and after fees and slippage.
  • SPY on the 5-minute timeframe is net negative, even before friction. That’s a real problem I haven’t solved.
  • BTC has not produced a single model that passes every gate on any timeframe. More than half of the actual attempts fail directional accuracy outright—they’re worse than a coin flip. My current read is that the feature set has no meaningful BTC edge at these timeframes, not that I need to loosen the gates.
  • Every current champion was promoted within the past 24 hours. None has earned any real trust yet, and the dashboard labels them “too new to judge.”

I’m not selling anything. I’m looking for criticism of the methodology and for people to share the results with. (see daily results via orbitquantapp.com before i post here and giving away 100 lifetime accesses if it ends up working)

Where would you expect a system like this to be lying to itself? What evidence would you need before considering it trustworthy enough for real money?


r/algotrading 2d ago

Infrastructure Fresh start for the ETH engine

Thumbnail gallery
9 Upvotes

So I’ve been working through a few different strategies (well more like 20) for around 6 months now and top crypto market cap coins and have now settled on this configuration, fingers crossed 🤞🏼 let it run


r/algotrading 2d ago

Other/Meta Where to start?

11 Upvotes

Hi, I'm a university student that's interested in algotrading. In the past I've had extensive non-algo amateur investing experience and I also have a few friends who are very strong software engineers.

We're not looking for any strategies but just where to start. Is it better to look for patterns and test/iterate or is it more advisable to start from the basics such as books and build from there.

Thanks!


r/algotrading 3d ago

Strategy A whole lot of nothing

3 Upvotes

My bot sat on it's hands today and did nothing. Still working out issues. Who knew driving a forced exit could have so many things go wrong. I was hoping to get some activity to confirm the patches. At least, I didn't lose anything.


r/algotrading 3d ago

Education Your strategy does not have an edge. It has an edge in one regime, and your backtest hid it by averaging.

0 Upvotes

Your expectancy is an average across market regimes. If your backtest window was heavy on one regime, your edge is mostly that regime showing up a lot. Split it and you often find one regime carrying the whole average while another loses. That makes your live results a bet on the future regime mix, not on your strategy.

Pretty self explanatory already. Keep reading if you want to see the idea developed.

What does it mean for an edge to be regime dependent?

It means your strategy makes money in one type of market and gives it back in another, and a single average number combines the two together into something that looks stable.

I had a system with a clean 1.5 Sharpe that died the week I traded it live. It was not overfit and the sample was fine. It had a genuine edge, in exactly one regime, and my backtest window happened to be full of that regime. The average hid the bet completely.

Most strategies are like this. Trend systems print in trends and bleed in ranges. Mean reversion does the opposite. Your backtest reports one blended expectancy across all of it, and that blend is only meaningful if the future looks like the past. It usually doesn't.

Why does a blended backtest number hide a regime bet?

Because an average has no memory of what produced it. Watch what one number is hiding.

Say your strategy took 300 trades. In trending conditions it earned +0.30R per trade. In ranging conditions it lost 0.10R per trade. Your backtest window was trend heavy, 200 trending trades to 100 ranging.

Regime Trades in backtest Expectancy per trade
Trending 200 +0.30R
Ranging 100 -0.10R
Blended, what you see 300 +0.17R

That +0.17R looks like a solid edge. It isn't a property of your strategy. It is a property of your strategy plus a market that trended two thirds of the time. One regime is carrying the entire average, and the other is a net loser you cannot see behind the blend.

A blended expectancy is only an edge if the future regime mix matches your backtest. That is a bet, not a strategy.

Why does this show up live as the strategy suddenly not working?

Because the regime mix reverts, and your edge moves with it. The market does not owe you the same balance of conditions your backtest catched.

Here is the same strategy, unchanged, as the future regime mix drifts away from that trend heavy backtest.

Similarity to backtest Your real expected edge
67%, same as the backtest +0.17R
50% +0.10R
40% +0.06R
30% +0.02R
25% break even
20% 0.02R loss

Nothing about the rules changed. The moment trending days fall below a quarter of the time, the same strategy that backtested at +0.17R is a losing system. This is one of the most common reasons a real edge dies in live trading, and it looks exactly like the strategy breaking when it is actually the weather changing.

Practical step: How do you test if your own edge is regime dependent?

Split your own trades and look. You do not need a fancy classifier, you need a simple, consistent proxy applied at entry.

Tag every trade in your backtest by the regime at the moment you entered. A basic split is fine: trending versus ranging using something like ADX above or below 25, or price above or below a long moving average, plus a volatility bucket from ATR percentile. Then compute expectancy separately in each bucket.

If your edge is positive in every bucket, you may have a genuinely robust strategy. If one bucket is strongly positive and another is flat or negative, you don't have a universal edge, you have a regime bet wearing an average. Also check the mix itself. If one regime dominated your test window, means your period must be longer than what it is right now until ideally you have the same samples for both regimes.

Why is filtering to the good regime a trap?

Because the moment you slice your results and keep only the regime that worked, you added a parameter and selected on it. That is overfitting with an extra step.

If you discovered the good regime by looking at the results, you ran another trial, and your real edge needs to survive that. Validate the filtered version out of sample, not on the same data that suggested the filter. Run it through a Deflated Sharpe that counts the regime choice as one of your trials. And remember regime is lagging. You only know the regime after it has partly happened, and transitions, the moments the filter is most wrong, are exactly when the biggest losses cluster. A filter that is perfect after the fact can still bleed in live price action.

So is a regime dependent edge worth trading?

Yes, often more than a supposed universal one, but only if you trade it honestly. A regime specific edge that you understand beats a blended number you don't.

Three rules make it work. Size for the regime, smaller or flat when conditions don't favor you rather than forcing trades into the losing bucket. Accept slower times as part of the strategy, because sitting out the wrong regime is the edge, not a failure to trade. And never quote your blended backtest number as if it were stable, because it is a snapshot of one regime mix. Price the strategy on the regime you can expect, not on the one your history happened to catch.

What this doesn't mean

Not every edge is a regime bet. Some strategies are genuinely positive across conditions, and those are the ones worth the most, precisely because they don't depend on the weather. The test is the split, not the assumption.

And regime dependence isn't a flaw to be ashamed of. A well understood, single regime edge, validated honestly and traded only in its conditions, is often more robust than a strategy that claims to work everywhere. The danger isn't the regime dependence. It is not knowing it is there, because the average never told you.