r/algotrading • • Mar 28 '20

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 • • 6d ago

Weekly Discussion Thread - October 20, 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 • • 6h ago

Data What data source do you use for your algo bots' options data?

5 Upvotes

I'm building options bots in Nautilus Trader, and I need to know what other people use for options market data. We've already run into a problem. Claude Code pulled data from Interactive Brokers and locked out the bot connection. I'm concerned that once the bots go live, each one in its own Docker container, they'll lock each other out, and Claude sessions will too.

Questions: What options data source do your bots use, live and for backtests? Do you run one gateway per bot, or one shared feed? How do you keep containers and Claude sessions from knocking each other off the gateway? What does your data cost per month?


r/algotrading • • 10h ago

Strategy Intraday Strategy looked promising in backtests but struggled in OOS. How would you tweak?

6 Upvotes

I’m working on a long-only ML stock-trading strategy and could use some outside perspective. The historical results looked promising, but the more recent results have been much weaker.

How it trades

It uses one-minute price/volume data, usually enters around 11:30 a.m.–12:30 p.m. ET, and closes everything at 3:55 p.m. No leverage or overnight holds.

It generally takes a small number of trades per day. There’s only one entry per stock per session, and each cash allocation gets used once that day.

I’ve tried engineered features, traditional ML, and neural networks. The current version averages predictions from several model fits.

Results (model | SPY)

- 2020–2024 research backtest | +157.4% | +96.4% |
- 2025 OOS validation | +6.8% | +17.7% |
- 2026 YTD simulated paper trading | −0.4% | +13.7% |

For 2020–2024, Sharpe was 0.90, beta to SPY 0.18, and max drawdown 20.2%. It beat SPY in three of five years.

The edge per trade is thin: roughly 0.1–0.15% net, depending on the period. Average winners are around +2.5%, and average losers around −2.25%. The backtest includes modeled transaction costs at twice our base assumptions.

The weakness also started before the OOS period: 2024 returned −10.6% versus SPY’s +24.9%. Averaging predictions made results less dependent on a particular model fit, but didn’t fix the weak periods.

My concern is that it might be picking relatively good stocks while the broader midday-to-close opportunity has deteriorated. An initial attempt to predict when that trading window would be favorable didn’t show useful skill.

What would you investigate first?

- What simple baseline would best separate stock-picking skill from just trading that time window?
- Would you revisit the fixed end-of-day exit, the training target, or the entry timing first?
- How would you test a “don’t trade today” rule without overfitting?
- With an edge this thin, which execution assumptions would you stress-test hardest?
- After extensive experimentation, what would make you stop researching this approach?

I also have a separate multiweek strategy with stronger historical growth but higher market exposure and drawdown. Combining them improves the historical portfolio metrics, but we want to understand whether the intraday strategy holds up on its own.

Would appreciate specific test ideas, useful controls, or a blunt assessment of what we might be missing.

Happy to share more information if needed.


r/algotrading • • 1d ago

Data Project X-Ray - Identifying market moving algos.

Post image
120 Upvotes

While working on a custom python project, working on a theory, I stumbled upon something I didn’t expect. I can see when the market moving algos start. Starting with the very first trade the algo makes. The dats source includes every single trade made on the s&p500 + a few other tickers.

Right now I’m downloading every single trade of the s&p 500 utilizing 15 alpaca api keys at once to get more backtesting data. The backtesting data on TradingView doesn’t even come close to cutting it. I made an app that does them all over 15 proxies, formats them in the format I need, does the calculations on my 5090 GPU and creates the json files and database for the gui. Zips the original files as well for backup. It does one full day of data in 3 mins. My bottleneck at the moment is my server provider which limits me to 100gb uploaded per day.

What I’m hoping to get some help with here is pointers on what to look for in terms of patterns of the algos on this backtesting. I can use AI to control it and want to try and steer it in the right direction. Since the data includes every single trade, I can see down to the millisecond.


r/algotrading • • 19h ago

Data Solving for Alpaca's and IB's incompatibility

3 Upvotes

Short summary of my current situation: I constructed a trading strategy which took me around 18 months and close to 1000 hours to develop. Most of my weekends and weekday evenings were spent on this. First 500-600 hours were literally just spent looking at charts and observing/documenting what's relevant and what's not. The other 400 - 500 hours were spent putting it on paper, and creating the algorithm + later testing.

