r/algotrading • • Mar 28 '20 Bravo

Are you new here? Want to know where to start? Looking for resources? START HERE!

1.5k Upvotes

Hello and welcome to the /r/AlgoTrading Community!

Please do not post a new thread until you have read through our WIKI/FAQ. It is highly likely that your questions are already answered there.

All members are expected to follow our sidebar rules. Some rules have a zero tolerance policy, so be sure to read through them to avoid being perma-banned without the ability to appeal. (Mobile users, click the info tab at the top of our subreddit to view the sidebar rules.)

Don't forget to join our live trading chatrooms!

Finally, the two most commonly posted questions by new members are as followed:

Be friendly and professional toward each other and enjoy your stay! :)


r/algotrading • • 5d ago

Weekly Discussion Thread - November 17, 2026

3 Upvotes

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.


r/algotrading • • 11h ago

Education Arrogance of novices

44 Upvotes

I've been reading and posting comments in this sub now for a few months, and what really strikes me is how arrogant some other commentators are who by their own admission are very new to this domain.

In the last 24 hours I have had discussions with one guy who argued that paper trading is no different from production, and the results there will 100% transfer to production results, and by the way this guy has never traded in production yet. So where is that confidence coming from given he has no experience?

Then another topic was around extreme volatility, I had a guy say that he's building an algo that can handle ANY market conditions, and that's what a "professional" algo should do. That's almost by definition impossible. If the market behaves in a way that is outside any conditions seen during the period the models were trained on or the execution was simmed on, it's very likely the algo will not perform well in those conditions. To claim you have made an algo that can perfectly extrapolate to any situation, it's implausible.

I've been doing this for 15 years, and I want to help others who are starting out, and yet I find myself getting into arguments with people who haven't even run an algo in production! I just don't get how these people have so much confidence in what they are saying at this stage.


r/algotrading • • 12h ago

Strategy SPX options trading strategy

Post image
24 Upvotes

I'm looking into selling spreads in certain conditions. This is paper.

15 years of experience trading with options and real money. Five figures.

Paper is run over realistic bid / ask in options, I have a crawler every 10 seconds of every contract (distance 300 points from spot price) for SPX, then I store it so backtesting is close to reality.

I will put real money in January.


r/algotrading • • 2h ago

Strategy Is it a gamble?

1 Upvotes

Been into this for a year now. Intense coding and trials using real money. Still managed to keep the balance on the positive side, despite some mistakes, some attributable to me, other not so, which resulted in effort just to restore my balance to neutral, which is, after all, a cost in opportunity over and above the trading costs.

The thought is starting to evolve, that all this, every decision at any point going forward, is a gamble to one degree or another. I have amassed a year of tick data and countless algorithms. At any point, no matter the setup, there's an equal possibility for it to go up or down. And for those setups that have a mathematical edge, the +/- band is eaten by the costs.

Nothing new here, of course.

The point of this post is to encourage an exchange of experience, and if there are any pointers for further exploration.


r/algotrading • • 16h ago

Data AI/Algo Trading (Paper) Multi-week update

Thumbnail gallery
3 Upvotes

Posted a bunch before but, to be honest, it just got to be too tough to manage so I'll post here and there and reply where I can!

The good stuff over the last few weeks:

  • **Primary(**account that holds my main setups) had its first week green in both R and dollars: +4.1R / +$756 (image 1). Small, but it's a first.
  • The gap-down shorts carried it again. Friday they went 20 for 20.
  • Reps keep climbing: 6,719 live trades last week, up from 4,081 four weeks ago. About 29,600 since 10-06 (image 2).
  • 182 different setups traded last week.
  • A QA pass double-checked the whole week. It found and fixed a cost bug that made the early weeks look better than they were.

The not-so-good:

  • Since Day 1, Primary is still down in R (about −88R) but up about +$310. Obviously, this included a lot of testing, trials, and was without many new rules and conditions added.
  • Example of this is one ETF setup bought 12 ETFs in five minutes(yep, you read that right) yesterday and all 12 stopped out. A "burst brake" goes live Monday so that can't happen again.

Who might be next (Seen in images):

  • A handful of setups in the testing accounts stay positive even after you remove their single best day. That's our "not just one lucky day" test.
  • The standouts:

    • Two more gap-down shorts.
    • A "big gainer fade" (shorting stocks up 3%+ that start to roll over).
    • A late-day short that only works when the Nasdaq is down.
  • Most of them shine under specific conditions (gap-down days, weak afternoons), not every day.
  • Their records still lean on a couple of big days (11-12 and 11-20), so nobody gets promoted yet. Next real look is mid-December.

