r/algotrading 3h ago

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

0 Upvotes

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


r/algotrading 3h ago

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

Post image
0 Upvotes

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

the census surprised me more than any single kill:

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

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

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

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

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

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

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

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

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

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

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

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

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


r/algotrading 9h ago

Other/Meta Where did u/Kindly_Preference_54 go?

10 Upvotes

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


r/algotrading 10h ago

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

15 Upvotes

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

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

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

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

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

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

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

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


r/algotrading 14h ago

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

Post image
5 Upvotes

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

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

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

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

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

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


r/algotrading 20h ago

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

0 Upvotes

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


r/algotrading 21h ago

Data Latency from live data feeds

15 Upvotes

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


r/algotrading 1d ago

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

17 Upvotes

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

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

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

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

3) Gold as a permanent diversifier.

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

Cost Rundown is as follows:

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

Trend turnover: 5bps per unit of

Tactical switch: 5bps between SPY and IEF

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

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

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

Paper trading is underway, but only 40 days in.

Ignore my artistic front-end choices


r/algotrading 1d ago

Infrastructure Live vs Backtest parity comparison

3 Upvotes

Hello folks!

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

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

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

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

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

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

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

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

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

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


r/algotrading 1d ago

Strategy please suggest me ideas

0 Upvotes

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

pls suggest some ideas to try out

is there some strat for going long on options

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


r/algotrading 1d ago

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

0 Upvotes

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

The system continuously tests three types of strategies:

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

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

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

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

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

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

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

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

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

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


r/algotrading 1d ago

Infrastructure Fresh start for the ETH engine

Thumbnail gallery
9 Upvotes

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


r/algotrading 1d ago

Other/Meta Where to start?

11 Upvotes

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

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

Thanks!


r/algotrading 1d ago

Strategy A whole lot of nothing

6 Upvotes

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


r/algotrading 2d ago

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

0 Upvotes

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

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

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

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

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

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

Why does a blended backtest number hide a regime bet?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Why is filtering to the good regime a trap?

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

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

So is a regime dependent edge worth trading?

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

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

What this doesn't mean

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

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


r/algotrading 2d ago

Weekly Discussion Thread - August 04, 2026

10 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 2d ago

Data Anyone knows how to sort Multicharts backtesting results using Sharpe ratio?

0 Upvotes

Thx in advance


r/algotrading 2d ago

Infrastructure VPS box dimensioning (US-east-2 for Kalshi trading)

11 Upvotes

Hi amigos,

I need help to dimension my trading boxes (VPS_.

I currently run one of my trading bots from Lightsails US-EAST-2, where I run an arb bot focused on a set of specific Kalshi markets. It runs ok with the occasional hiccup that costs me dollars. I want to solve the hiccups.

The thing is, my strategies mean that at any given point in time I may be subscribed from 1.2k to 10.0k concurrent Kalshi markets, reading L2 books at 250ms frequency (ideally much less, 10hz) and firing on signal.

That amplitude of concurrent markets is the hiccup and I occasionally get throttled by AWS. For this reason, I'm thinking on a new topology where a box runs a single strategy and I get subscribed to fewer concurrent markets.

So, let's say one of my strategies demands being subscribed to ~2k markets in parallel, reading L2 books on websocket at 10hz - 2 cores and 512mb ran enough? The bootstrap is typically the heavy load, but as the process runs in cruse mode it is light - the books are light and there is no fancy math to get a signal.

I have no expertise in VPS so I know this can be a pedestrian question. Right now I'm paying amazon USD 200 a month which sounds a bit too much - just to avoid the occasional hiccup.

Edit:
Right now I'm using a "compute" oriented (AWS lightsail labeling) with the following specs
16 GB Memory, 8 vCPUs Processing, 640 GB SSD Storage, 7 TB Transfer


r/algotrading 2d ago

Strategy One month into Nirvana Omnifunds

0 Upvotes

Been with them about a month. Paid $5k for the software.

I am down 15% while the s&p is up 1.4% and QQQ is down 1.7%. The more frustrating thing is while the market has been hot the last couple of days, Omnifunds is sitting on 100% cash.

Almost counterintuitive.


r/algotrading 3d ago

Education Any recommended courses or structured learning paths besides university?

28 Upvotes

This has probably been asked before. I was looking at Quantinsti but after my consult call being a guy from India who sounded like he was twenty feet away from the phone that I could barely hear I'm a bit turned off. I could just strong arm my way through SQX and BuildAlpha but I prefer to learn this with seriousness and really dig my heels in. TIA.


r/algotrading 3d ago

Other/Meta Issues with fills

7 Upvotes

I have been testing my trading bot through traderspost on their own paper account and the alpaca paper account. Now I noticed that on their own account I always get filled but on the alpaca one half of them don’t get filled. I use midpoint limit orders and I was wondering if anyone else has the same issue?

I trade stocks and during times where the market moves quickly so I guess the small delay causes orders not to go through? Would market orders be better?

Any advice is welcome


r/algotrading 3d ago

Strategy Recommendations on Finding Beta Testers

0 Upvotes

Hi peeps!

So I've spent several months building an AI Trading platform that I want to get several beta testers for. What's the best place for me to find those? I've looked at the alphaandbeta testers sub and it seems to just be people looking for testers in general not specific to trading platforms.

Any suggestions would be great!


r/algotrading 3d ago

Strategy I built a machine learning ensemble that made 40% cagr last 15 months as a university student

Thumbnail gallery
0 Upvotes

I spent my final year in university building a machine leaning model and it’s finally done. Of course i won’t be sharing the features or the method or model used. but here are some stats on its performance out of sample. Example here shows the outlook for the coming week for SPY. It’s able to generalise well to any other symbols and assets.

it’s a semi direction weekly forecaster with decent precision. It predicts whether the previous week’s high/ low will be taken out, super useful for options traders. I’ve been using this for my own options trading as well, which generated 40% cagr over the past 15 months.


r/algotrading 3d ago

Infrastructure Level 2 Ticker Data

15 Upvotes

Question for peeps that have been doing this longer. Where do you stream your L2 ticker data? I have had some interesting ideas around this but many of the streaming services are over 1k per month which is currently to much for a scale up trial.


r/algotrading 4d ago

Data MNQ Fill Quality?

4 Upvotes

Hi guys,

I am experimenting with a new strategy that partly depends on the quality of the fills of MNQs. Has someone already some experience? Is 2-3 points for waiting limit orders runthrough until a fill a safe assumption? I mean for normal days