Independent backtests via the API connected to IB's paper account were very successful. Tested over several months, accounting for commissions and spreads. Average number of trades was 150 per month or around 7 per day.

Here's the problem: the strategy relies heavily on 1-second data, meaning even a 1-second difference in an entry or exit can have quite a big impact on profits. At 9:30:58 ET, it takes a fixed screener snapshot of NYSE and NASDAQ-listed stocks. That snapshot is evaluated at around 9:31:05 to allow some time for data processing and for candles from 9:30:58 to finalize. Usually, around 50–70 stocks pass the screener each day. All of those stocks then need to be continuously monitored. Execution timing is extremely important, especially for exits.

IB doesn't allow screening that many stocks simultaneously, so I need a different data provider. I tested Alpaca SIP, but the differences compared to IB's historical data for both pricing and volume are substantial. Some of those differences actually change trading signals.

I read that IB's paper trading data is not always the most reliable, but also read about users having negative experiences with Alpaca. Maybe both are not the most reliable tools here. Maybe if I would live test (so not on via Paper trading), then the discrepancies would disappear or become manageable. I'm considering Massive, but fear that I'll run into the same problems which I encountered with Alpaca.

Any suggestions?


r/algotrading • • 1d ago

Data Trump's Stock Trades, Live as They're Filed (Free, No Sign-Up)

Thumbnail gallery
166 Upvotes

Tracking Trump's trades has always been annoying. The filings are scattered, hard to read, and most sites that clean them up put them behind a paywall.

So I added them to StockNest, and it's completely free:

- No paywall and no sign-up. Just open the page.

- Shows up as soon as it's published. New disclosures are added the moment they're filed.

- Easy to read. Each trade shows the ticker, the transaction size and the share amount.

- Filter by trade size. Show only the bigger trades, like $250K+, so the small ones are out of the way.

Donald J. Trump trades: https://stocknest.app/filers/politicians/donald-trump


r/algotrading • • 23h ago

Career Scope

5 Upvotes

Hi! I'll keep this short and pls pls answer if you're seeing this. This will help me a lot.

I am genuinely interested in finance like genuinely. I love reading about and around it, have been looking at the technical aspects n algo trading now.

I am an engineering student (20) and I would love to work in the domain but seeing AI being able to do almost everything has gotten me shivering and confused whether I should pursue this path or not and get into model training or infra as my main thing.

I would be really grateful if I can get yall's advice on this


r/algotrading • • 1d ago

Infrastructure How can I objectively validate market trend signals across 4,000 instruments?

7 Upvotes

Let's assume I have already developed a strategy that generates market trend signals, classifying the market into categories such as:

  • Strong Bullish
  • Bullish
  • Neutral
  • Bearish
  • Strong Bearish

Now, I want to verify whether these signals correctly represent the actual market trend.

One straightforward approach would be to manually inspect every signal on a price chart and check whether the predicted trend matches the actual market movement. However, this is practically impossible at my scale.

I'm working with approximately 4,000 instruments, with around 100,000 signals per instrument. That means I could have to validate hundreds of millions of signals.

My question is: What methodology can I use to objectively measure the accuracy of these already-generated trend signals at scale?

I'm not looking for suggestions on how to improve my strategy, which indicators to use, or how to generate better signals. Please assume that the signals are already generated and I only need to evaluate their correctness against actual market data.

Ideally, I'd like a systematic or automated approach that can tell me how often each trend classification was correct, incorrect, or somewhere in between.

I'd really appreciate any insights, research papers, open-source tools, or methodologies that could help with this problem.

Thanks in advance!


r/algotrading • • 1d ago

Education Noob question. Is anyone trying algo trading in equities?

11 Upvotes

How can algo trading be done in the Indian setup, and has anyone done it successfully?

Recent Grad, I'm a bit scared of F&Os in the Indian stock market, so I want to stick to equities/ stocks for now.

I also wanted to ask:

  • Long-term positions: Can we use algorithmic strategies to find and manage long-term positions in cash equities?
  • Minimum capital: What would you suggest as a realistic minimum capital to start with?

I checked via ChatGPT and it suggested that tools like Ollama can run data on a locally run AI/LLM (like Gemma) for free. Is that correct, and can you provide some guidance on this? What is the minimal locally run setup required?

With tools like Claude and other AI assistants, I want to try building something simple, learn from the process, and experiment. Any guidance or advice would be greatly appreciated!

~ structured properly using AI

edits:

~ recent grad as in I have job as SWE (6 months exp) I'm in Golang but with AI python will be easy to code