The rules, in plain English:

  • There are a LOT of rules now. Some keep a setup from piling into trades, some stop a setup for the day if it's down 2R, some decide who moves up or down, and some protect things we know work. Each one exists because something went wrong once.

Quick facts:

  • 10 paper accounts across entire system, no real money yet.
  • Primary account runs 4 setups starting Monday(was 5 before, was 7 a few weeks before that).
  • Every number is after trading costs, factored in conservatively so as to simulate live fills to the best we can.
  • Promotion = a move: a setup leaves its old account when it moves up.
  • Weak setups go to the Graveyard; nothing gets deleted, occasionally archived if really bad.
  • Monday adds the burst brake and 2 new beginner setups. One setup also leaves Primary for more testing.

Please look into my other posts and read through before questions if you can. It's often a little daunting getting back to everyone with the same answers, though I do love the conversation!

Not selling anything, just enjoying the ride!

Thanks as always for the support.

Fun stuff!


r/algotrading • • 1d ago

Strategy A week later.... 😬

Thumbnail gallery
21 Upvotes

So I posted last Friday and my numbers were doubled up. I was still profitable but my algo was doubling up the profit.. i know why because I actually place trades on two separate paper accounts so if initially was recording both wins as a win, so the money doubled.

But here we are a week later and not going to lie I was really disappointed Monday Tuesday and Wednesday and for some reason again Thursday and Friday knocked it out of the park..

I did strip any stocks under 50 cents.. I would actually have around $1,100 profit with the stocks that are under 50 cents but my win weight drops down very low and I'd rather do less Trading and just have more confident trades..

So anyway this is where we stand today... It's not crazy numbers i don't expect it to be crazy numbers, I'm looking for consistent numbers..

I did add a little calendar to show where my profit and losses are .. again I don't know why Thursdays and Fridays seem to work better for my setup..

Anyway that's where we're at right now i'm getting my trades are $500 trades in and out on the same day never hold overnight


r/algotrading • • 1d ago

Infrastructure Anyone tried eToro for the bot?

3 Upvotes

I have old account there and it's super easy to fund if I ever decide to throw few hundred $ in there. I was thinking of using eToro for the possible bot beta test, not fot the actual long term purposes.

Is it even worth considering or slippage, fees and other downsides are simply too large? It's also supposed to support Demo trading via the API.


r/algotrading • • 1d ago

Education Question about momentum trading

5 Upvotes

Let’s say I am running a momentum strategy in the US. The algo would have picked semiconductor / memory stocks in H12026 and then got crushed.

What are some approaches to protect against extremely popular / bubble stocks? Okay with letting some returns go to protect downside / drawdowns.

Also if I want to leave out stocks that have had a huge volatility around results, how do I do that? One approach I can think of is to remove stocks that have extremely heightened one week out options volatility.


r/algotrading • • 21h ago

News An unsized futures backtest is mostly a test of your account size

0 Upvotes

Something I keep running into on futures strategies that I dont see argued about here much.

If you dont name a contract count, most setups size the position as a share of the account. 1% risk on 100k with a 20 point NQ stop is $1,000 of risk against roughly $400 a contract, so you get two or three minis. Move the account to 250k and the same rules take six. The entry logic never changed and the result sheet comes out looking like a different strategy.

On a funded account the binding constraint is the contract limit rather than the balance, and that is where the arithmetic breaks in a way that matters. A 50k eval caps you around five minis, so a percentage rule that wants six gets quietly clipped to five and every trade after that point is no longer the thing that was tested. It goes wrong harder in the other direction, because a rule that asks for ten contracts on a 100k account sits inside most limits and one 150 point NQ day is $30,000 of open risk, which is more than the entire drawdown allowance on the account.

-----

Where I landed is that a futures strategy with no stated size isnt finished yet. The sizing rule is as much a part of the strategy as the stop is, and its the part that decides whether the curve youre looking at is even reachable on the account youre about to trade it on.

So I default an unsized futures idea to a single contract now and size it up on purpose once I can see the per trade distribution. A one contract result is boring to read and its the only version of the curve that doesnt move when my account balance does.

Stocks hide all of this because a share is divisible, so a fractional position just scales down with the account. Futures move in steps, and the step on NQ is $20 a point, so the smallest unit of risk you can take is fixed no matter what the balance says.


r/algotrading • • 1d ago

Data Why do Tree/RF/GB overfit so badly in my pattern-discovery experiment while ElasticNet/GAM retain signal?

8 Upvotes

I'm working on a quantitative research system where I'm trying to build a data-driven pattern-discovery layer rather than starting with specific trading ideas and asking a backtester to test them and I’ve hit a result I’m having trouble interpreting.

