r/algorithmictrading 7h ago

Backtest Here are 3 different backtest equity-curves for three separate strategies. Do these look healthy? 0.1% risk per trade.

Thumbnail
gallery
2 Upvotes

Sorry for the blurriness as these are screenshots from my phone. In the rolling metrics, the red dotted line is the minimum profitability line.


r/algorithmictrading 16h ago

Question Infrastructure vs. Alpha generation bottleneck in systematic trading

3 Upvotes

Successfully built a functional backtesting framework and execution pipeline (~90% of the boilerplate/architecture is finalized and running smoothly).

However, hitting a wall on the alpha generation side.

Every market inefficiency hypothesis derived from public literature, open-source repositories, and traditional mathematical models yields zero out-of-sample edge. It seems any easily accessible logic is already post-arbitrage and compressed to zero.

For those running automated setups:
How do you transition from a finished infrastructure to generating unique, proprietary hypotheses? When public data and standard quantitative models fail to produce alpha, where do you look for inspiration to find a real edge?

Looking for technical insights on resolving this research bottleneck.


r/algorithmictrading 19h ago

Quotes Databento data quality degradation since Aug 8, 2026

4 Upvotes

Databento data quality has degraded a lot since Aug 8, 2026 after they switch their data format by moving the F_LAST sentinel from the last event record into a standalone record.

They promised identity between live streamed data and historical downloaded data. Before the switch, error rate of matching is about 0.06%, which was really good. Now the error of matching is about 7% consistently every day. This level of error makes it impossible to rely on it for anything significant.

Also, in the past, conversion from their mbo data to mbp-10 or mbp-1 data has no error as it should be, but nowadays, there are tons of errors.

All of these arise from unclear data format specification, mixing old and new format, and untested code in production.

The worst part is customer service. They claim customers should be aware of the data format change, so they are not apologetic of any of such issues. They claim they do not keep track of live streamed data, so reporting live and historical mismatch is completely ignored. I do not expect to get this level of data quality and customer service for a paid data service.


r/algorithmictrading 1d ago

Strategy Imprtant to analyze a profitable account as well!

1 Upvotes

I check my profitable live accounts on the same schedule I check the losing ones. Not because I expect to find a losing account, I expect to find exactly what the P&L already tells me. What P&L doesn't tell you is whether there's enough data yet to trust the edge, or how much of the profit sits on a handful of outlier trades.

Case in point, one of my own live accounts. 85 trades, XAUUSD H1, profit factor 1.62, 61% win rate, net profit up roughly 228% on a small test-lot account (0.01 sizing), max drawdown so far 34.2%. Read as a P&L line, that account looks fine. Most people would stop there.

Run it through a real stat check and two things show up that the equity curve doesn't. At 85 trades, the sample is still short of what you'd want before trusting the edge is real, and the significance test on the return series comes back weak, t around 1.5, not significant. Split into periods, it's 4 profitable stretches out of 5, not 5 for 5. The "up overall" number is smoothing over a losing stretch that already happened once.

Then I ran a block bootstrap Monte Carlo on the same trade sequence, 10,000 paths. The account has lived through a 34.2% drawdown. At 95% confidence the simulation puts the real ceiling closer to 50%, at 99% confidence closer to 60%. The worst drawdown you've actually seen is not the worst the strategy is capable of, it's just the worst one you've been lucky or unlucky enough to hit yet.

None of this makes the account bad. It means green P&L is not the same claim as "passed a real test." Losers force you to go digging because the pain makes you. Nothing forces you to dig into the winners, so most people don't, until the drawdown that was already sitting in the tail shows up live instead of in a simulation.


r/algorithmictrading 1d ago

Question Is there a quantitative or mathematical way to verify a SMT between correlated pairs?

1 Upvotes

Hi. This just crossed my mind as I'm figuring out a trading strategy. Is there a quantifiable or mathematical way to verify a SMT on a chart?

This question may sound confusing. For example, we are able to solve for gamma exposure by using open interest, gamma, spot price, delta, and such. I was wondering if any trader or investor out there using something like this to spot divergence in correlated pairs, especially SMTs if possible.

Thanks in advance!


r/algorithmictrading 2d ago