~ I can arrange 1-1.5L - that's the min average from responses

~ If any starting point you guys would suggest would be so much better.

thanks for responding! 🙏


r/algotrading • • 1d ago

Data Algotrading stocks vs crypto

8 Upvotes

Hi,

I'm always strengthening my auto trader and curious about what people prefer, and why. So wondering do users predominately use algotraders for stocks or crypto? If there is a clear leader between the two, can I please get some pros and cons of each from a user experience?

Any advice, suggestions, etc are welcomed.


r/algotrading • • 1d ago

Strategy Strategy Hypothesis Generating/Thinking

14 Upvotes

Hi everyone i hop you're doing well !

like the title said i was wondering on how do you guys actually think/generate strategies hypothesis, how your approach of this process is, do you rely on some specific techniques, do you start by a random idea then keep optimizing, or you set a clear hypothesis with all the rules you want, i want to know exactly how you done the process of strategy hypothesis generating/thinking, the steps you pass, and also how the frequency of strategies hypothesis you backtest often in a day, do you rely heavily on optimizing the rules of the same strategy (hypothesis) or you have another technique

because litterally i face somehow a problem, simple stupid ideas like "9:00 AM ORB" or "Buy everyday if the price do this" are always have results equal or worse than a coin flip decision, i'm talking about breakeven or slightly worse on Gross results, but after costs it turn to complete disaster

i would love to hear some responses from you guys, because the strztegy hypothesis is the first thing you do before even open you backtester, a bad approach of strategy hypothesis generating will lead to waste months without having 1 profitable and robust strategy that passes your filters


r/algotrading • • 1d ago

Strategy Sanity-checking a ThetaData SPX options backtest built with ChatGPT—data quality, fills, and overfitting?

1 Upvotes

I’m using ChatGPT to help build a backtest using 10 years of minute-by-minute SPX options data downloaded from **ThetaData**. I’d appreciate feedback on both the data and my approach.

The way I’ve been prompting ChatGPT is roughly:

> Look for any strategy that could have produced at least a 1,500% cumulative return over 10 years with a maximum drawdown below 40%.

These are search targets, not results I’ve verified. I realize that asking it to search for anything that meets a specific return and drawdown target could encourage overfitting or cherry-picking. I want to understand how to structure the process so the results are meaningful.

A few questions:

- **ThetaData quality:** Has anyone used its historical SPX options data? What checks do you recommend for missing or stale quotes, timestamp alignment, and correctly distinguishing contracts and settlement types?
- **Midpoint vs. bid/ask:** How realistic is assuming midpoint fills? Should I compare that against buying at the ask and selling at the bid, with commissions and slippage included? How would you handle multi-leg fills and wide spreads?
- **Strategy searching:** How would you structure training, validation, walk-forward testing, and an untouched test period when searching across many strategies? How do you account for the number of strategies and parameter combinations tried?
- **Return and drawdown calculations:** What should I check around position sizing, buying power, compounding, and marking open positions? I want the drawdown calculation to include losses while trades are open.
- **ChatGPT pitfalls:** What mistakes should I audit for in AI-generated backtest code—especially look-ahead bias, unrealistic fills, or code that runs successfully but implements different rules than intended?

Is this a reasonable research workflow, and how would you change the prompt or validation process before trusting anything it finds?


r/algotrading • • 1d ago

Data Where can I find free, historical EOD data for UX1 front month futures contract or for spot uranium?

0 Upvotes

If there is an API or place I could scrape from daily OHLC that would be great.


r/algotrading • • 1d ago

Other/Meta Backtesting not accurate?

1 Upvotes

Has anyone come across a period of time when your algorithm performed perfectly but fails in the backtest? I thought this was super weird.

From Sept 20 to Oct 18 I've done about 2-6% daily. And on the backtests it blows up the account.


r/algotrading • • 2d ago

Strategy Indices are so different from their futures and ETFs

7 Upvotes

For my backtesting, I tested S&P 500 index, its futures and ETFs e.g. ES, SPY

I did expect some performance variance since indices are not tradable, but I didn't expect the difference to be so big.

For example, with the same timeframe, setup and trading hours, the profit factor of S&P 500 index is 1.6, but it drops to 1.1 for ES. I expected them to have similar price movements, and I didn't think the difference would be that big.

Just curious - has anyone experienced this issue before? Any ways to reduce the difference? Thanks in advance