The basic idea is to reverse the usual workflow:

Instead of:

“I think X causes Y, so let's write a strategy and backtest it.”

I'm trying to do:

“Here is a defined historical event dataset. Let the detector identify potentially meaningful relationships first, then independently test whether those relationships survive on unseen data.”

I'm deliberately trying to avoid hand-feeding the system a specific trading hypothesis, while still using proper train/validation/sealed testing so that “it found something” doesn't automatically mean “we found an edge.”

That's what led me into a surprisingly frustrating comparison between five detector families...

I’m not looking for the generic “ML overfits financial data” answer. I’m trying to understand the mechanism behind what happened, because the difference between the model families was much more dramatic than I expected.

The setup

The goal is not “predict the stock market.”

I’m testing whether different detectors can recover deliberately planted relationships inside historical ES intraday event data.

There are roughly 23 features, and the benchmark contains several synthetic relationship types: additive effects, nonlinear/zonal effects, feature confluence/interactions, regime-dependent effects, and a no-added-effect background.

We use chronological discovery/validation splits, a purged final sealed period, and multiple seeds. The purpose is to see whether a detector can discover a relationship and then still recognize it on data it did not train on.

The five detector families were:

  • ElasticNet
  • GAM
  • Decision Tree
  • Random Forest
  • Gradient Boosting

For the tree models, the original configurations were approximately:

DecisionTreeRegressor(
    max_depth=2,
    min_samples_leaf=20
)

RandomForestRegressor(
    n_estimators=150,
    max_depth=4,
    min_samples_leaf=15,
    max_features=0.7
)

GradientBoostingRegressor(
    n_estimators=100,
    learning_rate=0.05,
    max_depth=2,
    min_samples_leaf=15
)

One complication was that RF/GB were not directly converted into trading rules. Their predictions were passed through a smaller Decision Tree surrogate, roughly:

DecisionTreeRegressor(
    max_depth=2,
    min_samples_leaf=20
)

The surrogate's leaf paths became the candidate rules.

So we suspected two possible problems:

  1. Maybe the tree models were simply too shallow.
  2. Maybe RF/GB were finding something useful, but our conversion from model prediction → readable rule was throwing it away.

We therefore did a clean rerun rather than trying to reconstruct old model artifacts.

What happened

We ran a fresh self-contained benchmark with:

  • 700 cells total
  • 500 planted-pattern cells
  • 100 historical-background/no-added-effect cells
  • 100 association-broken negative-control cells
  • 11 configurations per cell
  • all models, predictions, rules, configs, logs, etc. saved
  • artifacts reopened and verified
  • 21,867 manifest entries

The first surprising result was that depth was not the problem.

We tested deeper trees while changing nothing else.

Decision Tree:

depth 2 → validation R² ≈ -0.10
depth 6 → validation R² ≈ -0.32

Gradient Boosting:

depth 2 → validation R² ≈ -0.10
depth 6 → validation R² ≈ -0.22

Random Forest was basically flat across the tested depth range.

So giving the models more freedom did not uncover a hidden signal. In the Tree/GB cases it actually made validation performance worse.

That makes “the trees were just too shallow” a pretty poor explanation.

Then we tested the translation problem

This one was interesting.

Random Forest appears to contain some structure in prediction space. Our internal capture metric was relatively strong for RF, and it had the best rank-correlation behaviour among the tree-based models.

But:

the original RF/GB models themselves had negative validation R².

So the useful-looking structure largely did not survive onto new observations in the first place.

For RF, making the surrogate deeper improved prediction fidelity somewhat (roughly 0.44 → 0.57), so the shallow surrogate definitely wasn't perfectly reproducing the original model.

But the actual candidate-rule recovery stayed around zero.

That makes me think the translation layer is losing information, but also that translation is probably not the primary reason these models failed, because the original models themselves aren't demonstrating stable out-of-sample relationships.

That is the part I'm trying to understand.

Meanwhile, ElasticNet and GAM behaved very differently

They are not perfect, and I am absolutely not claiming we found a winning trading system.

But relative to the tree family, they actually demonstrated recovery.

Across the planted tests we saw things like:

  • Additive exact recovery roughly 0.74–1.00 depending on detector/family.
  • C_regime_flip around 0.84 in one of the stronger breakout cases.
  • B_confluence roughly 0.42–0.50 in breakout for EN/GAM.
  • A_zones defeated all five detectors.

Then we did a genuinely untouched sealed evaluation.

On the opening family, nothing survived.

On the breakout family, only the additive relationship survived the sealed test, with roughly GAM 0.50 and EN 0.26 recovery.

