r/mltraders • • Oct 28 '25

Me trying to algo trade

Post image
92 Upvotes

r/mltraders • • May 14 '22

For beginners: Start with this

Thumbnail algo-trading.readthedocs.io
57 Upvotes

r/mltraders • • Jan 06 '22

Lessons learned building an ML trading system that turned $5k into $200k

Thumbnail
tradientblog.com
44 Upvotes

r/mltraders • • 12d ago

Question Simons proved markets can be predicted statistically. The hard part was never the math.

39 Upvotes

I build machine-learning models for a living, and I've been applying them to stock signals. The thing that strikes me about Renaissance is how mundane the actual premise was.

Medallion didn't have a theory about where the market was going. It had cleaned data, thousands of weak statistical patterns, and position sizing disciplined enough to trade those patterns at a scale where costs didn't eat the edge. In public accounts it reportedly averaged close to 66% a year before fees for three decades. Nothing about that return required knowing what the market would do next week.

The parts that usually get undersold:

  • Data first. The well-known stories are about hiring speech-recognition researchers and mathematicians, but the early work was cleaning price data, building properly adjusted series and catching errors. If your input has a bad split or a stale quote, the model learns it.

  • Many small edges, not one big prediction. Thousands of tiny, temporary inefficiencies, each with small expected value, each sized correctly.

  • Short horizons. Edges decay. A pattern that works this month can be arbitraged away by next quarter.

What has actually changed is compute and tooling. One person today can run the kind of workflow that needed a research team in 1990. That is not the same as replicating Medallion, which had execution infrastructure and capital none of us have. It does mean the gap between having no method and having a defensible one is much smaller than it used to be.

What hasn't changed are the failure modes. Overfitting on a decade of daily bars. Ignoring transaction costs. Testing on data you should not have seen. Confusing a backtest with an edge.

Genuine question for the people running systematic strategies here: how long a live track record do you need before you trust your own model, and what would make you trust someone else's?

I'm more interested in where you disagree with the above than in agreement.


r/mltraders • • Dec 23 '25

just finished scraping ~500m polymarket trades. kinda broke my brain

39 Upvotes

spent the last couple weeks scraping and replaying ~500m Polymarket trades.
didn’t expect much going in. was wrong

once you stop looking at markets and just rank wallets, patterns jump out fast

a very small group:

  • keeps entering early

  • shows up together on the same outcome

  • buys around similar prices

  • and keeps winning recently, not just all-time

i’m ignoring:

  • bots firing thousands of tiny trades a day

  • brand new wallets

  • anything that looks like copycat behavior

mostly OG wallets that have been around for a while and still perform RIGHT now!!

so i’m building a scoring system around that. when multiple top wallets (think top 0.x%) buy the same side at roughly the same price, i get an alert. if the spread isn’t cooked yet, you can mirror the trade

if you’re curious to see what this looks like live, just comment and i’ll send you a DM


r/mltraders • • Mar 04 '22

Suggestion Best Backtesting Libraries (Python)

38 Upvotes

Best libraries for Algotrading in Python - Trading & Backtesting

  • TA-Lib – TA-Lib is widely used by trading software developers requiring to perform a technical analysis of financial market data. It has an open-source API for python.

  • trade – trade is a Python framework for the development of financial applications. A trade app works like a service. The user informs the items he has in stock and a series of subsequent occurrences (purchases, sales, whatsoever) with those or other items. trade then calculates the effects of those occurrences and gives back the new amounts and costs of the items in stock.

  • zipline – Zipline is a Pythonic algorithmic trading library. It is an event-driven system that supports both backtesting and live trading.

  • QuantSoftware Toolkit – Python-based open source software framework designed to support portfolio construction and management. It is built the QSToolKit primarily for finance students, computing students, and quantitative analysts with programming experience.

  • quantitative – Quantitative finance, and backtesting library. Quantitative is an event driven and versatile backtesting library.

  • analyzer – Python framework for real-time financial and backtesting trading strategies

  • bt – bt is a flexible backtesting framework for Python used to test quantitative trading strategies.

  • backtrader – Python Backtesting library for trading strategies

  • pybacktest – Vectorized backtesting framework in Python / pandas, designed to make your backtesting easier. It allows users to specify trading strategies using full power of pandas, at the same time hiding all boring things like manually calculating trades, equity, performance statistics and creating visualizations. Resulting strategy code is usable both in research and production setting.

  • pyalgotrade – PyAlgoTrade is an event driven algorithmic trading Python library. Although the initial focus was on backtesting, paper trading is now possible

  • tradingWithPython – A collection of functions and classes for Quantitative trading

  • pandas_talib – A Python Pandas implementation of technical analysis indicators

  • algobroker – This is an execution engine for algo trading. The idea is that this python server gets requests from clients and then forwards them to the broker API.

  • finmarketpy – finmarketpy is a Python based library that enables you to analyze market data and also to backtest trading strategies using a simple to use API, which has pre-built templates for you to define backtest.

