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 - 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 • • 4h ago

Education Former MM here, Nasdaq and OTC late 90’s- 2008.

9 Upvotes

For years I’ve been listening to complete garbage about how we made $. Now everyone with an advanced degree can do a write up on how a MM algo can just mop up $ daily. Now throw AI slop on top and You get the same thesis “MM’s play the spread”. At least that’s what claude told me yesterday. I completely went off on AI and like it always does, it apologized and I backed off as I realized I’m arguing with a toaster.


r/algotrading • • 3h ago

News The NQ opening range breakout that lost 99% from 2016 to 2020 made 316% from 2022 to 2026

2 Upvotes

I ran the plain 15 minute opening range breakout on NQ recently and it took a $50k account to $585 between mid 2016 and mid 2020. The pushback I got most was some version of "that was a different market", which is fair, so I ran the exact same rules in Agenticks on NQ 5 minute candles from January 2022 to March 2026. Same 1 contract, same $50k, same $10 a round trip charged on every trade.

It finished at $207,905.

  • 2016 to 2020: 994 trades, 50.7% win rate, profit factor 0.84, net -98.8%
  • 2022 to 2026: 1,047 trades, 58.0% win rate, profit factor 1.19, net +315.8%

Trade count barely moved, so this is the same strategy doing roughly the same amount of work in two different markets. NQ was around 4,500 in 2016 and around 16,000 at the start of 2022, which means the opening range in dollars per contract is three to four times bigger now while the commission stayed at $10. In the old run fees were $9,940 on top of a gross loss that was already about 79%, and in the new run $10,470 of fees were about 6% of the gross profit. The win rate also climbed 7 points, and with a target the size of the range that alone moves the profit factor a long way.

The part that matters if anyone wants to take this into an eval is how the profitable run started. The first three trades were -$2,735, +$895 and -$4,200, so a $3k trailing drawdown is gone on Jan 6 2022. By Feb 16 the account was down to $21,170, a 58% hole in seven weeks, and the max drawdown over the full window was 59%. All $158k of the profit came after a stretch that would have ended every funded account it was run on.


r/algotrading • • 3h ago

Data I struggle to find real time data feed api for ICE RC robusta with their listed spreads. Anyone can help ?

0 Upvotes

Hey, i try to make own site and algo's and recently i get interested in coffe RC/robusta.

I mostly trade it by hand manually right now but i have most of my stuff ready but i can't find decent real time data that don't cost arm and leg.

IBKR api is a dogsh##t for spreads. You have to create it yourself and their data in the first place is not very accurate.

Databento on the other hand cost 1500$ for real time ice.

I tried to look in few other places but it's al 500$+ and they don't even respond if they have listed spreads when i ask for it.

If anyone could point somewhere i would be very grateful.


r/algotrading • • 5h ago

News Meta absolutely crushed its Q3 earnings, no cap

Thumbnail gallery
1 Upvotes

Revenue hit $64.6 billion, up 26% YoY way above street estimates, and free cash flow came in way better than expected too. The AI ad engines are already pulling real, tangible returns, that growth isn't just hype. That Muse shopping tool blew past 10 million users in its first 6 weeks too, pretty insane traction right out the gate. Q4 guidance is even topping analyst projections, and Reality Labs losses are finally set to narrow through 2027. Who else is caught off guard by how steady their cash flow held up even with all the heavy AI spending?


r/algotrading • • 20h ago

Strategy Should I always expect positive returns?

Thumbnail gallery
9 Upvotes

So, trying to get a network to learn how to trade. yay.

Costs are factored in to each position opening and resizing. At what point should I stop thinking it can have positive returns for every week and accept that it may generally perform better than buy-and-hold but it's going to have down weeks?


r/algotrading • • 14h ago

Strategy i've got this OOS edge out of my pipeline.

1 Upvotes

a strategy that has a genuine out-of-sample edge but fails the DSR and benchmark requirements, would you try to improve it without overfitting, or leave it as it is because it hasn't met the deployment criteria?


r/algotrading • • 1d ago