So even EN/GAM are absolutely not “solved.” They are just the only two detector families that have demonstrated some ability to recover a planted relationship and preserve at least part of it out of sample.

What I don't understand

This is where I'm hoping someone with deeper ML/statistics experience can help.

Why such a dramatic divergence?

I'm familiar with the basic idea that trees / forests / boosting are more flexible and therefore can have higher variance or overfit.

But that explanation feels incomplete here.

Why does it look more like:

ElasticNet/GAM = some real detection capability

versus

Tree/RF/GB = “finds lots of stuff, then almost everything dies”

rather than a smooth continuum?

My current hypothesis is something like this:

Suppose the real detectable market relationship is relatively weak and mostly additive/smooth.

ElasticNet has a fairly constrained vocabulary for explaining the data. GAM is more flexible, but still mostly builds smooth feature-wise relationships.

A tree can say:

if X > 1.17
    and Y < 0.42
        and Z > 2.9
            then ...

and there are enormous numbers of possible thresholds and combinations it can try.

So perhaps the tree family has many more opportunities to find accidental structure in a noisy training sample.

Random Forest reduces some of the instability by averaging trees, and Gradient Boosting is very powerful at fitting residual structure, but if most of that residual structure is noise, it may simply have more ways to chase it.

In other words, maybe this is not:

“Tree models are bad.”

but:

“The signal-to-noise ratio and structure of this particular problem favour a more constrained model class, because the extra flexibility mostly gets spent modelling sample-specific structure.”

Is that a reasonable interpretation?

A few things make me hesitate

The algorithms themselves are obviously not bad algorithms.

Random Forest and Gradient Boosting are used successfully all over the place.

Scikit-learn's own documentation, for example, makes clear that tree ensembles can be very effective and that model complexity needs to be evaluated empirically rather than assumed to be better or worse. Gradient boosting also has explicit mechanisms such as early stopping because adding model stages can eventually hurt generalization.

So I don't want to make the lazy conclusion:

“RF/GB overfit, therefore they are useless.”

There may be something about my problem formulation that is making them particularly unsuitable.

That is the part I'd really like to understand.

Some questions for people who've actually fought this battle

Have you seen a situation where a tree / RF / boosting model looks materially more capable than a linear or GAM-type model in-sample, but then completely collapses out-of-sample while the simpler models retain some signal?

If so, what usually turned out to be the real cause?

For example, would you investigate:

  • too little independent information relative to the number of possible splits?
  • weak signal-to-noise ratio?
  • strongly correlated / redundant features?
  • noisy targets?
  • event dependence or overlapping observations?
  • the geometry of the feature representation?
  • trees trying to approximate an additive/smooth relationship inefficiently?
  • too many possible interaction structures?
  • instability of threshold selection?
  • some issue specific to regression rather than classification?
  • something about the way we're turning model predictions back into discrete trading rules?

And importantly:

Is there a diagnostic you'd run that could distinguish “the model class is a poor fit for this problem” from “our implementation / feature representation is handicapping the model”?

One other complication

We also discovered that our false-positive control needs more work.

We built a market-shaped negative control by breaking the association between feature episodes and their corresponding outcome blocks.

The block reassignment itself appears structurally defensible, but the empirical family-level false-alarm rate came out around 0.16 and 0.28 versus our 0.10 gate.

So we're not yet comfortable unleashing the detector on real-market discovery.

I mention that because I'm interested in whether the FPR issue is potentially connected to the tree-model behaviour, or whether these should be treated as completely separate problems.

What I'm NOT looking for

I'm not looking for:

“Just use XGBoost.”

or

“Use a neural network.”

or

“All financial ML is garbage.”

or

“Trees always overfit.”

I already know those are too simplistic.

I'm trying to understand why this particular model-family split happened, and whether there's a known pattern here that experienced ML practitioners recognize.

We've put a fair amount of work into making the experiment itself reasonably controlled, so I'm less interested in generic advice and more interested in the underlying mechanism.

If you've encountered something similar, I'd especially appreciate hearing what finally solved it—or what convinced you that the simpler model was actually the right tool.

Also, if there's an obvious diagnostic I'm missing, please tell me. I'm still learning this stuff, so I may be staring directly at the answer without recognizing it.


r/algotrading • • 1d ago

Strategy How should I start making a market maker bot? Main problem is one sided loss due to volatility

0 Upvotes

hey so I am starting out on making my market making bot on preps. but I don’t know how to make it better, like we normally place make orders to long slightly below mid and short above. But not sure how my bot automatically adjusts spread and make sure to solve itself from high volatility? so that after short or long it goes to other side‘s orders and hence not loose. Any guides?


