r/algorithmictrading • • Aug 06 '25

Any tips on building trading system with multi agents using LLM?

7 Upvotes

Recently I had the opportunity of learning and building an agentic system for a B2B product. It was fun and really cool to see what is possible with LLM agents.

Has anyone tried building an algorithmic trading system using LLM agents? What was your experience like? Any tips you might want to share?


r/algorithmictrading • • Jul 25 '25

If you’re backtesting, don’t mess this up

7 Upvotes

couple things that matter way more than people think: 1. test at least 200–500 trades minimum. anything less is just noise. 2. use real data—slippage, spreads, bad fills. not clean candle closes. 3. set fixed rules. no “i would’ve maybe entered here.” nah. rules or nothing. 4. track everything. R multiples, drawdowns, time in trade, etc. 5. don’t tweak the system mid-test. that’s cheating. 6. don’t trust strategies that only work on 1 pair, 1 timeframe, 1 year. that’s curve-fit garbage. 7. if it only works on TradingView’s replay mode, it doesn’t work.

the goal isn’t to find a perfect system. it’s to see if the thing you’re running actually has edge—or just looks cool on hindsight charts.

most strategies fall apart once you test them properly. and that’s a good thing. means you’re getting closer to the truth.

btw—i’m building a no-code backtesting tool that fixes all this junk. dms open if you want to help test it early.


r/algorithmictrading • • Jul 10 '25

Quotes An open-source alternative to Yahoo Finance's market data python APIs with higher reliability.

7 Upvotes

Hey folks! 👋

I've been working on this Python API called defeatbeta-api that some of you might find useful. It's like yfinance but without rate limits and with some extra goodies:

• Earnings call transcripts (super helpful for sentiment analysis)
• Yahoo stock news contents
• Granular revenue data (by segment/geography)
• All the usual yahoo finance market data stuff

I built it because I kept hitting yfinance's limits and needed more complete data. It's been working well for my own trading strategies - thought others might want to try it too.

Happy to answer any questions or take feature requests!


r/algorithmictrading • • Oct 12 '24

RL Trading

7 Upvotes

Hi, so I've been using a RL system I've built some time back to trade forex (mainly EURUSD & USDCHF). It works, I make money and there is no problem with the system itself, been using it with great success for almost 2yrs. The one thing I find is that trades are held onto relatively long so I'd say its closer swing trading system.

I'm planning on training a new version for scalping/day trading and to achieve this I plan on introducing a TP/SL into the custom env that I've built (the agent will still maintain the ability to close trades before tp/sl). This is will be considered similar to scalping.

I'm a bit caught on the fence about what tp/sl ratios are good for scalping as well as defining what range of pips I should target given the pairs i mentioned above. I've never been a scalper but I can see this being extremely profitable since my broker doesn't charge comm, has relatively low spreads and I earn rebates.

Any recommendations and input will be highly appreciated!


r/algorithmictrading • • Jul 07 '24

Trading using LLM agents

7 Upvotes

Has anybody implements LLM Agents for algorithmic trading? By providing information to the agents, you would have your own advisor type of thing.


r/algorithmictrading • • May 13 '24

Integrating Python and ML Algorithms with MT5 for Forex Trading: Worth it?

7 Upvotes

Hey everyone!

I wanted to share my thoughts and ask for some advice on integrating Python and machine learning (ML) algorithms with the MetaTrader 5 (MT5) platform for Forex trading. I've been using Python and ML techniques to gather information and analyze the Forex market, and now I'm considering integrating my algorithm with MT5 to create trading signals and automate order execution.

I believe that integrating Python with MT5 can be a game-changer for Forex trading. Python offers a wide range of powerful libraries for data analysis and ML, which can help us make more informed trading decisions based on historical data, patterns, and market indicators. By leveraging Python's capabilities, we can potentially improve our trading performance and profitability.

However, I'd love to hear from those who have already integrated Python algorithms with MT5. Did you find it worth the effort? How was your experience with it? What challenges did you face, and how did you overcome them?

If you have any insights, advice, or even cautionary tales to share, I'd greatly appreciate it. Let's discuss and learn from each other's experiences!

Looking forward to your thoughts and inputs. Cheers!