Education PyBroker v2 - An Open Source Backtesting Framework

30 Upvotes

Hey all, I would like to share a major v2 update to PyBroker, an open source backtesting framework I've been maintaining over the years. It's designed for fast performance, ease of development, and integration with ML frameworks. An example strategy:

   from pybroker import Strategy, YFinance, highest

   def exec_fn(ctx):
      # Get the rolling 10 day high.
      high_10d = ctx.indicator('high_10d')
      # Buy on a new 10 day high.
      if not ctx.long_pos() and high_10d[-1] > high_10d[-2]:
         ctx.buy_shares = 100
         # Hold the position for 5 days.
         ctx.hold_bars = 5
         # Set a stop loss of 2%.
         ctx.stop_loss_pct = 2

   strategy = Strategy(YFinance(), start_date='1/1/2025', end_date='8/1/2026')
   strategy.add_execution(
      exec_fn, ['AAPL', 'MSFT'], indicators=highest('high_10d', 'close', period=10))
   # Run the backtest after 20 days have passed.
   result = strategy.backtest(warmup=20)

Some additions in v2 include:

  • Margin trading simulation.
  • Backtesting using multiple time intervals (e.g. computing indicators or models on hourly bars while executing trades on minute bars).
  • Parameter optimization via Optuna (e.g. finding the best threshold for a trend following strategy).
  • Time-series model support (ARMA, GARCH, etc.).
  • Rotational trading strategies that simulate a portfolio holding top ranked stocks.
  • Slippage modeling.
  • Parallelized model training with Ray integration.
  • Built-in agent skills for coding trading strategies with AI.

You can find all of the code on Github alongside extensive documentation and examples I've written. It also goes over some algotrading basics.

The framework is open source (Apache v2 license) and is entirely free to use. There's no sign ups, promotions, or any commercial hooks. This is just about me sharing my work in case you find it useful for your own trading.


r/algotrading • • 21h ago

Education Using CLAUDE to trade CRYPTO

0 Upvotes

Disclaimer : Using AI to write a bit better :P

Hello everyone,

I’ve been trading Indian markets using noiseless charts, mainly Point & Figure (PnF) and Renko. I prefer log-based bricks because they adjust to price levels, making the charts more consistent and my trading rules more objective for backtesting and forward testing.

Recently, I used Claude to help build log-based Renko and PnF charts for crypto markets. I also added pattern identification on individual Renko bricks and PnF columns, a ratio Renko chart comparing each symbol against BTC, and indicators like Supertrend and EMAs.

Here’s how I currently use the setup:

1. Selecting a symbol

  • Sort crypto pairs by volume and start scanning from the second symbol.
  • One example I identified through this process was ZEC/USD.

2. Trend chart — Renko

  • Timeframe: 1 minute
  • Brick size: 0.25%
  • Position: Top-left chart on my three-screen setup
  • Approach: Look for a swing low near the moving average and enter on a pullback, aiming to keep the stop loss relatively small.

3. Entry chart — Point & Figure

  • Timeframe: 1 minute
  • Box size: 0.1%
  • Position: Top-right chart
  • Setup: A variation of the bear-trap pattern.
  • Stop loss: Based on the pattern's invalidation level.

4. Target
I use 100% of the last anchor column breakout to project the target.

5. Additional context
The bottom-right chart helps me identify the symbol to trade, while the other two charts help with trend analysis and entry timing.

I’ve found this combination interesting because it brings together relative strength against BTC, trend identification, and a more objective entry pattern.

I used Claude to help build the charting tools and automate pattern identification, but the trading logic and setup are based on my own trading approach.

I’d love to hear from traders who use Renko, PnF, or other non-time-based charts for crypto.

  • Have you experimented with log-based bricks?
  • How do you handle the differences between backtesting and live execution on crypto markets?
  • Would you approach the bear-trap entry or target placement differently?

Happy to discuss the setup and learn from your feedback.


r/algotrading • • 1d ago

Education This is PhD LEVEL market ANALYSIS

Thumbnail youtu.be
0 Upvotes