r/algotrading • • 1d ago

Data Testing new EA on paper account

Post image
10 Upvotes

Have been working whole month developing brand new EA. It’s been running for a few days now on my paper account. So far so good, but want to see what happens in 2-3 months.


r/algotrading • • 1d ago

Strategy How's everyone's algo doing lately?

4 Upvotes

I was confident with a 4 MNQ algo portfolio that went live 3 weeks ago. Up and downs first two weeks, but positive. Then this week started with a 0 for 8 trading day, and as of Thursday it blew my daily loss limit 3 out of 4 days, wiped 2 weeks gains to now down (back tested win rate of 55% down to bismal 22% over 25 trades). I turned it off for today's Friday session. Apparently my algos haven't seen such extreme ATR and volatility and the chops in between, so largest loss hit the highest point, drawdowns also the highest (about 20% above the back tested highest amount). So now decided on pause until I can filter/reduce this week's disaster to feel safe again. So just wondering how's everyone doing this week, and what's the plan or adjustment going forward? I am treating this as part of algo management and want to hear from experienced folks how they tackle these situations and decide when is safe to trust their systems again.


r/algotrading • • 1d ago

News You cant backtest a gamma wall strategy before this year because nobody sells the old option chains

0 Upvotes

If youve ever wanted to test something that fades the call wall or flips bias at the gamma flip, the logic is the easy half. The inputs dont exist historically at any price a retail account can reach.

A dealer gamma level is computed off the whole option chain, every strike with its open interest and greeks as they stood at that moment. Price history you can buy going back decades for almost nothing. Open interest by strike as it sat at the close on some ordinary Tuesday in 2019 is a separate product, very few vendors ever stored it, and the ones that did have been retiring those archives. LSE pulled its chains last month. So the usable window is getting narrower rather than wider.

Which leaves two different measurements wearing the same three letters.

  1. A published daily net number for the S&P, one value for the whole index per day, available back to 2011.
  2. Strike level walls and the flip, which you only have from whatever date somebody started recording chains themselves.

Stitching those together because the names match is where a backtest quietly turns into fiction. Theyre different computations on different inputs, and a curve built across the join is mostly measuring the join.

_____

Its rebuilding an old football season from the final scores. You know who won every game, so anything you want to ask about results, you can test. Ask whether a team was better after halftime and youre stuck, because nobody wrote the halftime scores down and no amount of work on the full time results will produce them.

_____

The practical version. If your strategy reads a level that comes out of an option chain, your real history starts the day your source started recording chains, and anything before that date is a different calculation with the same label on it.


r/algotrading • • 2d ago

Data After 16y on it, here it’s my soon

Post image
45 Upvotes

Now I’m looking for advices to find good bussiness chances on it
-Comisions included
-Tps on limit
-47% entries to market 53% to limit
-AVG Adverse selection per trade 1%


r/algotrading • • 1d ago

Strategy Week 3 of forward testing, one sell-off made my breakout test +34R and my trend test −12R

1 Upvotes

Quick update on the frozen-rule forward tests I've been running (paper, no money). A few people gave really useful feedback on my last post about setting review points, so I'll cover what I changed too.

What happened this week
US indices sold off hard, with the S&P about −8% and the Nasdaq about −10% over the week. That one move explains most of the results.

  • Opening-range breakout: +34.55R from 30 trades. It's 80 trades in total at +0.49R a trade. Nearly every winner was a short on a big one-way day, which is exactly the setup a breakout wants. But its validation backtest was −0.005R over 5,300 trades, and those 80 trades come from about 14 trading days. So I'm treating this as one good regime, not an edge.
  • Trend following: −12.45R. The same sell-off stopped out its long index and silver positions. All 29 closed trades are stops because the winners are still open, so the closed-trade average looks much worse than the actual book.
  • Intraday momentum: −2.28R, about −0.10R a trade, which is pretty much what its failed backtest said. It hits its 50-trade check next week. At around t = −1.2 it isn't clearly below zero, so by the rule I set in advance it keeps running.
  • Combined: +19.82R over 58 trades, or +12.93R without the best day.

Same move, two tests, opposite results. If I'd started either one this week, I'd have had a very wrong idea of it.

What I changed from last thread's feedback

  • The breakout review now uses daily R totals instead of individual trades. Up to six trades a day move together, so the daily series has the clustering built in.
  • New tests will be sized for about 80% power at the +0.10R bar, not 50%. The current tests stay as they are; I'm not changing rules mid-run.
  • Slippage gets split by entry time and by exit type (stop vs timed close).