r/algorithmictrading • • Jul 11 '23

Test My Machine Learning Tool for Predicting Stock Market Impact of News

7 Upvotes

Hello! My friends and I, who are total geeks when it comes to data science and data engineering, have developed a tool that uses cutting-edge Machine Learning algorithms. It predicts how the latest news might swing a stock's price, and we publish this news and our analysis on our Discord channel. While we're pretty solid with the data science and engineering part, we're looking for algo, intraday, and other types of traders to help us put the tool to the test.

We're not just about giving you the sentiment of the news - we go deeper. We provide the real deal: the actual probability that a news story will nudge the stock price of the company in the spotlight. This is all based on a hefty historical news dataset from the top 20 publishers. So, if you're into alternative data, this could be an interesting experiment for you.

Our tool shines particularly with small-cap companies, sniffing out news about FDA approvals, partnerships, drug results, M&A, new contracts, etc. Check out this piece of news our tool picked up recently:

News: Incannex Receives Ethics Approval for Bioequivalence/Bioavailability Clinical Trial for IHL-42X, the Company's Proprietary Drug for Treatment of Obstructive Sleep Apnoea ('OSA')

Impact Probability: 20 %

https://www.globenewswire.com/news-release/2023/07/06/2700360/0/en/Incannex-Receives-Ethics-Approval-for-Bioequivalence-Bioavailability-Clinical-Trial-for-IHL-42X-the-Company-s-Proprietary-Drug-for-Treatment-of-Obstructive-Sleep-Apnoea-OSA.html

chart:

Right now, we're on the hunt for folks who are up for testing this data within their strategies and aren't shy about giving us the lowdown on its usefulness and areas we could improve. Here's the link to our Discord channel: https://discord.gg/94XJkmvPbC

Don't forget to follow us on our subreddit, r/StockNewsImpact, where I'll be dishing out general overviews on how news is impacting stock prices.

We're stoked to see your participation and hear your thoughts. Thanks, everyone!


r/algorithmictrading • • Jul 03 '23

Good broker for retail quant trading?

7 Upvotes

It should have an API and low commissions. Looking to do $1 million/day in US equities.

I see TradeStation advertising zero commissions. Is that real?

Fidelity has zero commissions but no API.

Interactive Brokers has zero commissions and an API but does not at the scale I anticipate.


r/algorithmictrading • • Dec 26 '22

Sources of historical and live fundamental stock data?

7 Upvotes

I'm looking for clean, robust and reliable fundamental stock data suitable for backtesting and for live trading.

Ideally this would be a single source from which I could bulk download decades of historical data and also get a stream of live data, so a trading system trained on the historical data could easily be used to trade on the live data without fear of format changes or inconsistencies resulting from different data sources.

Do such sources exist?


r/algorithmictrading • • Feb 21 '22

I created small algo bot but it is very simple

7 Upvotes

Hey I created small algo bot that uses pivot, fib ret. and very easy candle patterns to long or short. It works smth like this when in R or S and see two red and some kind of reversal long same for short. Then it waits for some time if it bought and same proccess. Trade close most partly bcs of trailing stop and thats it. Any ideas how to make it more complex, some literature u use or ideas what to use to determine better entry or exit bcs sometimes it just hit stoploss sometimes it hits trailing stop in green but plus 1/4 of stop loss and sometimes it hit stop loss 2-3x plus in profit from stop loss. When i want to swich to real money in long term i think it could be in loss and in plus but i didnt want to overfit it. Thanks in advance


r/algorithmictrading • • Jan 23 '22

I’m building a trading algo from scratch

7 Upvotes

Title says it all. I dipped my toe into crypto trading last year and connected with someone who runs a service through a trading bot marketplace. I learned a lot about indicators and combinations that you can apply.

Later I learned PineScript through TradingView and learned I could build a pretty robust backtest engine where I layered indicators from different resolutions and could synthetically simulate how it would function with this particular platform.

I’m a JS dev by trade so for the past 6 months I’ve been working on converting my TradingView stuff into JS/Python.

My process is first getting data ingestion down. I have some ways of doing this, but when you’re starting out, you really just need csv data.