r/algotrading • • 1d ago

Data Looking for NQ or ES Historical Tick Data (6+ Months)

0 Upvotes

I can’t really afford to spend $200 on tick data right now, but I need it to backtest a strategy I’m working on.

If anyone here has historical tick data from this year, last year, or any other period covering at least 6 months, and is willing to share it or help me out, I’d really appreciate it!

Please DM me if you can help. Thanks in advance!


r/algotrading • • 2d ago

Infrastructure First week running the portfolio on a VPS

Post image
13 Upvotes

Ended the week at +$914.20 net across 32 trades with a 62.5% win rate. Pretty decent week overall with two issues.

Thursday the vps went down for 12 minutes while the portfolio was in a trade. I had to close it manually through the ninja trader mobile app.

Friday an engine error triggered a fatal shutdown because of some strict checks. It shouldn’t have been fatal but the engine handled the shutdown correctly and automatically closed all three open positions.

There are a few things to tighten up and thursday outage has me considering a move to aws for better reliability.


r/algotrading • • 2d ago

Strategy Day 1 of AI/Algo Trading (Paper) - Posting for accountability

Thumbnail gallery
74 Upvotes

Day 1 in the books! Hoping to keep similar format for each day. Trying to add in quick facts to answer easy, repetitive questions.

I will also post descriptions of the top two performing setups for that day, for now, in picture form as we are all looking for more setups(myself included!) and I'm happy to share what I have.

Thanks for all the feedback, support, and camaraderie!

Today: [+$674] across 5 day-trading accounts · Primary [-$81] · green streak [0]
Best setup: [Morning Momentum Pop, +$650] (details in pic)

Quick facts - To hopefully answer quick questions

  • AI: Claude (Opus 5.5) builds, tests and runs it
  • Broker: Alpaca API, paper trading
  • Setups: 108 (Currently) live, built on basic indicators (RSI, VWAP, volume / buy-sell pressure, gaps, opening range, prior-day highs and lows, ATR)
  • Setup Generator: a bot that invents 10 new setups a night from those same indicators and trades them on its own paper account

Setup Life cycle

Idea / Generator
 └─ 2-yr backtest (costs in)
     └─ Replay on real sessions
         └─ Testing 1 / 2 / Generator (paper)
             └─ Primary (paper)
                 └─ Live $ (after a green streak)
Losers: Primary → Testing → Graveyard

Stats Description

  • Avg R: average profit per trade, in units of the risk taken. Costs, fees and slippage are already in. +0.5R = earns half its risk per trade.
  • Break-even win rate: the win rate a setup needs just to not lose money. Beat it and you’re profitable.
  • Confidence (t): how sure we are it isn’t luck. 2+ is solid; under 1 could be luck.

Fun stuff!

*Edit - Removed comment about new summary format. On Day 2 new image summary format will be used.


r/algotrading • • 1d ago

Strategy All in

0 Upvotes

Ay man to all the veterans in this space we would really love to hear your experience on the numbers game basically dawg im all in you know and i dont want to look back with regret now a question is generating your own strategies from scratch better than trying to fix the strategies that had already been established before ie i have been working in loops on a london breakout strategy and if you go on about it i know it can be very discrete world but just drop any piece of advice even if vague we will try to figure out from there on any advice can be out of context to the topic im talking about but scope should be in the algo trading space


r/algotrading • • 2d ago

Strategy Pre-registered a wallet score on Polymarket (355k wallets). It passed out of sample, and a mechanism check showed it was measuring the wrong thing

4 Upvotes

Looking for critique on the method more than the result.

The question. Can you find prediction-market wallets that trade on information before the price moves? The obvious score: for each entry, how far the price moved in the wallet's favor 24h later. Average per wallet, shrink toward zero (K = 5 effective entries), turn into a percentile.