Setup checks
The demo executor (same two intraday strategies, real demo orders) matched 80 of 80 paper decisions over two weeks. Next is going live on demo and comparing fills trade by trade, not just totals.

One embarrassing finds this week, my weekly report showed a green tick for "average 2 SE above zero", but the code only checked that the average was above +0.10R. The live demo is at +0.29R ± 0.48 over 49 trades, so it isn't 2 SE above zero yet. That's fixed now.

70 ideas tested so far, none passed. Rules unchanged.

Question for people who've run forward tests longer than me: when one market regime dominates the first few weeks like this, do you do anything about it? Tag trades by regime, require a minimum number of distinct regimes before the review, or just let the sample size handle it?


r/algotrading • • 1d ago

Strategy Your backtest is probably lying to you. Strangers on Reddit showed me 7 ways it does

7 Upvotes

My last two posts got a lot more replies than I expected, and some people went further and showed me how they actually test things, in comments and in DMs. A few of those checks were new to me, so I'm putting them in one place. None of this is mine, I'm just the guy who collected it.

The one that changed how I think the most: if your label comes from price, your shuffle test can't see the problem. Someone looked at crypto tails in bull vs bear markets, where a bear market is defined as a 20% drop. That definition already pulls the big down moves into "bear" by construction. A time-shuffle null doesn't notice that. What he did was simulate a market with no edge at all, label it with the exact same rule, and see how much "effect" the labeling makes by itself. It was about a third of his headline number. I had regime splits like that in my own notes and never thought of it.

Second, a power check before you look. Same person, before reading any result, checks on simulated data how big an effect the test could even detect. If it's too weak, the test is called unmeasurable and the real result never gets opened. I always read first and explained the weak result after. That's backwards.

Another one, from a guy who pre-registers everything: test your strategy against its own flipped trade. Same entries, same exits, opposite direction. If both make money, it's probably the market going up, not your signal. He also compares with 200 random entry runs using the same exits.

Drawdown came up a lot, but one comment put it better than I could. People don't quit because the drawdown is deep, they quit because it's long. A crash hurts once, a flat year makes you doubt the system every week, and that's when people start changing rules. So now I want to see the longest stretch without a new high next to max drawdown, not only the depth.

Someone who ran a strategy for two years told me how he knew why it died. If the signals keep firing but the profit per trade goes to zero, somebody else is taking it. If the signals just stop coming, the people on the other side changed how they behave. His went from several trades a day to zero around June. Counting signals per month next to profit per trade is such a simple thing and I never did it.

And one about where ideas come from. A guy with a scalp in single stocks said he didn't find it by searching parameters. He saw something weird happen a few times on the screen, then ran one backtest. That's a very different search count from trying a thousand variants and keeping the best.
Last one is more of a habit: before going live, figure out how much slippage, delay and missed fills your strategy can take before it's flat. Then forward testing isn't "did live match the backtest" but "are we still inside that budget"

Question back to you: what check do you run that most people skip? I'd like to grow this list, and I'll credit whoever adds something new.


r/algotrading • • 2d ago

Infrastructure where do you draw the line between read only monitoring and automated order triggers

6 Upvotes

There is a huge engineering difference bwteen passive market monitoring and automated execution,even when you keep full custody of your keys or accounts. Read only tracking on state changes, balances or market shifts is fairly forgiving if a script hiccups. The moment a trigger can fire real orders or approvals, a bug or stale feed becomes an actual execution risk.

I was reading through how Alphio seperates passive monitoring from automated rule triggers and it got me thinking how people structure that boundary in live setups. Some folks keep alerts completely detached and only act manually, While others isolate execution into tightly scoped sub accounts or strict rule conditions.

For those running automated rules in production, do you keep execution tightly gated behind strict conditions and isolated accounts, or do you keep automation strictly on monitoring and alerting side.


r/algotrading • • 2d ago

Strategy How realistic is Bybit Demo Trading vs live orderbook execution, and what do you stress-test before going commercial?

3 Upvotes

