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

Weekly Discussion Thread - July 21, 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 3h ago

Strategy On switching to a commission-free broker for algo trading (spoiler: it matters a lot for our algo)

32 Upvotes

We have been using IBKR for both our data and order execution since we went live with paper trading in March 2025 and then live with real money in July 2025. They have been awesome and their 5-second bars and 250-millisecond market data ticks are the core of our long-only first strategy. We had been using the IBAlgo Adaptive Patient limit order type for all our buys and sells (you set a target and a hard limit). Getting it set up to begin with was a little tricky (we use the https://github.com/gnzsnz/ib-gateway-docker project to make it easier), but for the most part it has "just worked" (we also use https://github.com/wboayue/rust-ibapi for connecting to IBGateway).

The only place they have a weakness is their trade commissions. Since we went live we have paid about $0.0035/sh for both in+out above and beyond regulatory fees. Now, this might not sound like a lot, but this is about $3k over a year when we started with $25k. That is about 12% of edge just to IBKR in commissions.

So, 6 days ago we started running a parallel version of our trader where all we did was replace our IBKR order component with one that trades via the Schwab Trader API (using https://github.com/major/schwab-rs). The data is still coming from IBKR and we just simultaneously route orders to both Schwab and IBKR. Over these first 6 days, both have taken identical trades.

We implemented an IBAlgo Adaptive limit order ourselves that is basically a ladder that starts the moving limit price at the bid (for a buy) and works its way towards the hard limit price we specify, with the urgency determining how fast it escalates (and starts at ask and marches to limit for the sell). We implemented the same custom adaptive order for both IBKR and Schwab for an apples-to-apples comparison.

Our real concern was that IBKR was going to have better price and timing execution by "enough" to negate the cost of commissions. We needed to do a side-by-side experiment to verify. Well the results are in:

  • The order execution is almost identical, but Schwab has a small but non-trivial advantage over the first 6 days (70 trades). It was +2.6 bps to Schwab.
  • IBKR commissions on those 70 trades over 6 days was $122.56. Schwab's was $17.86 (just FINRA and SEC regulator fees).

This amounts to about 0.0608% per day that was saved via trading with a zero-commission broker. But that isn't the whole story because that amount can be compounded daily, and that amount is a plus even on losing trades and losing days. That compounding makes this end up being about 15-17% per year of algorithm profit that is being swallowed up in just commissions. Still a pretty small comparative sample, but enough to run this experiment for a couple more weeks and then like switch to just Schwab for order execution.

tl;dr - If you can get your system set up with a zero commission broker, it can have a substantive impact on high churn algorithms.


r/algotrading 12h ago

Strategy How to build and maintain a profitable strategy: post roundup.

21 Upvotes

r/algotrading 9h ago

Strategy First time algotrading

Post image
9 Upvotes

What do people typically do to improve their win rate or anything that will make this any better


r/algotrading 9h ago

Data high/low daily spx algo preformace today (7/10 imo)

Enable HLS to view with audio, or disable this notification

7 Upvotes

first detection wasnt that clear but hte second was great for a short scalp, still a work in progress, sometimes its a bit iffy on the detection but it almost always followed by an spx reaction, how are yall algos doing today?

ignore the watermark ,
this isnt an ad and im not selling anything.


r/algotrading 1d ago

Data Data provider tier list

Post image
389 Upvotes

Since my last tier list did so well I though I'd make a part 2. Just to preface this is my own personal opinions from data providers I have used, I am an undergraduate economics student at Cambridge looking to break into Quant Research next year no need to grill me in the comments below.

London Strateigc Edge: Tickdata for all US stocks and options+ economic data for all countries FOR FREE just a massive archive of data. Everyone gets an api key with 50gb of data usage +100 websocket connections. Unfortunately no level 3 data which makes sense as exchanges charge per user who views the data.

Databento: If you need Level 3 data this is your place to go, all US exchanges covered + EUREX unfortunately in the 200usd plan live web sockets for l3 data not included. free $125usd credit for signup too

Alpaca: $100 for access to all US Exchanges for stocks and options data, includes websocket connections for all stocks and options definitely the best price option out of all the paid providers for websocket connections.

Massive: Biggest archive of historical data for US exchanges 20+ years, offers alternative data like credit card reports. Extremely easy to download the data. Free plan is meh.

FMP : Access to different exchanges like LSE, EUREX and other niche providers but low quantity of historical tick data.

Rithmic: API service offered through brokers like AMP futures, best price for level 3 futures data but slightly more complex to setup straight out of the box.

Yahoo Finance: Free historical data for a wide range of assets but London strategic edge providers more detailed data.

Tiingo: $30 USD for all US exchanges data, unfortunately 30gb bandwidth limit.

EODHD + Alpha vantage + Finnhub: intuitive api to use but just use alpaca + FMP for the same data but a lot cheaper


r/algotrading 40m ago

Education New to algotrading and need some guidance

Upvotes

I'm not a serious trader, but I enjoy doing market research and playing around with AI stuff. I'm trying to figure out how to build an agent with claude that auto emails me a list of my stock positions in my brokerage and roth portfolios (updated in json) with their real time prices and position value based on market opening. I also want to integrate a newsfeed at the bottom that updates with stories that may impact my stock positions. I know that I need a stock API in order to do this, Claude recommended that I use yFinance, but apparently it doesn't work anymore, so I pivoted to Alpaca. Alpaca looks good, but I don't know that I want to be giving all my personal info over to Alpaca or whatever else I may use to build this out. I'm sure there is no other way to do it than to give over my details but was just wondering if this may be possible?? I don't have any friends that are into this kinda stuff so I have no idea who to ask, reddit was my first choice lolll. Anyway, trying not to sound too much like a noob here. Give me some tips please!


r/algotrading 9h ago

Infrastructure Built an evolutionary multi-agent crypto trading system — 5 strategies compete, best one mutates and repopulates each generation (open source)

3 Upvotes

 Disclaimer: this is a research/testing project, not financial advice, and comes with no guarantee of profitability. If you run this or anything like it with real money, you do so entirely at your own risk.

What it does:

5 isolated agents, each running a different algorithmic strategy (momentum, mean-reversion, trend-following, breakout, volatility-squeeze), trade independently against real Coinbase market data over timed "generations." At the end of each generation, they're ranked — not by raw profit, but by a composite score (return, drawdown, Sharpe-like ratio, win rate, profit factor), specifically so an agent that got lucky with one oversized bet doesn't win over a steadier performer. The best one's strategy is cloned into 5 mutated descendants (small tweaks, risk-parameter variants, indicator variants, one experimental) for the next generation. Repeat indefinitely.

Some design choices worth mentioning:

  • Risk limits are enforced outside the strategy logic entirely — a hard-coded risk engine that agents/strategies structurally cannot reach or bypass, verified by an AST scan in the test suite that fails the build if a strategy file ever imports the risk-limits module directly. Max loss per agent, max order size, max simultaneous positions — none of it is something the "AI" can talk its way around.
  • Paper trading by default, with a separate, explicitly-gated path to real order execution (two env vars + a mechanically-verified pre-live checklist have to pass before it'll place a real order).
  • I ran a 200-generation backtest against synthetic random-walk data specifically to sanity-check the evolutionary mechanics — and it lost money on average (~-4.2 TRY/generation), because there's no real edge to find in pure noise. Posting that honestly because I'd rather show the system measuring reality correctly than fake a good-looking result.

Stack: Python, SQLite for full generation/lineage history, Streamlit dashboard, pytest (~180 tests).

Still early, paper trading only, no proven edge. Trade at your own risk if you ever take this further than paper mode. Repo's here if you want to poke at it or tell me what's wrong with it: https://github.com/hhhmehmet/evo-trader


r/algotrading 9h ago

Strategy Repost after correcting

Post image
2 Upvotes

Like u guys said I tried it on a 3 year period starting from July 2023 until date and this was the result. What can be improved here?


r/algotrading 9h ago

Education How do you manage your backtests? What do you still do by hand, outside your backtesting tool?

0 Upvotes

DISCLAIMER upfront: I'm building a backtesting tool, so I have a stake here. No links provided, I just need some answers — I'm at the stage where I'd rather understand how people actually work than guess.

When I started with backtesting, I didn't write any scripts myself — I had ChatGPT generate it. It ran fine, but I've never been able to shake off the feeling that I don't really know whether I should trust its output.

So two things I'm curious about:
— What do you use now, and what do you still end up doing by hand, outside the tool?
— Has anyone tried something and abandoned it? What broke?


r/algotrading 23h ago

Data LSEG/Refinitv/TRTH versus DataBento PCAP data

3 Upvotes

Any professional HFT out there have any insight on how PCAP data for CME futures compares between LSEG/Refinitiv/TRTH and DataBento? Trying to decide between the two providers for the last 2 years of historical L3/MBO for a new market making project. Mostly interested to know about the quality of the data and quality of timestamps at the data recording server.


r/algotrading 22h ago

Data Free daily market-regime + scored top-3 read for your trading bot — one curl, no signup

0 Upvotes

I run a scanner that scores ~560 names (S&P 500, Nasdaq-100, macro ETFs) every market morning for opportunity / entry timing / hold strength, plus a top-down regime call (risk-on / be-selective / stand-down). I've opened a free endpoint that serves yesterday's board — top 3 per book + the regime verdicts:

curl https://coil.trade/api/board/free

Free symbol directory (what's scored): curl https://coil.trade/api/board/symbols JSON, stable schema, no key, no signup. Docs: https://coil.trade/agents

It's the read layer of a rules engine I trade myself — scores and states only, never buy/sell advice. If you wire it into a bot and want the same-day board, there's a paid tier, but the free one is genuinely usable daily and I'd rather get feedback than sell you anything. What fields would make this more useful for your bot?


r/algotrading 1d ago

Infrastructure Is there a tool that connects prediction markets to your stock portfolio?

3 Upvotes

The more I think about prediction markets, the more useful they seem as real-time probability engines for events such as elections, wars, regulation, tariffs, and broader geopolitical risks.

Is there already a tool where you can upload your stock portfolio and automatically identify relevant Polymarket or Kalshi markets?

For example:

  • Which prediction markets are most relevant to my holdings?
  • Are current probabilities creating headwinds or tailwinds for my portfolio?
  • Which stocks have the highest exposure to a specific event?
  • How would my portfolio react if the market-implied probability changed significantly?

Essentially, I am looking for a portfolio risk dashboard powered by prediction-market data.

Does anything like this already exist? And would you actually use it?

EDIT - Found Oracle Markts here via my ChatGPT "research" and user comment: https://oraclemarkets.io/portfolio


r/algotrading 21h ago

Education Regime filters matter more than your entry rule

0 Upvotes

A regime filter decides whether your entry is even allowed to matter.

It's not a prediction. It classifies the environment before you act, then changes behavior based on what's already true.

Useful inputs (start crude):

  • Trend vs mean-reversion character
  • Vol level, better: vol term structure
  • Breadth / participation

Simplest useful policy: long momentum only when classified trending; size down or stand aside in chop.

Live version: my mean-reversion sleeve cannot enter when the regime check says the tape is wrong for it. Stand aside beats perfect discipline into the wrong environment.

Once expectancy is positive, entries are roughly interchangeable. What kills rules-based systems is the right rule in the wrong regime. Mean-reversion in a strong trend. Breakout in dead chop.

\The honest tradeoff: fewer wrong-environment trades, more late detection. Log every call. Measure both. Don't pretend either goes to zero.

Start with one trend measure + one vol measure. Review after the fact. Complexity you cannot audit loses.

When the filter and the chart disagree: trust the filter and stand aside, or override and take the entry?


r/algotrading 2d ago

Strategy I open-sourced my Polymarket market-making bot (MIT)

65 Upvotes

A few weeks ago I posted the retro of this bot here, then the post-mortem on why the forced directional residual lost money (adverse selection, mostly - stale quotes getting picked off). A few of you asked for the code. I'll include it as a link in the comments.


r/algotrading 2d ago

Other/Meta Need more advanced books

37 Upvotes

I've been doing quantitative strategy development for some time now and Ive reached the point where Im struggling to find books that actually teach me something new. I already have a solid understanding of the usual topics like IS/Validation/OOS splits WFO, cross-validation, permutation tests, bootstrapping, entropy, regime detection, and the other standard robustness techniques. I recently read Testing and Tuning Market Trading Systems by Timothy Masters but it covered concepts I was already familiar with.

Im looking for books that are genuinely advanced and make you think differently. Perhaps graduate level or even post graduate books on statistics, machine learning, optimization, information theory, econometrics, or anything else that completely changed the way you approach research and model development. And of course it would be great if the book wasnt 10 years old. Need relevance.


r/algotrading 1d ago

Strategy Any thoughts on this model

0 Upvotes

Came up with this model would appreciate any thoughts and advice


r/algotrading 2d ago

Data Backtesting four investing philosophies with point-in-time LLM-graded fundamentals (no lookahead, calibrated)

2 Upvotes

I ran an experiment on whether qualitative fundamentals carry any signal once you control the usual ways a backtest lies to you.

Setup. About 250 S&P 500 companies graded from their 10-K filings on moat, market position, leadership and capital allocation. Grading is point-in-time, the grader only sees the filing for that vintage, across 2014, 2017 and 2020. Index membership reconstructed as-of the vintage so there is no survivorship. Cross-validation folds grouped by ticker so the same company cannot sit on both sides. The predictor is a predictive database, so there is no training step, the calibrated probability comes back from a query with a per-feature contribution breakdown.

Results. Exact-outcome accuracy is about 35% against a 27% base rate, which is unimpressive on its own. But the ranking has real spread: the top-20 fund returned 20.6%/yr against the market's 7.9% and the bottom-20 lost money. That is the actual point, calibrated ordering beats point accuracy for anything you would size positions on. Brier 0.181.

One result I did not expect: using all 16 features made it worse, information gain dropped from 0.107 with 6 decorrelated features to 0.023 with everything. More features added noise, not redundancy.

By philosophy, growth won the top-20 sprint at 31%/yr and it was entirely the semiconductor cluster. Value hit 24.8% and decayed the fastest. Quality mostly avoided disasters. The composite posted a lower 19.5% but barely decayed as you scale to 100 names, minus 1.7 points versus growth's minus 9.6.

Limits I will state before you do: small sample, 12-year horizon, no transaction costs, and the winning sector is visible in the training outcomes, so this is what would have worked and not what you could have known in 2015. The LLM grades also risk a halo from firms that were already winning, though the headline model leans on the less-haloed features and passes a per-vintage drift check.

Playable, no signup: https://demos.aito.ai/equity 

Methodology writeup: https://aito.ai/blog/value-quality-or-growth-who-was-right

Happy to get into the fold construction or where you think the grading still leaks.


r/algotrading 2d ago

Education AI trading bots how to get started

0 Upvotes

Anyone give me advice on if these AI trading bots actually work to make profits or if you can successfully vibe code a winning strategy? Curious if this works and what kind of advice someone can give someone looking to get started doing this?


r/algotrading 3d ago

Education What is your workflow on researching an edge?

31 Upvotes

For the past year and a half I’ve been always following the same process:

1) having an idea
2) researching for papers developing the core idea and testing it
3) coding it simply in Multicharts (to see if the equity curve could be interesting)
4) testing it deeply and developing a strategy in QuantConnect