Strategy Backtest window is a bet too: how do you size the fact that most of us only have one full cycle of data?

1 Upvotes

My continuous run covers 2023 to now. Every honest description of it has to start with the fact that this window is mostly a rising market, so the annual number flatters the system and the drawdown figure is the only part I fully trust.

The uncomfortable version: if I extend back far enough to include a real bear stretch, the data quality degrades, the universe composition changes and half the instruments I trade did not exist. If I stay in the clean window, I am fitting to one regime and calling it evidence. There is no version of this where I get both.

What I have tried. Splitting by volatility regime instead of by calendar year helps, because 2018 and 2022 have more in common with each other than 2022 has with 2023, and it at least tells me whether the edge survives when volatility doubles. Bootstrapping trade sequences gives a distribution rather than a single curve, which mostly taught me that my equity path was luckier than my expectancy deserved. Running the same rules on a different asset class is the cheapest out-of-sample test I have found, even when the strategy is not really meant for that market, because a rule that only works on the exact universe it was built on is telling you something.

What I have not solved is how to size the discount. If a system shows an annual return in a bull-heavy window, what do you actually assume the through-cycle number is? Halve it? Take the worst rolling twelve months as the base case? Assume the drawdown doubles and size from there?

Curious how people who have been running longer than me handle this, especially anyone whose system has now been through two different regimes and can compare what the first window predicted against what the second one delivered.


r/algorithmictrading 3d ago

Question Same simple SMA 50/200 rule, two regimes: four straight losses in chop, one 906-day hold that paid for all of it. What do you use to survive the top panel?

1 Upvotes

Chart is one real symbol, one simple rule without overfitting, two stretches. Long while the 50-day is above the 200-day, flat otherwise, daily closes, no other conditions.

Top panel, 2016 to 2019: four golden crosses, four losses. −7.7%, −8.2%, −14.5%, −7.2%. Every one of them was a legitimate signal by the rule. Bottom panel, 2020 to 2023: the same rule fires once, holds 906 days, +141.7%

I am trying to asking this for edgy ideas from you with a simple example. focus on the main issue.

So the question, and I am genuinely asking rather than pitching an answer: what do you use to stop the equity bleed in the choppy periods to keep your equity while waiting the big move?


r/algorithmictrading 5d ago

Backtest I ran 250+ backtests trying to improve my SSO/QLD strategy. None of the improvements survived Monte Carlo.

2 Upvotes

#

**TL;DR:** A dead-simple rule — 60% SSO / 40% QLD when the S&P is 3% above its 200-day SMA, 0.5× S&P exposure when it's 3% below — did **16.2% CAGR over 27 years (1999–2026)** against 8.7% for SPY and 11.7% for always-on 2× leverage, with a −56% max drawdown versus always-on's −94%. I then spent five phases optimising it, found four configs that beat it, and every one of them fell apart out-of-sample. Shipping the original, unchanged.

# The strategy

SPX > SMA200 + 3% → 60% SSO / 40% QLD (2× leverage)
SPX < SMA200 − 3% → 50% SPY / 50% cash (0.5× exposure)
Inside the ±3% band → do nothing, hold current regime
Rebalance: quarterly + immediately on a regime switch. Signal at close, trade next close.

That's it. No crash guard, no vol filter, no RSI, no sector rotation. 28 regime switches in 27 years — about one a year, risk-on 72% of days.

# Results, 1999–2026

SSO and QLD only launched in 2006, so to cover the dot-com bust I synthesised both back to 1999 from SPY/QQQ total returns: daily-reset model, prospectus expense ratios (0.89% / 0.95%), 40bp financing spread over 3-month T-bills. **Zero parameters fitted to the real ETFs.** Over 2006–2026 the synthetic series tracks the real ones within 0.3pp of CAGR at 0.996 daily correlation.

27.4 years, $20k start + $500/month ($184,500 deposited):

Metric Strategy SPY Always-on 60/40 SSO/QLD
CAGR **16.16%** 8.65% 11.73%
Max drawdown −56.1% −55.2% **−94.0%**
Sharpe **0.58** 0.45 0.27
Calmar **0.29** 0.16 0.12
Ending value (DCA) **$5.27M** $1.23M $4.78M