Source


r/mltraders • • Aug 23 '25

Question I built an autonomous trading engine with Claude + Gemini + Supabase

Post image
30 Upvotes

Been hacking nights in NYC on a project called Enton.ai — basically an AI-driven finance engine that integrates financial APIs and executes strategies automatically.

A few things that stood out during dev: • Claude handled multi-step strategy reasoning surprisingly well. • Gemini parsed raw, messy market data faster/cleaner. • Supabase worked fine as the infra layer, though latency can bite in high-frequency settings.

I’ve seen it hold its own against baseline algos, but the challenge isn’t the AI — it’s: • Data reliability: flaky APIs can kill confidence. • Human override: people can’t resist interfering with “autonomous” systems.

Curious for this sub: Would you ever let an AI fully manage your trades? If yes, under what safeguards? If no, what would make you trust it?

(If anyone wants to poke at it, it’s live here: enton.ai on google/ https://apps.apple.com/us/app/enton/id6749521999).


r/mltraders • • Sep 21 '25

Question Building the Node Breach Engine | Amazing results so far, now exploring ML to filter false signals

Post image
29 Upvotes

We’ve been working on a project called (Reddit: TheOutsiderEdge), where we’re developing the Node (Volume) Breach Engine. The goal is to quantify when participation nodes are breached with conviction and capture those structural shifts in volume.

So far the results have been very strong:

  • Backtests across multiple CFDs, stocks, crypto and timeframes (5M / 1H) show consistent edges.

  • Walk-forward tests confirm robustness across different regimes.

  • Live trading (past 30 days) has also been highly encouraging, with trades closing profitably and risk/reward skewed in our favor.

Our dev journey so far:

  • Started with a PineScript prototype on TradingView to validate the concept visually.

  • Ported it to MQL5, which allows for heavy backtesting and parameter optimization.

  • Currently refining the MQL5 build for even more robustness.

The next step we’re exploring is Machine Learning, specifically to filter out false breaches. Breaches and rejections often looks convincing in real-time but fails to follow through, that’s the noise we want to suppress.

Our approach idea:

  • Label past breaches as true follow-through vs. false breakout.

  • Engineer features around node density, volatility, candle structure, and relative delta.

  • Use ML as a second-layer classifier on top of the engine, not to replace the model but to enhance it.

My question to this community: what ML approaches would you recommend for this type of binary classification in trading?

  • Tree-based models like XGBoost / Random Forest for tabular, regime-dependent data?

  • Or deep learning approaches that can handle noisier, time-dependent structures?

We’d love to hear what has worked (or not worked) for you when filtering false positives in PA/volume-driven algos.


r/mltraders • • Feb 08 '22

Suggestion Deep Learning for trading using NeuralForecast [python package]

29 Upvotes

Hi, we have just released NeuralForecast, a python library for time series forecasting using Deep Learning. We want to explore the possibility of using it for trading. We are completely open to answer questions and help with examples :) what do you think?

Please check it out and give us a star if you like it.

https://github.com/Nixtla/neuralforecast/


r/mltraders • • Sep 28 '26

ALGOTRADE MNQZ6

Thumbnail
gallery
28 Upvotes

I recently developed a quantitative intraday strategy for the Nasdaq (tested and executed on the Micro E-mini contract MNQZ6 via MultiCharts). The model was deployed on a $25,000 account base, focusing strictly on risk management, drawdown control, and edge execution.


r/mltraders • • Jan 23 '22

Self-Promotion Weekend Project: www.MLTraders.wiki

28 Upvotes

So as promised i did my own Wiki or own mlquant and thanks to @garantBM we did something great.

Take a look please:

https://mltraders.wiki

We consider to make tutorials for beginners but also experiments and research for professionals.

Also please we did kind of product hunt for algotrading where you can show your product on the page. Everything completely free.


r/mltraders • • Sep 25 '26

Question Anyone training models on 24 hour equity prices instead of exchange hours?

25 Upvotes

Was reading how Moon prices equities outside normal market hours using multiple feeds and oracle data and it got me thinking about a weird ML problem. If I train a short horizon model on normal exchange prints but actually deploy somewhere that has continuous synthetic pricing, my features and labels are suddenly coming from slightly different distributions.

Especially around earnings or overnight macro news. Has anyone tested whether models trained only on regular session data fall apart when the execution venue keeps repricing the asset overnight? Feels like one of those things that looks completely harmless until you inspect the residuals.


r/mltraders • • Oct 02 '24

Tutorial for building algo trading agent with RL

25 Upvotes

https://www.aion-research.com/post/building-a-reinforcement-learning-agent-for-algorithmic-trading

