r/algotrading

At what point did you trust that your strategy really works and isn’t just overfit?

I have 2 years of backtesting results and one month of forward testing and it all looks good. Would you trust it enough to go live at that point? I’m still a little scared that it’s overfit and the second I go live it stops working but that’s probably just my anxiety speaking

reddit.com
u/Lower-Ad-1207 — 13 hours ago

Before you start any strategy development you should know this: an edge is a reason someone pays you

A thread here a few days ago asked how real quant edges get discovered. I left a short comment. This is the longer version, at the horizon most people here actually trade: minutes to a few hours.

I trade FX, crypto, and futures. I start with the payer. I do not start with an indicator.

Maybe forced traders. Information hits one market before another. Overnight inventory has to get out when the real session opens. Market makers get stuffed and fade. Participants underreact for an hour and then finish the move.

Then: what should I see if this mechanism is real?

That expectation becomes a feature. Then I define where the feature is supposed to go. That is the hypothesis.

Forced selling creates unusually high liquidation pressure, which can create a short-term reversal.

That is testable. Put it next to “RSI below 30 is bullish” and the gap is obvious. One names a payer, a thing you can measure, and a horizon. The other cannot die, so it cannot earn.

Before I build a strategy I test the cheapest relationship I can: an event study, buckets, a lead-lag regression. I want to see the effect I am claiming exists. If I cannot see it in a sort, a 47-parameter backtest will not find it for me.

The pipeline:

Thinking → thing to see → a feature → the hypothesis → test the hypothesis → trading production → risk control

“Explain it to me like I’m five” is the creative half. “Now prove me wrong” is the scientific half.

Three walks on that spine, all session-speed.

FX: equity lead into the session

ES, DAX, Nikkei print while half the FX book is asleep. The equity move is information. Spot has not finished digesting it. The lag is the trade: one to twelve hours, pair by pair. Same family as “yields moved, EURUSD has not.” The bond market prices policy first; FX is late.

Who pays: the slower FX book. Discretionary and slower systematic flow that still has to catch up.

  • Observable: ES / DAX / Nikkei session returns, G10 spot, the clock (Tokyo, London, New York)
  • Feature: equity impulse minus the FX move already printed (residual vs each pair’s beta)
  • Hypothesis: after a large overnight ES move, USD pairs that have not yet moved in the same direction continue toward that impulse over the next 1-4 hours of the following session, after costs
  • First test: event study. Condition on |ES overnight| above one sigma. Rank pairs by residual. The laggards should catch up. If the residual is already zero, there is nothing to collect.

A cousin on shock days: rank which pairs digest the print fastest. The laggards stay tradable for hours. That is the same mechanism with a news clock instead of a session clock.

Crypto: liquidation cascade, then classify

Perps publish the leverage. You can watch forced flow in real time. A liquidation is a market order into a falling book, which triggers the next one. 19 May 2021: bitcoin −30% intraday, about $8bn force-closed. The question after the spike is not “oversold.” It is: were positions closed, or flipped.

Who pays: the forced. Margin engines do not have a view. They have a threshold.

  • Observable: liquidation notional, open interest, funding reset, order-book recovery
  • Feature: liquidation-imbalance plus OI change (OI down = closed; OI flat/up = migrated) plus distance to the next liquidation cluster
  • Hypothesis: after a liquidation spike, if OI collapses and the book refills, the next 30-120 minutes revert. If OI stays elevated and funding does not reset, the next 30-120 minutes continue
  • First test: event study around liquidation clusters, split into those two states, hold 30-120 minutes, costs in. One bucket should reverse. The other should not. If both look the same, you do not have a classifier, you have a chart pattern.

Ride the forced flow while its intensity stays above a decay threshold, then stop. Fade the forced component, trend the organic one. Two hypotheses, same feed.

Futures: overnight inventory into the RTH open

Globex is a thinner auction. Size that built overnight is inventory, not a thesis. 9:30 ET is when cash, index arb, and the real book show up. Same observable, two claims, and which one pays is the open itself.