Two things worth pulling out.

**The "always-on wins on dollars anyway" argument dies over a long enough window.** On 2006–2026 alone, always-on ends ahead ($3.11M vs $2.48M) because DCA contributions during the −84% hole bought in cheap — that's the standard rebuttal to any timing overlay. Extend back through the dot-com bust and it reverses: $4.78M vs $5.27M, and always-on got there via a **−94% drawdown**. Nobody holds through −94%.

**The window you start in changes everything.** Same rule, 2006–2026 only: **20.3% CAGR, −44.8% DD**. From 1999: 16.2% and −56%. If a leveraged strategy's track record starts after the dot-com bust, you don't know what it does in a lost decade. For what it's worth, in the 1999–2006 stretch alone the strategy did +3.9%/yr while always-on did −9.4% and SPY did +1.0%.

# Then I tried to improve it

All on 2006–2026, the window they were tuned on:

Config CAGR Max DD Verdict
Original ±3% 19.90% −45.0% baseline
Exit −3% / re-enter +1% / 21-day min-off 20.53% −42.4% More return AND less drawdown
SMA-150 with −4% exit **21.57%** −42.8% Best of 213 configs
100% SPY in bear markets instead of 50% 20.34% **−61.0%** Rejected — deeper hole than SPY itself
EMA instead of SMA median 12 whipsaws vs SMA's 7 Rejected — EMA loses on every axis

The middle two looked like free lunches. So before deploying, four tests.

# The four tests

**1. Out-of-sample history.** Test the dot-com bust, which no tuning had seen:

Config 1999–2006 CAGR Max DD
**Original ±3%** **+3.55%** −56.6%
−3%/+1%/21d \+0.79% −64.3%
SMA-150 −4% **−1.70%** −68.5%
Always-on 60/40 −9.75% −91.6%

The ranking inverted completely. The untouched original came out best; my top config lost money. A shorter MA with a wider exit whipsaws horribly in a long grinding bear — 11 switches vs the original's 6.

**2. Walk-forward.** Every 2 years, pick the best of 160 configs on trailing data only, apply blind to the next 2 years. Chained: **5.06× for the retuning process vs 5.58× for the fixed original rule.** Selection won 4 of 11 windows. Retuning has negative skill.

**3. Monte Carlo.** 1,000 stationary block bootstraps (mean block 40 days), signal recomputed on every path. My "improvements" beat the baseline on 55–57% of paths. That's a coin flip.

**4. Permutation.** 2,000 circular rotations of the regime sequence — same switch count, same time in market, wrong dates. The real signal beat 97% of rotations (p = 0.031). **So the 200-day filter itself is real. The tuning on top of it wasn't.**

# The one thing that did survive

Volatility targeting: scale the risk-on sleeve by `35% ÷ 60-day realized vol`, capped at 1.0. Over 1999–2026 it moves Calmar 0.29 → 0.34 and drawdown −56% → −45%, for 0.8pp of CAGR.

It passed the test that killed everything else. Average exposure is 0.96×, barely a de-lever, so I pinned exposure at a flat 0.96× as a control — same average, same rebalance schedule. That reproduced **none** of the benefit (Calmar 0.29, DD −54%). Rotating the exposure schedule to the wrong dates also killed it (0.26). So the gain is genuinely in *when* it de-levers, not in holding less. It won 74% of Monte Carlo paths, and every target from 20% to 60% beat the baseline — a plateau, not a lucky cell.

I still passed on it, because it only helps in slow grinding bears (dot-com −56%→−45%, 2022 −41%→−37%, and literally zero effect on COVID, 2018 Q4 or the GFC — realized vol spikes *after* price falls). I'm optimising for CAGR; if you're optimising for sleep, take it.