Setup, written down before any score was computed:

  • entry = a wallet's net position change in one market over one UTC day, $100+ only
  • move = price of the held side 24h later (needs $100+ of other wallets' trades in that hour) minus entry price
  • sports and short up/down markets excluded (a day after a match the price is the result)
  • score on Oct 2025 to Mar 2026 (A), test the same wallets on Apr to Sep 2026 (B)
  • pass = top 10% of A still positive in B, also without the 5 largest events
  • t-stats clustered by event
  • every later change logged with a date and a reason

Two data traps we hit before the test:

  1. Related wallets passing shares back and forth in finished tennis matches at made-up prices. One bought at 0.02 and sold to a partner at 0.96 four minutes later. Trade-level, that's a +94c "call". Netting positions per wallet per day removed it.
  2. A few $1.50 to $15 trades at 0.15 set the "price 24h later" in a market that settled at 1. Hence the $100 minimum of other wallets' volume.

Out of sample it passed:

Group from A Move in B after 24h, cents/entry t
Top 10% +0.83 7.9
Bottom 10% -0.76 -4.7
All wallets -0.01 -0.2

Holds without the 5 largest events, without weather markets, and for every K from 0 to 100.

The part that changed our mind (exploratory, not pre-registered). Information should show up as drift: the price keeps moving for hours as news spreads. A good fill shows up immediately and then stops. The top 10% were +0.75c after 1h and +0.83c after 24h. Then we split each wallet's move into first hour vs 1h to 24h drift and checked which one persists A to B (Spearman, 32,867 wallets with 3+ entries on both horizons in both periods):

  • first hour: 0.138
  • drift: 0.050

So the score mostly ranks fill quality. The "knew it first" part barely persists.

Held to settlement, after the fee each wallet actually paid on-chain: top 10% +1.17c per entry (t 2.9), bottom 10% -0.96c (t -1.7). +1.50c on mostly taker entries, +1.25c on mostly maker entries, so it's not just makers skipping fees.

Where it's weak:

  • the settlement result and the 1h/drift split were not pre-registered
  • on a shorter replication through an API (1,000 markets, May to Sep 2026) the groups did not separate at settlement (top +2.19c, bottom +2.10c). On those mostly longer-dated markets every group drifts up, so you have to compare against all wallets, not zero
  • dollar-weighted it leans on big positions: the largest 1% of entries hold 42% of net profit

We didn't ship the score as an "insider" label, since what repeats is the entry price.

Things I'd like pushback on: is netting per UTC day too coarse for intraday traders, and is there a better decomposition than 1h vs drift that doesn't depend on the horizon choice?

Aggregated tables, the pre-registration summary and a stdlib script that rebuilds the test: https://github.com/orcalayer/polymarket-insider-score-backtest

Disclosure: I'm one of the people behind OrcaLayer, a Polymarket analytics site.


r/algotrading • • 2d ago

Strategy Lower the odds, don't fool yourself.

0 Upvotes

Don't fall in love with a strategy that you think works cause you backtested it but it doesn't actually work in reality.


r/algotrading • • 2d ago

Data Where do you get data

12 Upvotes

​

Been making my own strategies on major pairs mostly forex and a major bottleneck has to be getting historicall acurate tick data i tried using mt5 but its slow as hell and i can only analyse one pair and sttategy per time tried bridging using python but results werent most accurate because it was missing m1 and m5 data so if you would put me on i would really be thankfull edit i got it dukas copy is goated


r/algotrading • • 2d ago

Other/Meta What should I do different?

0 Upvotes

I have significantly found a lot of improvement since last time. I have done various luck tests (passed, 0 beat and only 1 got a close z score) and found 28 strategies that work together decently.
What I noticed though is it's extremely slow, (-200, then -200 next day, up $200 the 3rd day, lose the 4th day again) and l've seen people on here post very good profit from NQ specifically (about $1k or more per day pretty much)

Im specifically asking to get to those types of results where it is $1000 a day pretty much (regardless of drawdown intraday or losing days) if there is any direction for what to research or how those types of results daily or even what i should be doing differently? Currently my strats do all discretionary based trades like "if price goes up x points before x time, (signal)". All suggestions welcome


r/algotrading • • 3d ago

Strategy Preview before Day 1 of AI/Algo Trading (Paper) - Posting for accountability

Thumbnail gallery
38 Upvotes

(Late to post. Screengrabs from before 10/23 session.)

I’ve built an automated day-trading system that’s still on paper money and looking to use live funds at some point. Each strategy is backtested over two years with costs included, then replayed on real sessions, then traded live in test accounts. Only proven winners get promoted, and losers get demoted. Every change is logged and reviewed nightly. No real money until it strings together consistent green days.

Below are initial balances for all accounts(couldn't find a way to reset the balance and didn't want to risk messing anything up!) as well as the top setups in my leaderboard and my automatic setup generator.

Would love to know what else to include on future posts for transparency and logistics questions. Would also love to know where else to post this too if you have any ideas.

- Claude - Opus 5.5
- Alpaca - MCP for paper and when we convert to live funds.