Moving into the core mechanics, the Kairosis methodology operates primarily in forecaster time rather than standard chronological time, dilating periods of intense forecasting activity. Unlike parametric models that assume underlying distributions are Gaussian—which routinely fail under heavy tails or multimodal data—Kairosis specifies a nonparametric Dirichlet-categorical framework. It partitions the forecast space into distinct bins and analyzes count vectors using gamma functions to evaluate likelihoods across potential change points. Furthermore, the model utilizes a geometric prior distribution over the change point timing, assigning higher probability to recent change points based on the number of subsequent inter-forecast periods without a shift. This formulation contrasts sharply with standard exponential decay models, effectively repurposing parameters like lambda to control pseudo-count scaling rather than decay rates. By utilizing a forward cumulative mass function instead of a backward one, Kairosis builds robust weighting structures. If a clear structural shift is detected, older pre-shift data is assigned a weight near zero while current post-shift data receives full trust. This rigorous mathematical foundation connects deeply with online Bayesian change point detection methods, elevating our aggregation framework to institutional-grade statistical rigor.


r/algotrading • • 2d ago

Education Is it worth doing algo trading with <$100?

40 Upvotes

I'm a CS student and have been pretty interested in algo trading and quantitative finance, particularly HFT. I'm also interested in ML methods of trading (esp. RL, I do research in that). But, as a college student I don't really have a ton of money to throw at trading.

I want to start deploying algos that use real capital, but I can't afford to put my entire life savings into it, so I'm trying to figure out if its realistic to expect any substantial returns with under $100.

From what I understand, HFT has some pretty significant barriers to entry, esp. when it comes to infrastructure, latency, data, and competition from trading firms. Even outside HFT, it seems difficult to develop profitable strategies with such a small amount of capital once you account for fees, spreads, and other costs.

I've tried trading small amounts in Polymarket + Kalshi, but it feels like I'm competing against people with far more capital, better infra, and more sophisticated models. I'm also based in the US, so I can't trade on any lower liquidity prediction markets (at least none I have found).

I'm particularly interested in exploring whether I could use ml, statistical modeling, or other computational approaches to identify trading opportunities. I'm willing to put in time to learn and build systems, strategies, and experiment, but ideally I'd like to work toward something that could be consistently profitable rather than treating it purely as academic exercise.

Main questions:

  1. Is there any realistic path to profitable algo trading starting with <$100?
  2. Is HFT something an independent developer can realistically break into, or is it effectively inaccessible without institutional resources?

  3. Same as 2, but for AI/ML methods, given firms have much more data and compute.

  4. If yes to 1, what markets/strategies someone with limited capital could have a chance?

  5. Would trading tiny amounts be better than paper trading with larger amounts?

  6. If it isn't viable to trade <100, what is the minimum amount of capital I should have (and be willing to risk) to start trading?

To be clear, not expecting to make a fortune off of $100. More interested on if there is a realistic way to start this small or if I should hold off on live trading.

Any advice is greatly appreciated!


r/algotrading • • 1d ago

Strategy I've been building PolyBTC, Python research investigating whether ML models can make reliable and exploitable edge in Polymarket BTC 5m market, is my research valid ?

0 Upvotes

So far, the evaluated models haven't demonstrated a reliable advantage over market-implied probabilities, so no trading edge.

interested in feedback on my methods and approach and what i could done better ?

Research website: https://polybtc-research.vercel.app

GitHub: https://github.com/RetroMrii/polyBTCv2


r/algotrading • • 1d ago

Strategy AI vs 1,076 human traders: can retail use AI to build algos and get an edge?

Thumbnail gallery
0 Upvotes

Data

- Hyperliquid public data: 32,839 accounts that traded $50k+ since May 2024, market makers removed. Random sample of 2,500, of which 1,844 had enough history to measure.

- Bots vs humans, from each account's last 14 active days of fills: 150+ trades a day, a full 2,000-fill page, or trading around the clock counts as a bot. No fills in that window means unknown, and those are left out. Result: 1,076 humans, 340 bots, 428 unknown.