At first I thought, cloud cloud cloud, but that can get expensive fast if you don’t know what you’re doing, so I’m doing it all locally first as a POC before I start scaling out cloud resources. So I got my data sorted.

Next was TA, thankfully there are tons of libraries for this so what I wanted to do in lieu of calculating it ad-hoc is storing it. Then I can easily run queries off of different resolutions instead of recalculating it each time.

So now I’m at the point I’ve been waiting to get to. The backtest engine. With it, I can simulate buys, sells, trailing stops, take profits, “armed” trailing stops.


r/algorithmictrading • • Dec 21 '21

Monte Carlo Options Pricing

Thumbnail
blog.skz.dev
7 Upvotes

r/algorithmictrading • • Nov 16 '21

Can you trade MACD?

7 Upvotes

For some time I have been thinking about taking popular trading technics, indicators, strategies, etc. and running them agains representative dataset and sharing results. This is the first one.

If you interested in more please upvote let me know in comments what strategy you want to be backtested. If can keep going if there is an interest.

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

What I did:

  • I took all NASDAQ 100 stocks

  • Ran MACD Cross strategy for all of them from Jan 1, 2021 to Nov 5 (this when I was running the backtests)

    • Enter on MACD Cross UP; Exit on MACD Cross Down

  • Each stock had 10K allocated for purchase

On 3min interval you would end up with $39,718.4 profit

On 1min interval you would end up with -$7560.9 loss

And now the worst aspect of it: to run it you would need a capital of $900k =)

1min interval top 5 best performers

1min interval top 5 losers

3min interval top 5 best performers

1min interval top 5 losers

Disclaimer: I have made all the calculations using BreakingEquity


r/algorithmictrading • • Jul 06 '21

Looking for someone to work with

7 Upvotes

Hi everyone, I am a trader and software developer. I'm looking for someone to collaborate with, i.e. combine ideas to find more efficient algorithms (conceptually and practically) and trading signals. I already tried to develop something and collect some data a few years ago, I will share these insights with you if you will. If you're interested, send me a private message!


r/algorithmictrading • • Oct 25 '20

Team up for trading competition ?

7 Upvotes

Hey guys, I’m a sophomore at UIC, majoring in CS - I heard about this trading competition being hosted by Alpaca and I thought I’d post here to see if anyone might be interested in forming a team and competing. I’ve created some research, pairs trading algos before, but it’ll be great to have a team, the more brains the better .

https://alpaca.markets/blog/2nd-trade-contest/

Competition starts on Monday, it’ll be great if we can team up and submit something by mid next week!


r/algorithmictrading • • Aug 22 '20

Price "momentum" formula? How can I make a data point that uses a change in price, amount of time, and the volume of shares traded.

7 Upvotes

I understand a stat like "X cents per min" or "X cents per share traded (volume)" and I think they both would tell you something meaningful.

But is there a formula that will incorporate all three parameters - the change in price, the amount of time, and the number of shares traded?

Say a stonk goes up +$60 in 60 mins and 100 shares are traded. I can calculate $1 / min and $0.6 / share-traded, that's fine, I can try both of those data points, but what is the best way to use all three values to get one decimal data point? Because "+$60 in 60 minutes, volume = 60", that means something different than "+$60 in 60 minutes, volume=6000" traded or "+$60 in 10 minutes, volume=60"

Sorry, I don't speak finance and math very well... I have a change in price, amount of time, and a volume integer, and what I want is for 3 values to come together into one decimal. So maybe: delta-price / delta-time / volume. Or delta-price / (delta-time * volume)? What makes the most sense?


r/algorithmictrading • • Aug 15 '20

Historical put / call ratios - anybody know where I can find them? Or which paid API is the best? I've been making daily predictions, now I want to make short term predictions with more granular data

7 Upvotes

I'm ready to start paying for an API to get more granular data and hopefully some new useful datapoints to make short / medium time frame predictions. I'm particularly interested in historical put / call ratios.