I found out that this process is effective for me but it could become better.

What is your workflow on testing, developing and implementing?

Also I’m trying to found a method to mass test strategies so if any of you know let me know


r/algotrading 3d ago

Education Is there anyone in the green with 3+ years of trading?

36 Upvotes

The more I get into trading, the less I can believe it


r/algotrading 3d ago

Strategy What do you wish you knew before you started automating your trading?

36 Upvotes

Ben looking into this recently after spending most of my time trading manually. The coding side seems manageable but the more I read, the more I realize theres a lot of things that can go wrong with backtesting, optimization, execution, etc.

For the experienced out there, what was the biggest lesson you learned that you wish someone had told you when you were starting out?


r/algotrading 3d ago

Data A List Containing Symbols, Yahoo Finance Tickers, Company Name and Exchange Name of Nearly Every Stock Across Several Major Exchanges Across The Globe.

25 Upvotes

https://github.com/Tejashv-dev/AllStocks

This might not be useful for most people here but maybe some day other dev - who does not want to get into the rabbithole of scraping tradingview and yahoo finance and downloading several master files from exchanges - might find this useful. Actually took many hours to finally make because yahoo finance ticker conventions are a menace and then different classes of same stock exist across several exchanges. (still not perfect tho)


r/algotrading 2d ago

Infrastructure My AI Trading OS

Enable HLS to view with audio, or disable this notification

0 Upvotes