Been building a pure-Rust low-latency trading engine for crypto perps over the past few weeks. After sorting out normalization drift and fee bleed (switching to wider +75 bps limit take-profits and 50 bps stops over 1-hour windows so taker fees don't eat the edge), my offline tick replay with realistic 11.5 bps round-trip fees finally turned solidly profitable.

Now I'm running it live on Bybit Demo Trading (bybit.com) with native server-side TP/SL attached to limit entries across BTC, ETH, and SOL. Before I scale this up or transition to a commercial setup, I want to make sure I'm not getting fooled by a sandbox environment.

For folks who have moved from Bybit Demo Trading to real mainnet accounts with $50k+ position sizing: how big is the gap in limit order fill rates, queue priority, and slippage during volatility spikes? And aside from basic API rate limits and reconnect logic, what edge cases or failure modes do you always stress-test before putting real capital or outside users on a system like this? Appreciate any insights from people who've made the jump.


r/algotrading • • 3d ago

Other/Meta I think I made it. AMA

Thumbnail gallery
427 Upvotes

I've been trying and trying to create a profitable algo for more than 10 years. My background is a PhD in a hard science, and algotrading has always been kind of a hobby of mine, part time for most of those years, full time since last year. The fast progress of AI helped a lot, both for my own learning and for being able to try so many different ideas and methods and things at the same time. I wanted to share a bit of my experience to motivate anyone reading because this has been a very hard and lonely journey and I felt very discouraged very often.

First of all, please do not use martingale, grid, averaging down on losing trades, or any weird mechanism that simply delays losses. Those systems are destined to fail, the only question is when, but trust me, your account will be blown.

Second, do not try to use indicators alone as entry signals, bollinger bands, RSI, supertrend, whatever, do not have any valuable predicting signal, and if you can only justify a winning trade after looking back, it was definitely not thanks to the indicator that magically worked.

Third, there's lots of noise not only in the financial timeseries data, but also in the trash educational content found online. Lots of gurus full of shit, lots of complex strategies that have so many rules but often the guru ignores the ones that are uncomfortable to them in that given moment.

Ignore all that, just work on your ideas, use a scientific approach, be skeptical of any positive results, and learn from the negative ones. There's always a lesson to be learned and sometimes it can take years to really understand that. For me, for example, it took years to accept the reality of the delayed losses of a system that averages down losers. I thought with enough tweaking and finding the right parameters I could find the sweet spot and delay the large losses indefinitely. I was wrong.

Here are some general info and things I found useful:

  1. I used all free publicly available data
  2. I used free software (python, metatrader, ctrader)
  3. I used lots of paid claude plans. I always have the $20 plan and for the deep research months I have the $100 plan.
  4. I generated lots of skills and agents that are very specialized in my own way of working, I often use loop commands to let my pc work wonders while I sleep.

Imo claude or LLMs are not good at generating creative ideas, but they're great at executing specific detailed instructions and can help improve your ideas a bit.

The strategies I found are not limited to one specific asset or market, but they definitely have their sweet spot. Execution can be done on CFD, futures, spot, works either way as long as you have decent fees/costs. Backtest period was from 2017-2026 (OOS from 2024) and live since September. I know it's only been not even 3 months, but I have plenty of evidence that the backtest modeling was sound and the edge and performance is just like the backtests. Will update in the next few months.

I do not feel comfortable now sharing much more about what I trade or how I trade it. I'm very protective of what I created, but I do want to encourage you to keep going.

I understand some of you may be skeptical of the screenshots since I didn't provide any links. I don't care, you can decide to trust me or not.

Ask me anything, I will try to be as useful and as careful as I can.

TLDR: do not use martingale, grid, indicators. Test your ideas, use a scientific approach, leverage AI tools, and you can find an edge. I think I did, AMA.


r/algotrading • • 3d ago

Infrastructure Experimental Vault

10 Upvotes

Hey Guys!

Opened a mini vault on bullet so far it made around 0.8% in a day. Aynway details are below for now it is barely surviving altough I1m optimistic.

It is 15-min BTC/ETH strategy (2x, 3/4 BTC + 1/4 ETH; 50/50 blend of a mean-reversion rule and a gradient-boosted model) worked at ~0.03 bp/side. On Bullet (0/0 fees, thin book)

measured cost was ~1 bp/side, and the backtest Sharpe went negative in all four test periods.

Then I adjusted teh strategy a bit.

Added a No-trade band, only move to the nearest edge of [target ± b], with b ≈ 1.1 × the 7-day mean |target| (refit monthly).

Sharpe at measured cost: +0.7 to +1.6.

Then I trained on a cost aware way on Σ 0.75^k · r(t+k) over the next 2 h instead of the next 15 min (similar in spirit to Gârleanu–Pedersen's aim portfolio).

Turnover −22%, no loss of cost-free Sharpe.

For now it works!

Walk-forward 2024-01 → 2026-11, 2x

Sharpe 1.78, 12/35 negative months, max DD 29%.

At double the cost it's negative.

Caveats: parameters picked among ~30 preregistered combos; recent profit concentrated in four August days (ex-August Sharpe ~1.1); capacity only a few $k.

It is a live strategy since Yesterday (Nov 18) on a tiny account (~$15), so positions are lot-quantized.

Execution A/B, preregistered: maker-chase + IOC vs. a single resting post-only order, scored by implementation shortfall.

Readout after Dec 2; I'll post it either way.

My questions:

No-trade band vs. partial adjustment at 15-min horizons,which held up live for you? And how do you handle lot quantization on small accounts?

Thanks a lot!

Update: added a picture to the post

Another update

r/algotrading • • 3d ago

Strategy How Much Money Are You Willing to Lose While Developing Your Trading Bot?

9 Upvotes

I've been thinking about something that doesn't get discussed enough in algorithmic trading communities: the financial cost of developing a reliable trading bot before it becomes consistently profitable.

We often see people sharing their strategies, backtesting results, performance metrics, and live trading returns. But we rarely discuss the other side of the process: how much money, time, and capital developers actually sacrifice while building, testing, debugging, and stabilizing their systems.

Building an automated trading system is rarely a straightforward process. It involves much more than developing an entry and exit strategy. There are execution issues, API failures, slippage, exchange fees, latency, risk management, unexpected market conditions, bugs, false signals, overfitting, and countless edge cases that may not appear during backtesting.

And sometimes, a strategy that looks profitable in historical data performs very differently in live markets.

This raises a few questions I'd genuinely like to hear experienced developers answer:

How much actual money have you lost during the development and testing of your trading bot before reaching a stable version? Not paper-trading losses, but real financial losses from live testing, execution mistakes, fees, slippage, and other development-related issues.

How much capital did you initially allocate to testing, and how much additional capital were you prepared to risk before deciding whether the system was worth continuing?

How long did it take you to reach a point where you considered your system technically stable and reliable?

How many major rewrites, architectural changes, or strategy modifications did your bot go through before you were satisfied with its behavior?

At what point do you stop investing money and time into a system that hasn't demonstrated consistent profitability, even if you believe its underlying logic has potential?

Looking back, would you have been willing to lose the same amount of money again to achieve the knowledge and system you have today?

I'm particularly interested in hearing from people who built their systems from scratch rather than simply configuring existing commercial bots.

I also think there's an important distinction between two milestones:

Technical stability: The system executes correctly, handles failures, manages risk, and behaves as designed.

Statistical and financial validation: The system demonstrates a genuine, repeatable edge after fees, slippage, and realistic execution costs.

Reaching the first milestone doesn't necessarily mean reaching the second.

I'm not asking how much you've made. I'm asking how much it actually cost you to get there.

What's your real development cost, and where do you draw the line between investing in a system and throwing good money after bad?


r/algotrading • • 3d ago

News The best looking backtest I can find has no stop, and its profit factor is 1.20

0 Upvotes

Two published runs, both NQ, both openable without an account. I put them side by side because one of them makes the other look broken, and it shouldnt.

First one is an opening range breakout on the 15 minute. Nov 2020 to Sep 2026, 1,493 trades, +257.5% net, 21.7% max drawdown, 53% win rate, profit factor 1.18, Sharpe 1.28.

Second one buys the last candle of the regular session and sells the first candle of the next one. No stop, no target, no filter, 100% of the account on every entry. May 2016 to Oct 2026, 2,604 trades, +3,784.4% net, 49.3% max drawdown, 56% win rate, profit factor 1.20.

So the second one posts a net return almost 15x larger, and its gross profit per dollar of gross loss is two cents higher.

1.18 and 1.20 are the same rule quality for any practical purpose. Everything between +257% and +3,784% came from somewhere other than the rules: ten and a half years of window instead of five and a bit, a position held through every overnight session instead of being flat by the close, and the whole balance committed on every entry so the compounding runs on the full account.

Two people both earn 7% a year. One puts in 500 a month for six years, the other puts in his whole paycheque for eleven. The second finishes with a far bigger number and he is not the better investor, he just had more money exposed for longer.

The part i keep coming back to is that the no stop version is the one that looks best. A strategy with no stop cannot show you a stop out, so its worst trades are capped by wherever the next open happens to land, and the pain shows up in the equity curve rather than in the trade log. 49.3% on a hundred grand is a $49,300 hole sitting inside that 3,784%.

_____

The overnight gap thing is still a real result and id say so if it was my run getting picked apart. NQ has drifted up for a decade and a lot of that drift lands outside regular hours, 2,604 trades is not a small sample, and holding 1.20 across ten years is something i would want to look at properly. What it is not is a 3,784% edge, and sorting any list by net return puts it above the strategy with a quarter of the drawdown.

Both of these are on the Agenticks community feed with the full rule set and the trade log attached, so the arithmetic is checkable rather than something you take off me. The breakout run reports a Sharpe of 1.28 and the overnight run does not report one at all.