Who pays: overnight positioners who cannot hold the inventory into a full session.

  • Observable: ES overnight return, opening auction volume, cash breadth, related contracts (NQ, RTY, YM)
  • Feature: overnight move standardized by overnight vol, signed by whether the open confirms it (volume, breadth, gap fill/fail)
  • Hypothesis A (continuation): overnight ES moves that the opening auction and cash breadth confirm persist through the first 30-90 minutes of RTH, after costs
  • Hypothesis B (reversal): overnight ES moves that participation fails to confirm reverse in the first 30-90 minutes
  • First test: split opens into confirmed vs unconfirmed. Opposite signs. If both buckets drift the same way, the “open fade” is superstition. The classifier is the strategy. A gap-fill rule with no confirmation step is this feature with the payer stripped out.

A strategy is MARKET × MECHANISM × INSTRUMENT. ES lead into AUDUSD at the Sydney open, a BTC liquidation fade on the perp, an ES overnight unwind at the cash open: three leaves, one tree.

Most ideas die at the sanity check. That is the pipeline working. I do not start writing entries until the payer has a name.

u/aliaskar92 — 21 hours ago
▲ 6 r/algotrading+1 crossposts

Gold XAUUSDm based on moving average

This is the first algo I have built, I still feel I can get higher profit factor and bring down average loss trade value.

u/bouifat — 15 hours ago

Best way to compile fleets?

Hi everyone,

I am new to this and am about two to three months into my algo trading project. I have discovered about 200 Strategies which look promising and I have soon arrived at the conclusion that a fleet is better than a solo strategy. Now how do I best combine strategies? Maybe some have already mastered this and can share a few tipps. My strategies are mostly about indices, gold and some FX pairs. Thanks in advance!

reddit.com
u/hanslandar — 15 hours ago

Update on the “claude built me a strategy” post from last week

ok so last week i posted that claude helped me build a strategy and bracket setup but honestly i didn’t fully understand what was going on under the hood. got a lot of comments calling that out, fair.

so i went back and actually dug into it. spent the week building out a bucket screener instead of one single strategy. basically i’m tagging every trade with a set of factors (setup type, time of day, ticker, entry trigger, whatever) and grouping trades into buckets based on which factors overlapped. then i can see which combos of factors actually cluster around good win rates instead of just eyeballing one equity curve.

been paper trading this for a bit now and some of the buckets are looking really strong. one bucket with 13 trades is running 85% win rate and +12.94% average per trade. another bigger bucket with 20 trades is at 60% win and +4.80% average, which feels more like the “real” number once sample size grows.

still very much learning as i go and treating this as paper only until i have a lot more trades in the bigger buckets. small sample sizes can lie to you easily (that one bucket with 3 trades at 67% win and a 15+ profit factor is obviously not something to trust yet).

▲ 51 r/algotrading+2 crossposts

Built a free 24/7 market anomaly API — drop-in for Alpaca, Polygon, and Alpha Vantage

I was tired of hunting for long-tail events; and creating bootstrapped event-generators was a hassle. If I'm focusing on a project, why would I want to maintain a sub-project? So I built a once-and-for-all market simulator with events on demand (completely free & open-source, available to everyone)

It's a fake market data API — realistic OHLCV for any ticker, a tick stream that runs 24/7, and reserved tickers (CRASH, GAP, HALT) that action on command. Point your existing client at it to test code paths that only fire on market edge-cases.

This is a testing tool, to test long-tail events like run-ups, halts, SSE loss, and intraday flash events.