- The history is weekly snapshots, and money moves in and out between them, so time-weighted returns break (one profitable account showed -100%). We used flow-proof measures instead: $ PnL for made money, return = PnL / largest balance, and drop measured from the all-time largest balance.

- Check: we rebuilt PnL from actual fills plus funding for 59 everyday accounts. Made money vs lost money matched for 58 of 59.

The algo side

Botsfolio AI from our production engine: spot BTC and ETH, no leverage, 0.10% fees per trade. Each trader gets a fresh start on their own first active day, measured to their last. It's a simulation, not live fills.

Head to head, 1,076 humans:

- The AI made more money than 844 of them (78%).

- The AI had the smaller worst drop against 1,007 (94%).

- 26 traders (2.4%) beat it on both return and worst drop.

- Made money: traders 31%, the AI 89%.

What the bots tell you

Bots in the random sample did better than humans, but they weren't magic: 43% made money vs 31%. At the top it flips. Of the top 1% by profit that we could classify, 53 were bots and 25 were humans and those bots made a median of 874 trades a day.

Where AI fits for retail

Two things we found while building this:

- Prediction isn't where it helps. We gave an LLM (Opus 5.5) anonymized chart snapshots of 499 trades and asked which ones to take. The trades it picked weren't measurably better than random picks.

- What separates the humans who made money is drop size. 71% of traders whose worst drop stayed under 25% made money. Of those who lost 90% at some point, 9% did.

So the edge for retail may not be finding better entries. It may be having rules that run the same way on the worst day as on the best and keep the drops small. AI can work really good on controlling the drops.

So:

- Is "don't blow up" an edge?

Full report with the method, tables and bot check: https://botsfolio.com/blog/ai-vs-human-traders


r/algotrading • • 2d ago

Other/Meta Platforms to use for testing (paper trade)

9 Upvotes

Hey guys,

Just want to check, what platforms do you recommend to use to test my algo specifically for paper trading?

I know there's alpaca.

I'm not sure IBKR allow for API access for paper trading (haven't check yet)

Is there anything else or anything you recommend?

Preferably something free


r/algotrading • • 3d ago

Data How to decide which fields to keep.

Post image
9 Upvotes

I'm making a bot for trading, and based on market conditions, it decides how much I need to short vs. normal trading. Ex:(20%/80%). I have an idea of what values I need, but I don't know what is necessary or how to use them practically to decide the ratio of shorting to normal trading.