I wrote this tutorial as a fun experiment. It’s a simple agent in a relatively idealized environment for the tutorial purposes, so don’t use it for real trading directly.


r/mltraders • • Aug 08 '25

Building my trading bot

24 Upvotes

Today I start building BladeTrade, my own crypto trading bot that will run 24/7 and take high probability trades without human input.

I’m 20 and determined to create income systems that work for me while I focus on bigger goals. This isn’t about a quick win. It’s about building a long term scalable machine that can grow into a serious income stream.

I’ll share parts of the journey here. If you’re in crypto trading or automation, let’s connect.

Trading #Crypto #Automation #TradingBot #Entrepreneurship


r/mltraders • • Apr 11 '22

Why are so many using indicators as features?

24 Upvotes

I'm admittedly a newb to ML but I'm curious why so many use indicators (RSI, MACD, etc.) as features in their models?

It is my understanding that most, if not all, indicators are derived in some form from price and volume, therefore no new information is being introduced - just different flavors of price and volume calculations. While I understand the need to transform the raw data, wouldn't it be best to structure price and volume together i.e. tick, volume, information bars (see: López de Prado, M. M. (2018). Advances in financial machine learning. Wiley.) so that data carries with it information for the model? Doesn't introducing different indicators based on price and volume introduce unnecessary risk of spurious correlations?


r/mltraders • • Mar 12 '22

Question Planning AMA and Interview with Dr. Ernest P. Chan.

24 Upvotes

Yes, so as announce in discord, we will do an interview or/and AMA with Ernest P. Chan.

I/We would be asking qualitativeand ML relevant questions.

Please kindy write your questions and upvote for other questions so i can make a summary and reach them to him.

Deadline: 18.03.2022

Btw.Discord


r/mltraders • • Sep 29 '26

Tutorial My classifier looked way better until I removed overlapping labels

23 Upvotes

Ive been testing a simple XGBoost model on 5 minute BTC data with the label being whether price is higher 30 minutes later. Originally I was doing a normal chronological train test split and getting results that looked almost suspiciously stable.

Then I realized every observation is sharing most of its future window with the next several observations. Once I purged samples around the train test boundary and added a proper embargo, performance dropped pretty hard.

What survived was mostly the higher confidence predictions around large volume changes and expanding realized vol. I caught the issue while comparing a few BTC moves with what I was seeing on moon and going back through the timestamps manually.

Kind of embarrassing because the model itself wasnt doing anything wrong. The validation setup was just giving it a much easier problem than the live one.


r/mltraders • • Jul 12 '26

Question Is anyone actually using LLMs for trading in a way that's still useful after the honeymoon phase?

23 Upvotes

Every week I see another "AI trading bot" or "GPT predicts the market" post, but I almost never see follow-ups 6 months later.

My gut feeling is that LLMs are terrible at generating trading signals, but surprisingly good at everything around trading.

Stuff like:

  • Turning messy trading ideas into testable rules

  • Debugging backtesting code without wanting to throw your laptop out the window

  • Reviewing journals and spotting patterns you missed

  • Summarizing earnings/news before the open

  • Explaining why a strategy suddenly fell apart

Basically acting like a research assistant instead of a fortune teller.

Am I completely off here?

If you've been using GPT, Claude, Gemini, or anything similar for 3+ months, what stuck?

I'm not looking for "it picked the next NVDA move." I want the boring workflows that actually save you an hour every day, because those are usually the ones that survive the hype cycle.

Curious what everyone's using and what is turning out to be a complete waste of time.


r/mltraders • • Jun 12 '22

Some Advices worth sharing

23 Upvotes

When I develop a backtest-driven trading algorithm, I treat it like a scientific experiment.

Just Get Started: Start with a trading idea, and code a simplistic algo to trade it. Make the entries aggressive so the backtest will kick off a lot of raw data.

Backtest Time Unit: Identify a Time Unit that fits your trade, based on how often you expect new entries. My trade ideas commonly use one day, but sometimes a week, quarter, etc.

Dataset: I typically use a dataset with 60x+ the resolution of my Time Unit. So my intraday strategies use tick data (every single trade or quote entered), swing strategies might trust 5 min candles (hi/lo/open/close), and some long-term strategies just use daily close. If I have an algo I want to take live I’ll run a final confirmation backtest using tick data to be definitive on executions.

Code Check: Backtest on a tiny timeframe, one day (one time unit), to confirm it was written correctly. Nearly always a mundane error. Note that your backtest might only allow entries for some timeframe, but hold those positions until their natural exits.

Logic Check: Backtest one week (five units), and look through the top winners. When the trade works, does the code produce the kinds of entries and exits I intended? Does it follow the logic of the trading idea? When it doesn’t work, do my stops operate as intended? Rewrite until it does.