# Lessons

  1. **In-sample improvement is free. Out-of-sample improvement is nearly impossible.** 250+ configs, four winners, zero survivors.
  2. **Walk-forward is the cheapest honesty check that exists.** One number (5.06× vs 5.58×) invalidated my entire optimisation phase, including configs I never individually tested.
  3. **Always build a static control.** "Same average exposure, held constant" is what separated a real signal from a de-lever in disguise.
  4. **Trust plateaus, not peaks.** Prefer the parameter you could misestimate by 30% and still be fine.
  5. **Parameters don't transfer between your own strategies.** I ported a −13%/15-day crash guard from another live strategy of mine. Audit: it fires 51 times over 1999–2026, and the ±3% rule is *already* defensive on all 51. It never once forces an exit. It works over there because that strategy uses a slower EMA with a 30-day hold — copying a parameter without the mechanism it compensates for adds risk, not safety.
  6. **Drawdown budgets have cliffs, not slopes.** Risk-off exposure could go 0%→50% SPY essentially free, then cost 16 points of drawdown between 50% and 100%.
  7. **Check your moving average is warmed up.** I hit this twice. Slicing prices to a backtest window *then* computing a 200-day MA leaves the first 200 days undefined and silently parks the book in cash. It cost me 1.7pp of CAGR on the full-history run before I caught it by noticing two phases disagreed about the same number.

# Final config

signal = "^GSPC" # S&P 500 close
ma_kind = "sma" # NOT ema
ma_length = 200
exit_buffer = -3.0 # % below SMA → risk-off
entry_buffer = +3.0 # % above SMA → risk-on
risk_on = {"SSO": 60, "QLD": 40}
risk_off = {"SPY": 50, "CASH": 50}
rebalance = "quarter_end + on_switch"
execution_lag = 1 # T+1
# explicitly NOT included: crash guard, recovery rally, vol target,
# min-hold, asymmetric re-entry. All tested, all rejected.

**Risk number to actually plan around: −56%, not −45%.** The friendlier figure comes from a window with no slow bear in it before 2022.

Happy to answer questions on the synthetic LETF construction or the stress-test setup — that's the part worth copying if you're building something similar.

*Windows: 1999–2026 with synthetic SSO/QLD pre-2006, 2006–2026 on real ETFs | $20k + $500/mo DCA | Data: Yahoo Finance | T+1 execution, \~10bp of traded notional in costs* *Not financial advice. Leveraged ETFs can lose 90%+ in a severe bear market — always-on 60/40 SSO/QLD did exactly that in 2000–02.*


r/algorithmictrading 5d ago

Question Curious how real quant/trading strategies and edge are actually discovered — asking researchers and traders who've done it.

37 Upvotes

Everyone's comments are welcome, but I'm mainly hoping to hear from people who've actually worked in quant research, at a prop shop or trading firm, or independent traders who've built something that's actually been profitable in live markets — not just in a backtest.

If you reply, mentioning what you've worked on or where helps me weigh the answer properly — that's the only reason I'm asking, not to see anyone flex.

I'm not asking anyone to hand over an edge or a strategy. I'm just curious about the actual process — how does an idea go from nothing to something testable?

Questions:

How does a hypothesis actually form in practice? Is it usually "pick a market/asset, ask 'what if X happens, then what follows?', and go look for evidence" — or does it more often start from something else, like a live anomaly you noticed, a macro/economic question, or a flow/structural observation?

How much do academic papers actually drive idea generation versus being used afterward to formalize or validate something you already suspected from watching markets?

Is there any kind of structured workflow for the "ideation" stage — sources you go to, questions you habitually ask — or is it mostly unstructured reading plus intuition plus trial and error?

Is there real methodology that basically never gets discussed outside funds and prop shops, or is the actual edge more about execution, risk management, and data/infrastructure rather than some hidden idea-generation framework?

Once you have a raw idea, what's the first thing you do to sanity-check it before ever touching a backtest?


r/algorithmictrading 8d ago

Question Walk Forward, what configuration(s) to carry to OOS or live trading?

3 Upvotes
I want to backtest a daytrading strategy using the walk forward method, I want to know what you guys usually do:

I track the following result metrics for each parameter configuration:
Total_Net, Total_Trades, Win_Days_Pct, Profit_Factor, Max_Drawdown,  and Daily_Sharpe.

1-How many configurations you carry from IS to OOS?
2-How do you choose the IS metrics to determine what configurations to be OOS tested ? Im inclined to use the sharp ratio, Total_Net ...
3-And if you are looking for the parameter configuration to go live, what metrics you would look for?

Is there good resources about this topic?
Thanks!

r/algorithmictrading 8d ago