I'm about to pay the $9 a month to get historical prices from IEXCloud bc, $9, whatever. (EDIT - did not go with IEXCloud, went with Tiingo) They have a lot of awesome datapoints - but I don't think it's possible to get historical values for most datapoints! Which does me no good when creating a prediction model - I need today's value and the value for the last 20 years IEX!I've looked at XIgnite - they look more like what I'm looking for. But it looks like a big pain in the behind to sign up with them.IEXCloud simplicity with the Xignite capability to get historical values would be ideal.AlphaVantage is almost exactly that - except I can't get smaller time frame data points for past dates. If I request data at 5 min intervals, it caps the response at a certain length (of course) but there doesn't seem to be anyway to page through dates or pass a date parameter... So I'm looking for AlphaVantage except with a date parameter.Does anyone have advice / experience with an API that would meet my needs? Any help would be much appreciated!

Background:I've been making daily predictions for the change in price, close to open, of SPY. It's been probably more fortuitous than you might think. If I put together some confusion matrix data from a couple different models / predictions... I can get a good idea of where SPY is going to end up and the range of prices that is likely for the day. Plus... sometimes they are correct! The change in SPY today from open to close was about 0.13%. My predictions this morning were:Up (of binary up / down) - HIT-0.13% - 0% - MISS - by 0.13%-0.07% - 0.19% - HIT (random chance of this range is ~9%).22%-.28% - MISS - by .09%0.11% - 0.24% - HIT (random=9%)This morning, I looked at these predictions and thought "garbage! small up or down, whatever" (My bigger change predictions are more accurate than the small ones and I like it when they all point in one direction)But... 3 of 5 correct, 2 of them being only 9% historically / randomly likely... not bad. Now I just need some short term predictions to go along with these daily predictions to help me time my bets!

EDIT: This dude's post is helpful - https://www.reddit.com/r/algotrading/comments/c2o859/my_data_vendor_research_results/

The answer to my question for daily prices is Tiingo - it's simple, meaning that you pass a date range and "1min" or "5min" and you get your prices for that range in that period. Free trial + $10 a month after, good to go. Thanks Tiingo!

I don't know much yet about these expensive and / or a pain-to-get-access APIs. Tiingo looks good for prices but what I really want are those fancy pants IEXCloud, AlpahaVantage, etc, technical indicator data points with a similar "you give me a date range and interval, I give the values for that date range and interval" API. I'm not sure why these other data providers don't offer that even if it was at a higher price point.

Also, I haven't seen historical put / call ratio data in any API yet. I would really like that data...


r/algorithmictrading • • Jul 09 '20

What are some legal trading rules that big players have to abide by and that are reflected in price action?

7 Upvotes

r/algorithmictrading • • Mar 30 '20

How hard would it be to build this bot?

7 Upvotes

Hi guys! I'm a complete newby in trading but I do know a fair bit about programing. I just made a quick script with Python to make sense of the numbers in Algorithmic Trading and I would love your input into how hard it would be to build a bot like this:

  • Makes 3 trades a day

  • When it wins it makes 1%, and when it loses it also loses 1%

  • Has a win rate of 55% (meaning it makes 1% profit 55% of the trade and loses 1% 45% of the trades)

When I ran the script the bot would get a 2-3 times return on investment, and honeslty that seems too be too good to be true. I know that bid/ask prices come into play here (and fees obviously), but I also know that losing 1% and then making back 1% would end up losing me money, so it's not all good, I'm new to trading but not new to math ahah.

As you can see I'm very new at this but I would like to know your opinion. Would it be hard/impossible to make such a bot?


r/algorithmictrading • • Jan 02 '19

How bad is the problem of data misuse in finance research papers? « Mathematical Investor

Thumbnail mathinvestor.org
7 Upvotes

r/algorithmictrading • • Dec 30 '18

Educational Modern backtesting with integrity

Thumbnail
sr-sv.com
7 Upvotes

r/algorithmictrading • • Oct 07 '18

GitHub - ilcardella/TradingBot: Autonomous stocks trading script

Thumbnail
github.com
7 Upvotes

r/algorithmictrading • • May 19 '18

How To Backtest For Superior Out-Of-Sample Results

Thumbnail
seekingalpha.com
7 Upvotes

r/algorithmictrading • • Oct 31 '17

A Well-Known Quant Firm Is Looking for Traders Who Want to Bet on Sports

Thumbnail
bloomberg.com
7 Upvotes