No API Keys needed. Simple curl to test:
curl 'https://cuckootrade.com/api/v1/alpaca/v2/stocks/bars?symbols=AAPL,CRASH'

  • Completely free, no API key, nothing to sign up for.
  • Historical bars : OHLCV for any symbol, 1-minute through yearly, back to 1970, on the real NYSE calendar — no bars on weekends or holidays. (https://cuckootrade.com/docs#bars)
  • Live SSE stream : SSE ticks that don't stop — nights, weekends, holidays included.
  • Scenario tickers : Reserved symbols that misbehave on demand (https://cuckootrade.com/docs#magic)
    • CRASH drops ~25% mid-month
    • GAPPY gaps overnight
    • HALTS drops bars mid-session,
    • SPIKEY wicks and reverts
    • FLAT sits at exactly $100.00.
  • Drop-in replacement for endpoints (switch alpaca.com/api -> cuckootrade.com/api)
    • Currently supports Alpaca, Polygon, & Alpha Vantage
  • Deterministic & Reproducible: Every bar is a pure function of (symbol, timestamp, seed), computed per request, no database. Same request, same bytes, forever — results are consistent between local host, CI container, and hosted service.
  • Live Sandbox to try it in a web browser ( https://cuckootrade.com/playground )

Worth saying: it's for testing, not backtesting. Synthetic data will make almost any strategy look profitable.

It's a portfolio project I'm still polishing, so feedback actually helps me. Tell me what's broken, or what provider or scenario you want next and I'll build it. Or you're welcome to contribute to the repository:

Open source Github: https://github.com/tj-miller-dev/stock_simulator

No paywalls. No fees. No login. Just the data.

u/StitchAndChill — 1 day ago

My algo was profitable. I wasn't.

Ran the numbers after 4 months live. Strategy was up. Green on the equity curve, win rate matched backtest, nothing broke.Then I actually sat down and added up server costs, data feed subscription, and the spread markup I was eating on every fill. Plus the buffer I keep idle just so a margin call doesn't wreck me mid-trade.Take all that out and the profitable strategy was barely breaking even. On paper it looked like a working system. In my account it looked like a very expensive hobby.

Nobody backtests their fixed costs. But at small size, they're not a rounding error, they're basically another drawdown that never shows up on the equity curve, it just shows up on your statement.I'd spent weeks tightening entries when the bigger leak wasn't in the strategy logic at all.

Anyone else actually done the full accounting on this? At what account size did fixed costs stop mattering for you?

reddit.com
u/Thiru_7223 — 2 days ago
▲ 1 r/algotrading+1 crossposts

Stocks Your Bots Love...

Do you guys have any stocks your Bots just love to buy and regardless of how strong the set up is...you just know its going to trailing loss (or hard stop)... Mine funny enough is Reddit. Im tempted to Blacklist it

reddit.com
u/mdawe1 — 2 days ago

Making my first algo, need some advice

I'm making a long only algo for both QQQ and equities, derived from the same base code but then honed in to each for more specific characteristics. My QQQ strategy currently has a 1.703 profit factor but its still in tradingview environment (so take it with a grain of salt?). I am absolutely killing it with preventing downturns in my algo and preventing large drawdowns, however, i think it is handicapping my long as for example I am vastly underperforming a strong environment. Is there any type of criteria you guys use to help loosen sell rules by having the algo identify strong trending markets or something along those lines? Or in general how do you help your algo capture the long term trend better without selling? This is my first algo, I am definitely a trader first, coder second so bear with me

reddit.com
u/Mr_Guy121 — 2 days ago

Regime filters for intraday strategies, does anything survive strict point-in-time lagging?

Posting this as a warning and a genuine question, because I've just spent two days learning something the hard way and I want to know whether I was chasing something that exists.

Context, deliberately vague: intraday mean-reversion system on liquid futures, 1-minute bars, ~4.7 years of tick data, one position at a time, realistic fill modelling (entries and stops at real tick prices, exits as resting limits rounded to the actual tick grid).

Raw performance, no filter: ~9,900 trades, 77% win rate, profit factor 1.05. High win rate, tiny edge per trade roughly half a tick on average. The mean-reversion tendency is clearly real, it's just not big enough per trade to cover costs.

What I tried: the obvious move was a regime filter trade only when conditions favour reversion, stand aside when they don't. I screened Kaufman Efficiency Ratio, RSI, ADX, Choppiness Index, Money Flow Index and MACD histogram across multiple time frames.

One combination looked outstanding. Profit factor 1.05 → 1.54. It held out-of-sample on three years the thresholds had never touched. It passed split-half consistency. It passed split quarter consistency beat the baseline in all four quarters independently, monotonically. By every robustness check I knew to apply, it was real.

Then I found the bug. Indicators were being merged onto each bar's opening timestamp instead of its closing timestamp. A 3-minute bar labelled 10:06 spans 10:06–10:09 and isn't knowable until 10:09 but entries at 10:06:30 were being gated on it. Up to three minutes of look-ahead, sitting directly in the entry decision.

That's fatal for a regime indicator specifically. These things measure whether price is trending or ranging. Give one a forward window and you've handed it the answer it was supposed to infer from the past.

Lagged everything to true availability time. Profit factor went straight back to 1.05, statistically indistinguishable from no filter. The entire apparent edge was the leak.

I then re-screened all six oscillators properly lagged ~48 buckets, each scored on both halves independently. Six beat baseline in both halves. Pure chance predicts about twelve. So the result is below random, with no coherent or monotonic structure, and the previously-best bucket now sits under 1.0.

What I'm actually asking:

  1. Does anyone have an intraday regime filter that survives strict point-in-time lagging? I'm not fishing for parameters. I want to know whether the category works at all, or whether a meaningful share of published "regime filter improved my results" findings are this same bug. My suspicion after this week is that it's far more common than people realise, because the bug strengthens your results, which means nobody goes looking for it.
  2. Is trend-vs-range even a coherent concept at 1-minute resolution? My working theory is that by the time any properly-lagged indicator can characterise the regime, the information is stale relative to a trade that resolves in minutes. Is regime filtering fundamentally a higher-timeframe tool that doesn't survive being pushed down to intraday?
  3. Given a real but very thin edge high win rate, average loser several times the average winner where would you look next? My instinct is selectivity over filtering: raise the entry threshold, take fewer and more extreme setups, cut the cost drag. But I'd rather hear if there's a structurally better lever than trade another dead end.

Not looking for anyone's edge. Mostly I want to know if anyone has a regime filter that's been through this specific audit and lived. Any advice would be greatly appreciated! I know I have something solid as a baseline I just need some ideas on filtering.

reddit.com
u/MusicisResistance — 3 days ago

the corpse list, what happened to all 143 missing s&p 500 names, with a source for each

143 tickers that disappear from free s&p 500 data, and what actually happened to each one, with a source link on every single row

for anyone who missed the earlier posts, first one measured how many old members you can't download anymore, 20-25%, second one measured what that does to returns, 0.4 to 1pp a year, and found the reused tickers were doing more damage than the survivorship itself, a few of you asked for the corpse list, this is it

each row has what happened, who bought it, the last day it traded, and the source, 38 of them are sec filings, rest are company press releases or exchange notices, nothing scraped off wikipedia, i opened every link myself

the split, 87 bought, 18 taken private, 18 merged, 6 renamed, 10 bankruptcy (6 came back out, 4 didn't), 4 split up, same shape as post 1, most of these names didn't die, they got bought, thats why the us bias direction isn't obvious the way india's is

one thing that looks like it contradicts post 2, i said 4 reanimated tickers there, this file flags 14 as reused, they're different things, 14 is every symbol that later got used by some other company at some point, 4 is how many actually broke my numbers with my dates and my data source, which ones bite you depends on your sample, so check the column against your own data instead of taking my 4

what to do with it, take your universe list, compare it against this one, count how many exits your source quietly dropped, thats your survivorship hole measured instead of guessed, and before you join old prices to new prices on ticker alone, look at the reused column, that splice is invisible in the returns, nothing warns you

sortable and searchable here, csv download on the page: https://financebroski.com/deaths.html

free, no signup, no email

caveats, this is the names that go missing from the free sources i've been checking, not every index change ever, it grows as i check more vintages, and the exit date is the last day the ticker traded, so for a merger that closes mid day thats the day it closed, if a row is wrong or i missed a name just tell me and i'll fix it and credit you, i'd rather it be right than look clean

still owe a few people the method from post 1, thats next

reddit.com
u/Finance__broski — 3 days ago

My soccer model held up on a true holdout but still lost to Bet365 what data would you add next / next steps

I’m a college student building a soccer prediction model and finally tested it on a season I had kept completely untouched.

The forecasting model itself held up reasonably well, but on ~1,700 matches de-vigged Bet365 probabilities beat every model I tested on log loss/Brier/RPS, and all of my pre-frozen betting strategies ended negative. My main one finished around -12.5% ROI.

Right now I already use things like goals/xG, shots/SOT, home/away splits, Elo/opponent strength, form, rest/congestion, standings, league scoring environment, and promoted-team uncertainty. I also have a decent amount of player, lineup and goalkeeper data, but the historical player/lineup experiments didn’t add much and exact pre-match availability timing was a limitation.
I’m planning to stop optimizing on historical results and run the system prospectively with timestamped odds, injuries and confirmed lineups.

What I’m mainly wondering:
What additional data would you look for at this point?
Manager changes? Transfers? Better injury/suspension history? Player market values? Weather? Travel? Referees? Tactical/style data? More detailed event/possession data?
Is there any dataset you’ve found that actually adds signal beyond what the market already knows?
Or would you stop adding features and focus on prospective validation / finding where the model disagrees with the market for a defensible reason?
Trying to avoid just throwing more variables at it until something backtests well.

reddit.com
u/Sufficient-Buy-8786 — 2 days ago

Youtube and reddit signal suggestions

Hi,

I've got my reddit post and YouTube transcript engines up looking for momentum plays and signals. I follow a bunch of the usual stuff.

If anyone has recommendations of other subreddits or YouTube channels to process, I'm here for it.

Thanks

reddit.com
u/UnlikelyJuice8796 — 2 days ago

Weekly Discussion Thread - August 18, 2026

This is a dedicated space for open conversation on all things algorithmic and systematic trading. Whether you’re a seasoned quant or just getting started, feel free to join in and contribute to the discussion. Here are a few ideas for what to share or ask about:

  • Market Trends: What’s moving in the markets today?
  • Trading Ideas and Strategies: Share insights or discuss approaches you’re exploring. What have you found success with? What mistakes have you made that others may be able to avoid?
  • Questions & Advice: Looking for feedback on a concept, library, or application?
  • Tools and Platforms: Discuss tools, data sources, platforms, or other resources you find useful (or not!).
  • Resources for Beginners: New to the community? Don’t hesitate to ask questions and learn from others.

Please remember to keep the conversation respectful and supportive. Our community is here to help each other grow, and thoughtful, constructive contributions are always welcome.

reddit.com
u/AutoModerator — 2 days ago

If changing the broker kills the strategy, was there ever really an edge?

I’ve been thinking about adding execution portability to the robustness checks I use before trusting an algo, but I’m not convinced it’s actually a fair requirement.

Basic problem is pretty simple

I can keep the signal logic, sizing and exits completely unchanged and still get a very different system once I change the assumptions around execution.

So instead of only stress testing parameters and market regimes, I’m considering testing the execution layer separately.

Something like this

Baseline

  • normal spread assumption
  • normal commission model
  • current slippage assumption
  • normal fill probability
Stress test A spread 25% worse
Stress test B spread 50% worse
Stress test C normal spread 1 tick adverse slippage on entry and exit
Stress test D spread 25% worse some adverse slippage small fill delay a percentage of limit orders left unfilled

I’d then compare more than just final P/L

The metrics I’m thinking about are

  • expectancy per trade
  • profit factor
  • Sharpe
  • max drawdown
  • fill rate
  • percentage of gross edge lost to execution
  • trade count after missed fills

Numbers above are just hypothetical stress parameters. I’m more interested in the framework than those exact thresholds.

Here’s where I’m getting stuck.

Say a strategy has a PF around 1.30 under the baseline execution model. A modest increase in spread brings it close to 1.10. Add a little adverse slippage and it drops below breakeven.

There are two completely different ways I can read that.

The first is that the strategy was fragile from the start. If a small change in trading costs wipes out the edge, I probably shouldn’t trust the backtest much. Second is that this is asking the strategy to survive something it was never designed for. A short-horizon system can have a real edge that only exists with a specific fee structure, spread, order type or execution venue. In that case the execution environment isn’t noise around the strategy. It’s part of the strategy.

That second case is what makes broker portability questionable to me as a robustness test. I wouldn’t expect a market-making system to keep the same economics after changing the fee structure. I also wouldn’t expect a tight scalper to behave the same after doubling its spread assumptions. At some point I’m no longer stress testing the same business logic. I’m changing the conditions that created the edge in the first place.

But giving the execution model zero robustness testing seems just as bad.
Backtest that only works at one exact spread and one exact slippage assumption feels way too brittle for live trading.

So I’m leaning toward measuring an execution degradation curve instead of using a simple pass or fail rule.

Basically I want to know how quickly the edge decays as execution gets worse.

A gradual decay seems a lot healthier to me than a strategy that falls off a cliff after one extra tick.

What I don’t know is where that becomes unacceptable.

For people running systems live, how do you handle this?

Do you expect an algo to remain profitable across moderately worse execution assumptions, or are you fine with an edge being tightly tied to one broker, venue or fee structure as long as those conditions are stable?

And if you stress test execution, what do you actually perturb: spread, commissions, latency, fill probability, slippage distributions, or all of them together?

reddit.com
u/qwqq123 — 3 days ago

Estimating current short interest from daily FINRA short volume

I built a model to estimate current short interest between official FINRA reports using daily short-volume data.

FINRA short interest is only published twice per month and with a lag, so there is a period where the latest official number can already be fairly stale. The model uses daily FINRA short volume and total trading volume to estimate how short interest may have changed since the last settlement date.

I evaluated it on 660,246 settlement windows covering 6,959 US-listed stocks. On a fully out-of-sample period from 2025 through July 2026, the estimated change achieved a +0.414 Spearman correlation with the subsequent reported change in short interest.

This is not meant to predict returns or identify short squeezes. The goal is simply to provide a nowcast of short interest while waiting for the next official release.

I wrote up the methodology, validation setup, formulas, experiments that did not work, limitations, and released the model weights here:

https://equibles.com/research/does-daily-short-volume-predict-short-interest

Equibles also shows the latest official short-interest figure next to the model's current estimate for covered US stocks. It's free and has no ads.

The model is available at HF:
https://huggingface.co/daniel3303/equibles-short-interest-nowcast

Curious whether people here would find this useful when analyzing stocks with unusually high short interest.

u/DanielAPO — 3 days ago

Back test data - Help

Good morning everyone, I recently wanted to backtest a new ea but when I try to download the data via Tickstory, it won’t let me download it. It comes back as: request timed out or rate limited. I thought it was a problem with TS Program and so I coded one in Python but it came out with the same result. I tried using a VPN and it worked for few seconds, afterwards, same problem… I only have 1 worker for the downloads but still it fails me everytime both on Tickstory and Python… Since I’m getting so much frustrated because I spent the last 24h not sleeping in order to download this mf data, is there a FASTER way to download them? I need the most precise data possible (ticks), since I’m currently working on a multi-currency scalper EA on MT4.

Thanks for your help, last time I did backtest was 2 years ago and I used datas from Dukascopy & Tickstory, I really don’t know why it’s not working now.

reddit.com
u/TrustedWallet — 2 days ago

Do Futures make sense at high margin rates?

I've been backtesting and paper trading an NQ scalping strategy for awhile. I went with IBKR as my broker based on the API and the low fees for API, data and trades. However, IBKR doesn't have discount margin rates on futures, and NQ has skyrocketed to well over 40k per contract. This means tying up quite a bit of money in either cash or t-bills (best I can find as an alternative to at least get some return). No matter how successful my strategy is (or isn't!), that's opportunity cost lost in other investments compared to discount margin. But switching to another broker would be a lot of work, plus potentially higher regular costs. Are others still using brokers such as IBKR for futures?

reddit.com
u/loudsound-org — 4 days ago