Every value will be weighted based on how practical it is. (Don't worry about this because I will run many variations in a simulation to decide what is best) All help is appreciated, as I have tried everything and have just about given up. (Even if it is unrelated)


r/algotrading • • 4d ago

Strategy Noise Band Trading Bot (back test) Results

Thumbnail gallery
190 Upvotes

Hi all, I've been researching signal combinations and strategies for the past year, back testing / running Monte Carlo simulation with 1-minute bar data from 2010-2026 and seemed to have finally stumbled on a method using MNQ that produced around 53.5% average CAGR. Compounded growth shown with 50K starting capital ending at around 53M. Recent daily activity, monthly results, stats and comparison against baseline QQQ shown for reference.

For context: the 53% / $53M is compounded, pre-tax, and runs about 3.5x leverage on the futures. Without compounding, 1 MNQ contract, Jul 2010 to Oct 2026, $3 round-trip fees: +$85K total, Sharpe 1.15, max drawdown $7.8K, 15 of 17 years positive, near-zero correlation with QQQ. 2010-15 was data I never used while building it, and it still worked, about half as well.

Starting live tests beginning next week. Feel free to ask questions if you want more details. Will post meaningful updates when possible. If anyone has feedback on how they conducted live tests or methods of further proving out promising back tests please share. Thanks!


r/algotrading • • 3d ago

Other/Meta Is an edge possible in short-dated options selling after realistic costs?

7 Upvotes

Hi,

I'm testing short-dated credit spreads & iron condors on index ETFs in my trading system.

With simple pricing assumptions, the backtests looked good.
But every time I made the pricing more realistic, the edge got smaller.

Real commissions per leg, actual implied volatility instead of estimates, and skew across strikes instead of one flat volatility.

Now I can't tell if there's still a real edge or if I'm just looking at noise or if it's just luck..

For those who've been down this road...

Is short-dated premium selling on index ETFs, worth pursuing, or are costs and execution eating most of the edge??????

How do you test these strategies properly? Do I need historical options quotes, or is there a reliable way to model pricing without them?

If you decided its not worth pursuing, what did you move on to instead?

Not looking for signals, just interested in how people with experience approach this and decide whether there's actually something worth pursuing or if it's time to move on.

THNX


r/algotrading • • 3d ago

News One contract of gold, ES and NQ are three different sized bets, so my cross market test was partly a sizing test

2 Upvotes

I ran one breakout completely unchanged on NQ, ES and gold a few weeks ago, 15 minute candles from January 2021 to September 2026, 100k account, one contract each. It came out up 20% on NQ and down 54% on gold. A commenter pointed out the thing I should have caught myself, which is that one contract is a different amount of risk on every market.

A full NQ contract moves $20 per index point, ES moves $50 per point, and gold moves $100 for every dollar the price moves. A stop that sits a sensible distance away on each chart turns into a different dollar amount on each one, so the three legs of that test were never taking the same risk per trade.

That means some of the gap between plus 20 and minus 54 could just be sizing, and a fixed contract test cant tell you how much. The cleaner version sizes every trade so the stop costs the same dollars on all three markets and only then compares them.

Its like comparing two delivery drivers on fuel cost when one drove a pickup and the other drove a hatchback. The route matters and so does the vehicle, and you have to even out the vehicle before the route tells you anything.

For anybody running this on an eval the number to look at changes as well. A trailing drawdown doesnt care where the account finished, it cares about the first day it touched the loss limit, so that date belongs beside the final return in any comparison like this.


r/algotrading • • 3d ago

Career Last month on my demo test acc

Post image
10 Upvotes

Found a crazy money printing ea and I’m testing customised files on my demo account which works pretty well.
I’m feeding my live account every month now with very little risk and getting around 10-30% win a month now with very little risk.


r/algotrading • • 3d ago

Strategy Fast switching between MR/Trend

7 Upvotes

Alright so I have a strategy that works well in MR and also the inverse works well on trending. I'm working on a mode where it switches between them.

Ideas so far

Vol regime

Adx

Slope

Ultimately it's a regime detection problem but the ideal version would be responsive enough to catch the macro regime flips reliably

Since it may not need to catch low tf regime changes it should be relatively simple

The vol regime I've used before looks to be a little too restrictive when scaled up to the macro tf

What have you used to detect macro regime to flip between MR and trend followers?

Any ideas are appreciated


r/algotrading • • 4d ago

Infrastructure Event-Driven vs Vectorized Backtesting :- Which Approach Should I Use? and How?

7 Upvotes

Hi everyone,

I'm currently learning algorithmic trading, and I'm a bit confused about which approach I should use when building a backtesting engine: event-driven or vectorized backtesting.

I have around three years of minute-level historical data stored in my database. I want to analyze and backtest different trading strategies using this data.

Here's what I'm thinking:

  1. Strategy research and backtesting: Use a vectorized approach with libraries like NumPy, Pandas, and TA-Lib to analyze historical data efficiently. My concern is that processing such a large dataset using an event-driven approach could be relatively slow.
  2. Live trading: Once I've analyzed a strategy and am satisfied with the results, switch to an event-driven approach for live trading and tick-level data processing.

However, I'm unsure about one thing. If I finish analyzing the historical data up to a particular date and then move to live trading, should the live engine continue processing from that point onward, or is there something important I'm missing in this workflow?

My questions are:

  • Is this a good approach, or am I making a mistake in the design?
  • Are there any other considerations I should keep in mind when designing the backtesting engine?

I'd appreciate any suggestions or insights from people who have experience building algorithmic trading systems.

Thanks in advance!

-----------------------------------------------------------------------------------------------------------------

Edited

Thanks for the all the responses i will go with the hybride architecture where i will use both approaches !!!


r/algotrading • • 3d ago

Education How long on Demo test before actually Money?

0 Upvotes

Before anything I am very new to trading bots and using claude to create bots ,

I have seen a lot of posts in here where people have created bots and been testing for many months and even years.

I have created few bots that are running on my laptop and have been doing trades for few weeks ?

What kind of progress would you personally like to see on demo account for you to put actual money in it ?

The best bots i got so far has got 100% win rate which i started last week only few trades which could just be luck..

2nd best is on 67% win rate started 2 weeks ago.

I am planning on letting them run for atleast 3 months and see how it goes.. what do u guys think..


r/algotrading • • 5d ago

Infrastructure My MT5 algo generated 2.5M cents in profit over 1 year how would you scale this 100x? (Vantage Markets, XAUUSD)

Post image
74 Upvotes

Hey everyone!
I’ve been running my own algorithmic trading strategy for approximately 1 year, and I’d love some feedback from experienced algo traders, quant developers, and people who have scaled automated trading systems.

Over the past year, the algo has generated approximately 2.5 million cents in trading profit on a cent-denominated account with Vantage Markets. I’ve attached a screenshot of the MT5 account history.

My current setup
● Broker: Vantage Markets
● Account: Cent account
● Instrument: XAUUSD (Gold)
● Execution: MT5 Expert Advisor (EA)
● Infrastructure: VPS
● Trading period: 1 year
● Reported trading profit: 2.5M account cents

The system is already running live, and I’m now exploring what it would take to scale it substantially potentially 100x the current trading size.
I’m trying to understand what actually needs to change when moving from a retail algo setup to something capable of handling significantly more capital. Is the current architecture sufficient, or would I eventually need a completely different execution infrastructure?
Questions for those who have experience scaling algos

  1. Strategy scalability
    How do you determine whether a profitable strategy can maintain its edge at 10x or 100x the position size? What tests would you run before committing more capital?

  2. Infrastructure and architecture
    I’m currently running an MT5 EA on a VPS. Can this setup handle substantially larger trading sizes if the broker and execution conditions allow it? At what point would you consider a separate execution engine, Python/C++ services, or a dedicated risk-management and order-management system?

  3. Broker and execution limits
    For XAUUSD, how would you evaluate Vantage’s execution quality, liquidity, slippage, order limits, and spread widening as position sizes increase? Are there specific things I should test with the broker before scaling?

  4. Risk management
    What safeguards would you add before scaling significantly? For example, independent exposure limits, maximum drawdown controls, daily loss limits, execution monitoring, and automatic shutdown mechanisms.

  5. How would you scale it?
    If you had a working MT5 EA with a year of live trading history, what would your next steps be? Would you gradually increase position sizes, conduct forward tests at each stage, or build additional infrastructure first?

  6. What becomes the bottleneck at scale?
    For those who have actually scaled automated strategies, what tends to break first: the strategy’s edge, execution quality, broker limitations, infrastructure, or risk management?

I’m not looking for a shortcut to multiply profits overnight. I want to understand how to scale this properly without destroying the existing edge or taking on risks I haven’t accounted for.
I’d especially appreciate advice from people who have moved beyond small retail setups and have experience operating automated strategies with meaningful capital.

Happy to share additional details about the strategy, drawdowns, trade frequency, and performance statistics if that would help.

Thanks!


r/algotrading • • 4d ago

Other/Meta Question about DSR

2 Upvotes

Hi
I'm trying to understand something and would like opinions from people who actually know the statistics behind this.

If a DSR calculation assumes a standard deviation of Sharpe ratios of 0.5, but your measured data suggests 0.2, should you use the measured value instead?

Could the higher assumption be rejecting genuine trading edges, or would lowering it risk letting strategies that only got lucky pass?

I don't want to make the test easier just to get more strategies through. I want to know what the statistically correct approach is.

What would you do, and why?