Please do not post a new thread until you have read throughour 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.)
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.
I took 156 markets listed on both Kalshi and Polymarket with the same settlement rules, and priced a 1,000-contract buy three ways against the live order books, fees included.
Extra cost per $1,000, compared with routing across both:
Kalshi only: +$24.51
Polymarket only: +$6.80
Always the cheaper venue: +$0.69
Where routing really pays is size on thin books. 10,000 YES on Inter Miami to win the MLS Cup cost $2,173.52 routed, vs $3,297.77 on Kalshi alone and $3,310.31 on Polymarket alone. On its own, each venue’s book runs out and the price climbs. Split across both, it stays low.
So I built a smart order router that does this automatically. It reads both order books, adds each venue’s fee to every price level, and fills your order from the cheapest price first, whichever venue it’s on.
Lots of people go ahead and point out 'as much as possible' 'as much as you can really' 'at least (some amount of years that is gigantic)'. But what does the answer turn to when you consider an algorithm that trades across much shorter distances and scalping algorithms that go in and out of trades after 5 minutes? Depending on frequency, too. I would assume its important to test out all possible markets, crashes, etc... If youre trading so quickly and at such a small length of time, market conditions that show results after a full day essentially wont impact you at all, or so i think? Im not too experienced so any advice is much appreciated.
(and no i dont mind downloading years of data i just want to know if at some point it becomes redundant)
Mother Superior has been running live for roughly two weeks. It is a short-term XAUUSD scalper/intraday EA built from eight separate modules, with an integrated recovery layer. The first nine traded days are currently at +12.22%.
It has already traded through a few red-folder news events and behaved well so far. Still, two weeks is two weeks. The first genuinely ugly market regime will tell me far more
than a green opening run, so we’ll see what happens.
I’ve spent roughly three months building the system. Each module has its own entry logic, Magic Number and basket management. The shared risk layer lets me limit simultaneous positions and includes optional equity protection.
Only 2022–2024 was used for development and parameter selection. The final system was also challenged on the history outside that window:
• 2017–2021: earlier untouched survival/stress history
• 2022–2024: development and parameter selection
• 2025–2026: formal frozen-parameter OOS
That gives seven calendar years outside the development window. I keep the older survival/stress years separate from the formally declared OOS period, but the same final structure survived both sides of the development sample.
The main continuous 2021–2026 real-tick report used a fixed 0.01 first lot with no compounding. Starting from $1,000, realised balance finished at $3,903.12 across 1,511 closed trades. Profit factor was 2.93 and every tested calendar year was positive. The number I care about most is the observed MT5 maximum relative equity drawdown: 12.82%.
For the Monte Carlo check I resampled the complete deal history 10,000 times in 50-deal blocks. This keeps some local clustering instead of pretending every trade is independent. Median ending balance was $3,896; the 5th–95th percentile range was $3,504–$4,318. Median maximum realised-balance drawdown was 4.1%, with an 8.0% 95th percentile.
The Monte Carlo only rearranges realised trades. It cannot reconstruct every floating basket or invent a gold regime that never appeared in the source data. That is why I still treat the observed 12.82% MT5 equity drawdown as the more relevant risk figure.
How much live history would you personally require before giving meaningful weight to the untouched tests and bootstrap results?
Do you think it's okay using Metatrader's api for fetching historic data? Has anyone noticed discrepancies? Isn't it supposed to be the actual numbers you'd get trading with that specific broker?
Wsp guys, I just want to thank this sub first because the first time I ever seen what algo trading is, was in this sub when i joined in january this year, after 10 months of 1000 different algos created, backtested and modified I trusted one and made 4.6k this month since i switched from prop firms to personal account.
Im not selling anything but just wanted to show u guys its possible, willing to answer any questions but im not a pro still, also attached the backtest of this year. And before u say its only a year of backtesting the strategy its based around works always because its similar to scalping, also backtested last 3 years and it works
I have come to realize that trading is always going to be hybrid and never fully automated, after fantasizing that I can pass on to my family a program that they can use well after I am gone. Each intervention in the program pushes you further into discretionary trading land, as does each manual execution, tweak and so on.
As such, this will be my last post on here as I retire this account and ride off into the sunset.
I wish everyone happy trading and lots of profits.
Hi folks, am putting together my specs for a new home build PC. I am reading conflicting info RE the best CPU for the task. Top contenders are: A. AMD 9950X , B. AMD 9950X3D and C. Intel 270K Plus. Any recommendations?
I want to experiment with using LLMs (Claude/ChatGPT) to assist with trading strategies and execution, but nearly all online resources focus exclusively on US brokerages.
For those based in Norway or Europe, which brokers provide developer-friendly APIs (REST/WebSocket) or direct integrations that work well for automated/semi-automated setups? Would love to hear what platforms (e.g., IBKR, Saxo, Nordnet) people are using for this.
I’m a software developer working with trading/OMS concepts, and I’m trying to understand how mature trading systems handle order lifecycles and state consistency.
Consider a hypothetical scenario:
A parent order has a quantity of 2,000, with a child order of 500.
A modification requests changes to both the parent and child.
The child replacement is sent to the broker but gets rejected.
The original child remains valid, while the internal parent may already have been updated.
I’m curious how production OMSs typically approach this:
How are parent-child associations and order-version histories maintained across replacements and rejections?
How do systems handle consistency when a parent modification succeeds internally but the child replacement fails externally?
Are these workflows generally handled through state machines, event-driven reconciliation, operation-level coordination, or another approach?
Are there any public architecture documents, open-source projects, or books worth studying?
I’m particularly interested in hearing from engineers who have worked on institutional trading systems, FIX integrations, or OMS/EMS platforms.
Beyond this specific problem, I’m also trying to become better at independently reasoning about complex system architectures rather than jumping straight into code or relying on AI-generated solutions.
Would appreciate any practical insights or learning resources!
I’m interested in finding high-frequency data (timestamps at one-second intervals) for about 10 stocks on the New York Stock Exchange. A few years ago, I wrote a thesis investigating a correlation between trading times and stock prices based on a test I developed. Out of sheer curiosity, I want to see if this correlation still exists, but I can’t seem to find official high-frequency data for the New York Stock Exchange, for example.
Is there a way to find high-frequency data for free?
So I'm struggling with getting a proper data source. I was running a few strategies fine with IBKR's realtime feeds till recently a strategy popped up that requires futures/CME MBP-1 for building certain indicators.
I need to test this strategy on paper and for 2 weeks now, I realized that IBKR is not able to maintain a continuous realtime feed. I get quotes with timestamps that are off or huge delays. There's no delay on processing as these get logged immediately. The code is running on a server in a datacenter and I've ruled out processing/network lags.
The timestamps that come with the quotes will be 10+ seconds old.
Before I spend $400/month on data from databento/massive for paper testing a strategy, I would like to know if there's a cheaper alternative.
I can maintain a funded account on some brokerage if it gives access to websocket and proper data streams or have a subscription that's significantly cheaper than $400.
I've looked at
FMP: no futures stream
moomoo: futures is only quotes; no best bid/ask
tradier: futures requires CQG, other vendors involvement.
kinetick: I've reached out to them, still waiting.
Update: subscribed to tickstream for $79 .. will try them out.
Say you have a dataset. It says X event happened at time Y. There is a very good chance it did not happen at time Y.
This is due to:
Measurement error
The timestamp does not mean what you think it means
For example, say you are using the SEC Corpus. Claude and other LLMs will advise you to use acceptance datetime.
This is a bad idea.
Acceptance datetime is not when the filing has been released to the public. It actually may be days prior. For example, a filing accepted on a Friday, may be released to the public on Monday.
Also, the SEC misreports acceptance datetime on most of its endpoints. There is an issue where it assigns either the exact timestamp, +4, -4 or +5,-5 (depending on DST). The correct timestamp is found (generally) within the SEC filing's SGML file.
Additionally, SEC data is often published first via newswire. So, markets may have already reacted to the news.
This extrapolates to other datasets. One way to improve backtesting performance is to create features that assume that timestamp may not be quite correct. If this works, it is a sign that there may be something off with your datasets timestamps.
Links (can remove, not sure if falls afoul of self promotion):
A broad profitable parameter surface can coexist with almost no persistence in which settings win. I tested that distinction with 700 configurations of a monthly momentum and correlation allocation rule.
The base rule ranks 14 global asset classes on average 3, 6 and 12-month momentum, keeps the top 5, then holds the least-correlated 3 using the previous 252 trading days, with equal weights and a cash filter. I varied momentum lookbacks, shortlist size, holdings count and correlation window. Each configuration ran over 1987 to 2026.
I split the comparison into 1987 to 2018 and 2019 to 2026, ranked the configurations by CAGR within each window, and compared their ranks. The correlation was 0.048. The published settings moved from 3rd to 58th among the 700.
Published settings
CAGR
Rank among configurations
1987 to 2018
14.50%
3rd
2019 to 2026
16.36%
58th
The return improved while the relative rank deteriorated. I can't use the higher later CAGR as evidence that choosing those settings worked. All 700 configurations exceeded 10% CAGR after 2019. The later period favoured the family broadly.
The parameter sweep tests a family of settings; the split-period comparison checks whether their ranks persisted.
I also inspected the 19 neighbours that differ from the published settings on exactly one axis. Their full-period CAGRs ranged from 10.6% to 15.0%. The median neighbour gave up 1.51 percentage points of annual compound return; the worst gave up 4.07. Those are losses relative to the published configuration, not negative portfolio returns.
My interpretation is narrower than "the parameters don't matter". I didn't find a collapse from moving a setting, but the split also didn't show that the best fitting-window rank carried forward. Ranking noise can select a winner even when the surrounding rules all benefit from the same market behaviour.
There are material limits. The grid is centred on the published values, so I chose the neighbourhood. Universe choice remains outside this parameter sweep. The claimed 2019 design date has no public timestamp; I can't establish a genuine holdout from that assertion. This split is a retrospective diagnostic, and a friendly later regime doesn't establish an edge.
When you tune a systematic rule, what do you hold back as a genuine out-of-sample window, and how do you stop yourself from looking at it early?
Hi, so I would like to share the way I've been trying to get this bot to work. It for sure hasn't been I'll just give a simple break down of how mine is working and feedback is definitely wanted.
Everything that passes validation dies out of sample. What am I doing wrong?
Setup: ES futures tick data (Databento MBO, Jan–Oct 2026), a decision on every trade from 09:42–16:45 ET using 154 order-flow/price features, limit entries, fixed TP/SL, $6 commission, one position at a time, with daily loss and profit caps.
Search + validation: brute-forced 682K single conditions × 4 entries × 80 TP/SL pairs, extended the best to 2–3 conditions, plus LightGBM rules of up to 5 conditions (2.56M candidates). Then Jan–Jun discovery, a Jul–Sep exam with filters (min trades, Wilson win rate above break-even, monthly consistency, drawdown, 0.3 correlation), and a one-shot Sep 15–30 holdout.
Results: 173K passed discovery, 850 passed the exam but lost $105K together on the holdout, and the 14 holdout survivors all failed on 3 brand-new days (−$1.5K), which looks like massive multiple testing overfitting.
What exactly am I doing wrong? Do I need to show you guys more of what I did as well
There are DOZENS of youtube channels promoting a trading strategy based on gamma exposure. The whole premise being that options used for hedging would force market makers to buy/sell into those ranges, hence the levels acting as "magnets" for the price. I vibe coded a test with 5 years of SPY/NVDA/TSLA data and no such magnet effect could be observed. Nor could I find any academic paper on it - both existing papers and my own test only proved there is more volatility in high gamma environment and a slight lean (5%) to bullish close on positive gamma. People claiming having found a secret still selling courses and shit should have been a redflag, I guess.
Back when Nasdaq was trading at much lower prices, stop-loss distances were generally smaller in points, assuming opening-range widths scaled with the index level.
For example, assuming a fixed $100 risk per trade and $1 per point per lot:
Nasdaq at 6,000
Nasdaq at 30,000
Opening Range (ORB)
30 points
150 points
Spread
1.5 points
1.5 points
Position size
3.33 lots
0.67 lots
Total spread cost
$5.00
$1.00
Spread as % of stop
5%
1%
With fixed monetary risk per trade, smaller stops require larger position sizes.
Even if spreads remain unchanged in points, the total spread cost increases because of the larger position size.
In this example, the spread cost was five times higher when Nasdaq traded at 6,000, despite the identical spread in points.
This raises an important question about historical backtesting, particularly for strategies covering 10–15 years.
How should we account for this when optimizing trading strategies?
I'm considering optimizing using gross trade profits (before spread costs) to evaluate the underlying trading edge independently of execution costs, while still including realistic spreads, commissions, and slippage in the final backtests and forward tests.
The concern is that historical periods with lower index prices and smaller opening ranges may be disproportionately penalized by transaction costs, potentially biasing the optimization toward more recent market conditions.
Does this approach make sense, or would excluding spreads during optimization introduce additional biases?
In any case, older periods can't be profitable with such spread costs...
I'm writing an options exit logic for names like SMCI and ARM where the chain goes thin. Spreads get wide, news hits, and I'm rewriting limit orders a few times. Mid on the chain alone isn't enough.
I've hooked up stock Level 2 before. On the options side I want best bid and roughly how many contracts are sitting there, plus whether someone's pulling size and which side is thinning out. Not just a 1-minute chart. Tape is fine. Options L2 with the color flashing and exchanges jumping around is a pain to clean.
I applied for IBKR options level 2 and got rejected, so I'm looking at other brokers that show options depth, ideally something I can export or at least that refreshes steady. Couldn't find anything like that on Robinhood. I've poked around options level 2 on moomoo and I'm not sure if people actually lean on it for auto or semi-auto exits.
When you sell options on thin chains, do you feed options level 2 into the strategy for bid and size? Anyone actually used moomoo options level 2 for that?
A bunch of you asked things i couldnt answer without testing so i tested them. same setup as before, next open fills, costs, random entries as baseline, design and test periods, and a second script that rebuilds every result.
is the momentum edge just beta?
u/QuanTradin asked this and he was mostly right. in the 39 months SPY went down my momentum stocks went down exactly the same, -3.83% vs -3.83%. all the extra came in up months (+4.67% vs +3.40%). beta is 1.26 and what's left after adjusting for it isnt significant (t 1.14), and a lot of it is 2020 (+90%) and 2024-26. 2022 looks good on paper (-6.8% vs -18.7%) but thats which months it caught, not protection.
same dates survivorship check
u/traderpier pointed out my two runs had different windows. reran both on the exact same dates, Sep 2015 to Jul 2026 (the end of the delisted-stock dataset). SPY now comes out the same in both (15.2 vs 15.3) so the windows match.
stocks listed today only: 21.0% a year, +5.8 over SPY
with delisted stocks: 18.6% a year, +3.4 over SPY
so dead companies were worth about 2.4 points a year, more than the 5.3 vs 4.3 i said in the comments. most of the difference is 2020 alone (51% vs 35%).
his rules: above 50 SMA and 200 EMA, close in the bottom 30% of the 20 day range, 2% bounce off the 3 day low, no earnings within 7 days, ATR trailing stop, -8% hard stop.
2021-2026: 5,323 trades, 33% winners, profit factor 1.01, about +0.05% a trade after costs and negative if costs are a bit higher. worst trade -72%, stocks gapping straight through the -8% stop. a 10 position cash account lost 5.3% a year while SPY made 15.4%. 2014-2020 looked great but that was mostly 736 trades in the 2020 rebound.
and the mistake. my pre-registered random baseline actually said it passed. the audit caught that my random entries included days before each signal, and those days are always followed by the drop into the zone, so random was set up to lose. with fair baselines (random stocks on the same day, or same stock only after the signal) it fails. if you use random entries, only pick days after the signal.
not saying his live results are wrong, i couldnt test the news filter and had to guess the ATR multiple. but the rule as written doesnt hold up.
volume filter on momentum (only buy if 20 day avg volume is 1.4x the 60 day)
this one failed hard. only about 5% of liquid stocks pass it, so to fill 30 spots it digs into weak momentum names and meme stocks. momentum went from +25%/yr to about -2%, drawdown from -43% to -73%, and trades went up not down. a couple of comments claimed big improvements with this, i couldnt get anywhere close.
simulated 3x QQQ back to 1999, it matches real TQQQ since 2010 at 0.999 correlation. buy and hold since 1999: 4.5% a year with a -99.9% wipeout in 2000-02, vs 10.9% for plain QQQ. with a 200 day filter 12.7% a year but still a -95% drawdown. if your backtest starts in 2010 you only see the bull market.
how the 3 that held up do in bad times
the momentum + SPY blend dropped -34% in covid and was back in ~3 months, but then spent 1,028 days under its old high (Feb 2021 to Dec 2023), longer than SPY's 708. the SPY dip rule's worst drop was only -12.7% but it took up to ~3.5 years to make a new high, though it's been 70-72% winners in every era since 1993. month-end trade worst drop -15%, 4 losing years out of 34, weaker since 2010. honestly the slow grinds bother me more than the crashes, and momentum is the one i trust least.
also u/Maleficent-Success-6, the fill logging is done. every signal gets logged when it fires, then the actual open fill, the gap and the outcome. anything logged after the fill is flagged so it cant count. will share when theres enough data.
next up is whether DCF fair values actually predict returns, rules written before running. if you have a strategy you want tested the same way drop it below.
I’m new to the subreddit and I keep seeing posts of people providing strategy backtest details In which people will critique people’s approaches to how they do their test. I think this is exactly valuable information as I don’t know everything but my one question to the subreddit is what details are needed in a strategy backtest write up to determine if there is edge.
Please let me know as I’ll try to get as much relevant information possible when it comes to what I’m currently using live.
11 Trading Days Into My $5K Live Trading Experiment
Starting balance: $5,000
Current balance: $7,230.45
Total P&L: +$2,230.45
The first few days went well, but the last few trading days have been a lot rougher.
Day 9 was the hardest one so far. At one point, the live account was down around $1,500 on the day, but it recovered and closed at -$464.97.
I've been running the strategy live and comparing the results against a backtest each day. The daily results don't always line up, which is part of what I'm trying to understand through this experiment.
I'm continuing toward the $20K target and will keep sharing the good days and the bad ones. Eleven trading days is still a small sample, so I'm not drawing any conclusions yet.
I'm going to keep running the test and sharing the results, including the losing days. The goal is still $20,000, but there's plenty of testing left to do before drawing any conclusions.