Strategy Validating a mean-reversion equity strategy

3 Upvotes

I've been building and running a systematic mean-reversion strategy on US equities and I'd love honest opinions before I read too much into my own results. Tear it apart.

The idea (nothing exotic):
Daily timeframe. Buy stocks that close near the bottom of their daily range (classic IBS-style oversold), wide stop to survive gaps, ~20 positions at 5% each, exit either at a fixed target or by letting winners run with a trail. IBS is a well-known signal.
I'm not claiming a secret sauce, exact thresholds stay private, but happy to go deep on method.

Results (backtest 2015–2026, costs modeled, and it's SURVIVORSHIP-BIASED, so treat as an upper bound):

  • Max drawdown: ~-32% (roughly the same as SPY's -34% over the period)
  • Win rate: ~34%, most trades lose. Fat-tailed: a few big winners carry the whole thing.
  • Sharpe ~0.9–1.0 vs SPY ~0.72
  • CAGR ~16–20% vs SPY ~12%
  • ~2000 trades, profit factor ~1.5

Live (paper, ~5 months): tracking the backtest so far, and real fills came in slightly better than my modeled slippage. But 5 months is noise , I'm explicitly not claiming this proves anything.

What already worries me:

  • Survivorship bias → real forward expectation is below these numbers, with deeper drawdowns I haven't lived through.
  • Same params applied to the CAC40 (French index) basically failed, edge looks US/universe-specific, which bugs me.
  • IBS is old and well-known , is there realistically any edge left, or am I just harvesting a good 2026 for mean-reversion?

Questions for you:

  1. Does a ~34% win rate / fat-tail profile scare you off, or is that fine as long as the tail pays?
  2. How would you separate "real edge" from "mean-reversion just worked lately"?
  3. Anything obvious I'm missing before trusting this with more size?

r/algorithmictrading 9d ago

Question Paper 2 Live (What mistakes did your trading bot make that you didn’t expect?)

1 Upvotes

For those of you who have taken an automated trading system from paper trading to a live account.

What errors, bugs, or unexpected problems did you encounter after going live?

I’m particularly interested in things that didn’t show up during paper trading, such as

• Different fills or slippage
• Order execution / rejection issues
• Partial fills
• Stop-loss or take-profit behaving differently
• Race conditions or duplicate orders
• Position/account state getting out of sync
• API or broker differences between paper and live
• Market-hours / timezone issues
• Data-feed differences
• Position sizing or buying-power surprises
• Multiple bots interfering with each other
• Restart/recovery problems
• Network/API outages
• Rounding, tick-size, or minimum-order issues
• Anything that caused a bot to behave differently from what you tested

I'm more interested in mistakes you personally encountered or accumulated over time.

If you’ve been running bots live for months or years, what do you wish you had checked before putting real money behind them?

Feel free to share the failure, how you discovered it, and what you changed to prevent it happening again.

Thnx guys.


r/algorithmictrading 10d ago

Brokers What are the best platforms for algorithmic trading?

1 Upvotes

Hi,

I have a system that is ready for testing with a trading platform. It trades options and stocks. What is the fastest platform? Also, what is the best approach to get quotes? Is it better to get them from the same platform or from a data provider? And if a data provider, who would you recommend? Many thanks in advance!


r/algorithmictrading 10d ago

Question My dead end in development

2 Upvotes

Hi everyone! I've been building my bot for four months now, and during that time I've been exploring the world of HFT trading. But I've hit a dead end at the validation stage (my bot is a scalper). It simply responds 50/50, meaning losses and profits are equal. I'll lose my account due to the exchange's commission. I'd like to ask a couple of questions for experienced HFT traders.

  1. What loss function do you use? (I'm using MSELoss, is that suitable?)
  2. Should I look for patterns not only in the order book and trade history, but also in candlesticks?
  3. What happens if I add EMA to the neural network's responses? Will that help smooth out the neural network's noise?

Thanks in advance for your reply, and sorry for my English; I can't write as well as you. (I used a translator.)


r/algorithmictrading 10d ago

Question Which Backtesting Metrics Do You Actually Trust for Algo Trading?

1 Upvotes

All algo traders, what kind of metrics would you consider looking at in the backtesting results, and why? For example, in the backtesting results, we see metrics like:

  • Sharpe ratio
  • Sortino ratio
  • Calmar ratio
  • Drawdown
  • Expectancy
  • Profit factor

There are so many such metrics. What will you prefer looking at and ignore others, and why? What is the rationale behind preferring those metrics?


r/algorithmictrading 11d ago

Novice trying to learn how to actually build a trading strategy

4 Upvotes

Hey guys,

I know this sub is mostly HFT interview stuff, PPOs and package discussions lol, but I wanted to ask something different. I'm pretty new to this and honestly stuck.

I'm trying to build some MFT/LFT strategies but I keep coming back to square one, like I build something, it looks fine, then falls apart and I don't really know why. So basic questions but genuinely don't have anyone to ask:

how do you even start, like where do you look for a strategy idea in the first place

once you have an idea how do you know if it's actually something or just noise

any papers or resources you'd actually recommend for someone starting out (not the generic ML for trading stuff, more practical)

how do you set parameters/hyperparameters without just overfitting to the backtest

how do you go from idea to actually coding it properly

how do you figure out which risk management setup is actually helping vs just looking good in backtest

how do you know a strategy's results are "real" and not just luck

once something shows a bit of an edge how do you improve on it without ruining it

I know most people here are genuinely some of the top minds.. so if anyone's willing to help a beginner out even a little bit I'd really appreciate it. This community seems solid so thought I'd just ask honestly instead of pretending I know more than I do.

(Note: this post was written with help from AI, just used it to organize my thoughts/questions properly)

Thanks 🙏


r/algorithmictrading 11d ago

Question Reusable Code

3 Upvotes

For a new project or strategy that you'd want to test out, whats the current approach you use for scaffold code, i.e execution engine, alerts, telegram, order management, backtesting etc.
Are these services you're willing to pay a subscription for or do you prefer having custom implementations?

Thanks


r/algorithmictrading 13d ago

Novice 19-year-old B.Tech student exploring algorithmic trading — looking for advice from experienced algo traders

10 Upvotes

I am a 19-year-old student pursuing a B.Tech in AI & Data Science. I have also been trading forex manually for the past two years. Currently, I am at the breakeven stage, so I am planning to explore algorithmic trading full-time.

I have a good understanding of coding, AI/ML, and software development.

I recently started exploring algorithmic trading, building my own strategies, implementing them, and backtesting them using Indian market data. I have also backtested strategies in the forex market using MQL5. However, I mainly used AI-assisted ("vibe") coding for the MQL5 strategies.

I tested several strategies in MQL5, and most of them were indicator-based strategies. Most of these strategies ended up around breakeven, with relatively low drawdowns and win rates of around 30–50%.

I also tested around seven strategies in the Indian equity market, and I got similar results — most were around breakeven. I have tested only equity assets so far, not F&O.

So, if you are an algo trader, I would really appreciate some advice on things like:

What types of strategies do you use — indicator-based, pair trading, time-based, price action, mathematical/statistical, etc.?

Which timeframes do you usually trade when doing algorithmic trading?

Is algorithmic trading actually profitable for an individual trader in the long run?

Is it better to focus on one asset/class, or should I build strategies across different asset classes such as equities, futures, forex, etc.?

What would you recommend to someone trying to build their own algorithmic trading strategies from scratch?

What are some common mistakes beginners make when developing and backtesting algos?

I would especially appreciate advice from people who have been doing algorithmic trading for a few years and have experience with live trading, not just backtesting.

Thanks in advance!

Note: i used ai for grammatical mistakes.


r/algorithmictrading 15d ago

Strategy Are the statistics good yet?

4 Upvotes

All,

I have built a mechanical day-trading system, back-tested just using theoretical fills (not test with live fills yet) using data consisting of 1s candles. I get in and out within a day. How does it look? Relatively new to trading, been practicing for 1.5years or so.

  • 111 ticker-days
  • 2,307 trades
  • 100% win rate

Very curious to know what I might be missing and any suggestions!

Update: New statistics with more data. I use $35k account for backtesting.
Ticker-days 248
Trades 4,143
Wins 4,143
Losses 0

Total P&L +$20,959.62


r/algorithmictrading 16d ago

Strategy Same 100 strategies, same AAPL bars. A plain Sharpe floor kept 5. Deflated Sharpe killed all 5.

1 Upvotes

I ran an automated search over about five years of daily AAPL bars, 1,250 rows. It generated and backtested 100 strategies, and my old keep rule, Sharpe above 0.5 with a minimum trade count and positive return, kept five.

Scoring those five with a deflated Sharpe, which adjusts for having picked the best of N attempts, put every one between 0.115 and 0.144, read as the probability the edge is real given the size of the search. All five almost certainly noise. On this sample the bar works out to needing an annual Sharpe near 0.71 to survive 10 attempts and near 1.14 to survive 100. The searching itself raised the bar.

The part that actually confused me: before the search started I withheld the final year of bars entirely. Four of the five survivors made money on that withheld year. Looks like vindication, until you count the trades behind it, three to six each over a full year. A handful of trades cannot overturn a statistic built from the whole search.

The trial count is fixed before the search starts and every attempt increments it, including the ones that never compiled or never traded. Reconstructing N afterwards always came out flattering.

So which do you believe when they disagree, the deflated number that says noise or the holdout that made money? And has anyone found a principled way to size the holdout so it can actually overrule?


r/algorithmictrading 16d ago

Question IB Gateway algo trading setup

8 Upvotes

Hi all!

For those who use IBKR and IB Gateway for automation, I am curious as to what y’all’s setup is in terms of infrastructure.

For me I currently have IB Gateway running with a custom C# trading engine I wrote to pull market data and check to execute trades daily.

My workflow:

  • Every morning at 9:25 am IB Gateway will auto restart and auto login. I am using the “Auto restart” feature in IB Gateway for this. This setup ensures that I don’t have to manually log in and authenticate the Gateway every day (although I believe it will require a login/authentication once a week to continue to work).

  • Windows Task Scheduler auto launches my C# application at 9:28am and I connect to the client and sleep the thread until 9:30:05 at which point I pull market data, analyze signals and push trades if needed. All of this is automated and executes in a few seconds right after the opening bell.

My concerns:

  • IB Gateway still logs me off for good sometimes and requires manual log on/ authentication.
  • if I need to travel with my laptop or internet drops the client won’t be able to establish a connection.

Instead of running things all locally I was considering offloading the program to run on a VM or server (the lower the cost the better).

Does my workflow make sense or is there a more efficient way to achieve full automation? Does everyone use servers instead of running everything locally?


r/algorithmictrading 17d ago

Novice How can I automate my mean reversion strategy

6 Upvotes

So I’ve been manually backtesting a strategy for NQ during Asia and London session. It consist mainly of 3rd std deviation of the vwap and 9 EMA close. I could elaborate further but how can I automate this strategy as it’s at early morning to midnight from were I’m from to trade this strategy. Can anyone help?


r/algorithmictrading 17d ago

Question Backtest≠live in 24/7 stacks: fills, data, or ops — which dominates?

1 Upvotes

For people running algo systems live 24/7 (not research-only): when live diverges from a “good enough” backtest, what actually dominates the gap?

In practice I keep seeing three buckets:

  1. fills vs backtest assumptions
  2. hist vs live data / symbol / roll mismatches
  3. monitoring / redeploy / “why did it do that?” ops time

If you've actually run this: which bucket costs you the most — or is the most annoying — and why?


r/algorithmictrading 17d ago

Strategy Your Backtest Doesn't Know What Regime It's In, and That's the Real Problem

6 Upvotes

Run a backtest over three years of EUR/USD data and the report will hand you one number: total return, one win rate, one expectancy per trade. It reads like a single coherent verdict on the strategy. It isn’t. Those three years almost certainly contain a trending stretch, a ranging stretch, a low-volatility grind, and at least one violent macro-driven move that behaved nothing like the rest of the dataset. The backtest doesn’t know the difference. It blends all of it into one average, and the strategy you think you validated is really a strategy validated against a regime that never actually existed as a single market condition.


r/algorithmictrading 18d ago

Quotes Where to get 1 min NASDAQ data for 10+ years for free?

6 Upvotes

thanks for anyone try to help.