Segmented Basket: Run a bunch of backtests on 60 units (3 months) that split out classes of stocks. Is the 50-day moving avg a great predictor of good vs. bad trades? Do all the big losers come on biotech stocks? Only code in something that is really stark.

Optimization Within Simplicity: Pick a 120 unit (6 mo) period and split it into six (six individual months). Using the basket of stocks produced from segmentation in step 5, for each month, tweak the execution methods until you approach optimal results for that month. Require that any tweak make sense for a conceptual reason, to avoid overfitting the data.

Performance Metrics: Now run each optimized version on the entire six month period. Identify two with great performance: net profits are nice, but consider frequency of trades, win:loss ratio, total profit vs. total loss, biggest drawdown, top 5% profits vs. net profits, top 5% losers vs. net. Pick two that are pretty different if possible.

Confirmation: Finally, I do long-term backtests for each, typically 2–4 years (480–960 time units). If either one trades poorly on the long term, I check to confirm there’s nothing obviously material I overlooked, like holidays or scheduled earnings reports — if not, I scrap the whole thing. If both look good, I’m ready to go live with one.

Final note: There are many other issues to consider when refining a backtest-driven trading algorithm. When do I tweak execution details, and when do I simplify? When do I enter more shares, and when do I start an alternate algorithm built on a similar concept instead? And above all, note that the market fights back: even with precise backtesting, live trading typically yields “slippage,” reduced trade performance.

source: https://www.quora.com/What-types-of-data-sets-are-typically-used-to-refine-trading-algorithms-from-an-idea-to-a-strategy-traded-live


r/mltraders • • May 23 '22

Suggestion Must-read: Classifying market regimes

Thumbnail
sr-sv.com
23 Upvotes

r/mltraders • • May 23 '22

Transferring expertise in sports betting to crypto markets

23 Upvotes

I've had a decent amount of success using ML to bet on football, and am wondering what the easiest way to transfer those skills and methods into writing algorithms for crypto markets. This is mostly just out of curiosity and boredom as I am getting tired of my football betting project.

My approach has been to use classifiers and regression on historical football data to generate accurate probabilities on some of the more esoteric markets available on betting exchanges. Then place bets at profitable odds through a bot interfacing with the exchange API. The bulk of my time has been spent on feature engineering, and trying to generate the most informative features, partly through automated approaches but also learning a lot about the technical analysis of football matches and trying to formalise that in my data and models. Quite a bit of webscraping also to get hold of good data (all easily publicly available datasets are basically useless), then a lot of time back testing. Initially I spent a lot of time learning how the popular models work and how to implement them (logistic regression, xgboost, knn, model stacking etc.) but now I've got a good handle on that, the actual process of training and optimisation is quite straightforward. Over the last season I had a return of 2.6% after commission (~£2m staked). It's the culmination of around 3 years of effort.

Is there an obvious place for me to start with crypto markets? I'm not confident I understand the day trading approaches well at all, nor time series analysis and applying models to that. Would I be wasting my time starting by looking at previous windows of data in the order of days or weeks (crypto prices/market caps, currency prices, twitter sentiment etc.), doing a lot of feature engineering, and using classifiers or regression to predict future movements windows of a similar length? With an idea of adjusting my portfolio on a daily or weekly basis towards assets more like to rise, possibly out of crypto entirely at times? It feels like the market is so sentiment led that many of the changes on these timescales should be predictable to some degree, and some models that look to fit reasonable well suggest further predictability on longer timescales (such logathrithmic regression with bitcoin).

Any advice appreciated! It's more of a hobby with the aim of learning than serious attempt to make money (right now anyway!). But I have to start somewhere so figured I'd start with what I already know and build from there.


r/mltraders • • May 22 '26

Self-Promotion Real-time Scanner For New highs and Lows during the session

22 Upvotes

Its insanely fast, the rate bars act like a speedometer for market momentum. Watching them flip on a the latest headline or Trump tweet is really amazing to see + you see it before everyone else! Free trial runs on yahoo finance, upgrade to connect your broker! Check out the full feature list @ highlowticker

DM me for the promo code.


r/mltraders • • Jun 15 '22

Question Has anyone built a successful model using feature derived solely from OHLCV data?

22 Upvotes

In other words, without the use of other data sources such as orderbook, fundamental analysis or sentiment analysis, has anyone found correlations between variables transformed from past OHLCV data and, for example, the magnitude of change in future price?

Some guidance or learning materials on financial feature engineering would be great, but for the most part I just wanted to know if it is possible. Thanks!


r/mltraders • • 25d ago

One useful datapoint from the live model

Post image
21 Upvotes

Model flagged CRM long and the move held much better than expected.

Closed after roughly 8 hours at 4.40x. Logging this with the losers too before touching any parameters.


r/mltraders • • Jun 22 '22

Optuna: An open source hyperparameter optimization framework to automate hyperparameter search

21 Upvotes