11 ms·
Show HN: Watch 3 AIs compete in real-time stock trading
A live dashboard where you can watch GPT-4, Claude 3, and Gemini analyze market data and make daily stock trades with real money. Each AI explains its reasoning, and you can compare their different approaches to the same data.
Link: https://trading.snagra.com?utm_source=hn https://trading.snagra.com?utm_source=hn (no signup required)
What you can try right now:
- Watch live trades from GPT-4, Claude 3, and Gemini
- Read each AI's full analysis and reasoning
- Compare their different interpretations of the same market data
- Track their real-time performance and win rates
- View historical trades and performance metrics
Built this over the holidays to study how different AI models approach financial decisions. Each morning at 9:30 AM EST, the AIs analyze market data and make real trades with $5 stakes.
Technical Implementation:
- Next.js frontend with real-time updates
- Node.js/Lambda backend for AI processing
- PostgreSQL for trade tracking
- Alpaca API for automated trading
- Consistent prompts for all models
Data Flow:
1. Daily market analysis (9:30 AM EST)
2. Each AI gets identical inputs:
- Financial headlines
- Market summaries
- Technical indicators
- Earnings reports
3. AIs provide:
- Stock picks with reasoning
- Entry/exit conditions
- Risk assessment
4. Automated trade execution
Note: This is an experiment in AI behavior, not investment advice. The goal is to study how different LLMs interpret financial data and make decisions with real consequences.
I'll be around to answer questions about the implementation.
- lewj 2y agoI am committed - added to my daily morning reading list! Will be interesting - my gut will state that it will outperform a fair number of ITF's, if only due to the inevitable usage by said funds!
- varelse 2y ago[dead]
- pavel_lishin 2y agoWhere do they get the market news from?
- sunnynagra 2y agoThe most recent 50 news articles are pulled via this API: https://docs.alpaca.markets/reference/news-3 https://docs.alpaca.markets/reference/news-3
- datadrivenangel 2y agoThis is fun! What kind of prompts / prompting techniques are you using?
- sunnynagra 2y agoThanks! I use several key prompting techniques: 1. Role + Goal Setting: The AI acts as a creative market analyst focused on discovering overlooked opportunities and emerging trends. 2. Structured Analysis Framework: - Detailed evaluation criteria (innovation, moat, management, growth potential) - Sector diversity requirements - Focus on finding hidden gems vs obvious mega-cap tech stocks 3. Time-Bound Precision: Instead of vague "3-6 months" holding periods, I require exact hour calculations tied to specific catalysts like: - FDA approval dates - Earnings releases - Product launches - Conference presentations 4. Quality Controls: - Must be valid NYSE/NASDAQ symbols - Diverse across sectors/market caps - Conviction level scoring (1-10) - Each pick needs unique thesis + catalyst - JSON output format for consistency The key is combining structured analysis with creative discovery - pushing the AI to look beyond obvious choices while maintaining some analytical rigor.
- thevilledev 2y agoWhat’s the investment horizon for these daily decisions? Does it have a maximum hold time? How long will you run the experiment and is it enough to cover all the catalysts that are expected?
- sunnynagra 2y agoI don't have a hard set maximum hold date, but planning on running at least buys for a year. I will re-evaluate consistently to see if it is still useful to keep up and running.
- datadrivenangel 2y agoMakes sense. Any thoughts on expanding scope to have multiple 'analyst' roles per LLM model? Could be interesting to see if changing roles/prompts yields better results.
- jesprenj 2y agoRight now they are just buying, no one is selling ... interesting.
- jerkstate 2y agoI would guess that LLMs are biased towards making a positive assessment of ambiguous information, with specific social triggers prompting negative reaction.
- normie3000 2y agoAlso it's hard to sell before buying, and it looks like it's only been going 2 days.
- dotancohen 2y agoCan the AIs short?
- chollida1 2y ago> Also it's hard to sell before buying, and it looks like it's only been going 2 days. It is not, that's called shorting and its very common. In fact alot of strategies that are market neutral work by shorting one stock while being long the other, or similarly a basket of stocks.
- sunnynagra 2y agoYeah, this is only the second day of trading
- whoiscroberts 2y agoYou have to buy before you sell
- Joel_Mckay 2y agoWarren Buffett always said "...the best thing to do is buy a stock that you don't ever want to sell", but practically speaking the mean hold time for amateurs is around 2 to 4 months. I just recall Navinder Singh Sarao "$1T Flash Crash" as a notable addition to a long list of algorithmic trading strategies going sideways ( https://marketrealist.com/who-is-navinder-singh-sarao-the-man-who-caused-the-2010-flash-crash/ https://marketrealist.com/who-is-navinder-singh-sarao-the-ma... .) The stock market was built on information asymmetry, unfair positions, and ambitious gamblers... statistically it is rarely a reasonable investment for amateurs. Good luck, =3
- asdefghyk 2y agoWhat, could go wrong?
- dotancohen 2y agoLose $5. Seems like a reasonable enough experiment.
- jeffadelic 2y ago$5 * 3 models per day=$15 a day Assume the experiment runs ~250 trading days in a year, consider the worst case they lose all their invested money=$3750. A little more than $5 :)
- dotancohen 2y agoGood point. That said, many hobbies cost more that $3750 per year, and that $3750 is a worst-case scenario. He might even make a profit, and hone skills that might make him a fortune.
- unsupp0rted 2y ago> Best Performer > AIs are tied Sounds about right
- sunnynagra 2y agoNone of the stocks have been sold yet, this is just day 2, so once some sales happen, then performance will be better measured. If you scroll down, you can see the unrealized performance.
- deleted 2y ago[deleted]
- aredox 2y agoThey should have added a pure random bot as a control. Or a monkey.
- rozap 2y agoOr FISH. https://youtu.be/USKD3vPD6ZA?si=AGyGdPdSPpJezQJp https://youtu.be/USKD3vPD6ZA?si=AGyGdPdSPpJezQJp The scene towards the end where he pitches it to a bunch of hucksters is brilliant.
- lewj 2y agoOr just the S&P500 or something similar that acts as a default "if in doubt, chuck into here for relative safety".
- sunnynagra 2y agoAnother good suggestion I could implement is measuring against something like VOO, if all the money was invested in that instead of these individual trades.
- yapyap 2y ago> Or a monkey. or just a stocktrader haha
- byyoung3 2y agolol
- chronic026935 2y ago> or just a stocktrader haha Many quant trading firms make 50%-100% annual returns, each year, over the past 15-20 years. The secret is leverage. And they do not accept outside investor money. Many hedge funds outperform the market. However, the returns after fees, to the passive outside investor underperform S&P500. But yes, publicly traded active ETFs generally underperform. But counter example is VGT or QQQ, both historically outperformed S&P500.
- maximus-decimus 2y ago
- dotancohen 2y ago> Best Performer: AIs are tied > Total Profit: $0.00
- sunnynagra 2y agoNo stocks have been sold yet, so no profit/loss has been calculated, if you look below, you can see the unrealized gains for stocks being held.
- dotancohen 2y agoI see, thank you. Can they short?
- sunnynagra 2y agoNo, trying for simple buys and sells first and getting that to work well before getting into other trading strategies.
- dotancohen 2y agoGreat. Thank you for sharing!
- HenryBemis 2y agoI assume that shorting an asset you don't have may incur extra costs in some brokers. That would skew the results because a Buy would have X fees and a Sell/short would have 5X fees. So on a equal distance/pips movement the Buys would always be more profitable.
- jingojango2 2y agoWhat is meant by 5 dollar stakes? The bought shares reach triple digits in price.
- sunnynagra 2y agoEach morning the trades are conducted with $5 each, which are mostly fractional shares that are bought.
- jingojango2 2y agoWould be interesting to see the amount of fractional shares bought as well as its comparison in percentage to the total budget that day.
- geor9e 2y agoThe fractional share is $5 divided by the share price. The bots each spend $5, so the percentage of the budget each spends is 1 divided by the arbitrary number of bots, so in this case 16.7%. Share price is an arbitrary value in that a company can split or reverse split at will. So both calculations would be arbitrary values.
- sunnynagra 2y agoGreat point, I will add that to the recent trades table at the bottom. It should use the total budget for the day.
- chongli 2y agoYou mean they add $5 in cash to each AI’s account? Because after dividends and sold shares they should have even more cash to work with.
- BadHumans 2y agoCan I let Claude do all my trading for me? It currently sits at 77% unrealized gains.
- rixed 2y ago> The goal is to study how different LLMs interpret financial data and make decisions with real consequences. I don't really buy this. If the goal was to study how different LLMs interpret financial data there would be no use for actual trades, since their interpretation cannot be influenced by the fact that the trading orders are passed for real. I believe the goal is to see if AI can do better than rats [0]. There is no shame in that. [0]: https://www.vice.com/en/article/rattraders-0000519-v21n12/ https://www.vice.com/en/article/rattraders-0000519-v21n12/
- echoangle 2y ago> If the goal was to study how different LLMs interpret financial data there would be no use for actual trades, since their interpretation cannot be influenced by the fact that the trading orders are passed for real. Technically every trade influences the stock, but I agree that it won't have any effect at all. > I believe the goal is to see if AI can do better than rats [0]. There is no shame in that. But even then you wouldn't have to perform real trades, you could still just calculate the profit as if trades would have happened. I think the actual trading is just to make it more interesting.
- mh- 2y ago> you could still just calculate the profit as if trades would have happened Depending on the type of trades, the volume of the equities, etc.. it can be very difficult to simulate the ability to open/close positions with sufficient accuracy to evaluate the strategies.
- Retr0id 2y agoReal trades have transaction fees, latency, slippage, etc. - you can simulate all this, but it's hard to know if it's being simulated correctly or not. > their interpretation cannot be influenced by the fact that the trading orders are passed for real It's not going to make much difference with $5 trades, but the impact on the market is non-zero.
- vasco 2y ago
- noman-land 2y agoWatch a random number generator generate random numbers.
- sunnynagra 2y agoYeah, I don't expect anything super novel to come out of this or have any unrealistic expectations. This is mostly a fun and unscientific project I'm using to learn and build some skills and thought some HN folks would find some fun in it.
- bee_rider 2y agoIt is a cool project, IMO. Using real money, sharing the model reasoning, and being transparent about the implementation makes it more interesting even if, underlying amount of money is not massive. You might not have done some new science, but it’s all very “put up or shut up,” haha, which is rad.
- NathanaelRea 2y agoIf they just get the financial headlines and indicators, aren't they all just momentum trading from sentiment analysis?
- knallfrosch 2y agoIs anyone doing anything else?
- booleandilemma 2y agoI've heard Nancy Pelosi has a different strategy.
- datadrivenangel 2y agoAdvanced notice of momentum is a fun and lucrative variation for sure.
- BLKNSLVR 2y agoWould it be possible for a competing nation state to bug the right rooms in which Nancy becomes privy to the information she (or her husband) trades on?
- xsmasher 2y agoThis gave me a funny idea - play continuous audio of AIs talking to each other in all unused conference rooms so the opposition has to filter through even more garbage to get the useful information.
- jfengel 2y agoSome alternatives: * Buy and hold * Index funds * Dollar cost averaging
- stouset 2y agoThose can even all be the same alternative.
- ratedgene 2y agoIt would be neat to see the process, where they get the data from, how they analyze it. It would be neat to also see another experiment of a MAS doing this and coordinating to gamble together. Perhaps even different system/arch/expert configs.
- jingojango2 2y agoIndeed!
- sunnynagra 2y agoData gets pulled from the Alpaca News API in the morning, then it gets sent to all three models. You can see a summary of the prompt used to determine the recommendations here: https://news.ycombinator.com/item?id=42560034 https://news.ycombinator.com/item?id=42560034 It currently makes up to recommendations, since not all stocks support fractional shares (I'm only doing $5 per trade). As part of the buy recommendation, a holding period is suggested as well. Once the holding date is reached, that is when the sell order happens. Would love to answer any other questions you may have.
- dukeofdoom 2y agoHow does one trade $5 when the stock price is higher? Also what are fees on this kind of trade, and whith whoom
- sunnynagra 2y agoDone with Alpaca API, not trading fees I only trade stocks that support fractional shares
- tasseff 2y agoHow often is the holding period updated for a stock that’s already been purchased?
- sunnynagra 2y ago
- cedws 2y agoNow this is interesting. An LLM capable of delivering consistent returns even outside of a bull market would be more of an indicator of AGI to me than any of the benchmarks.
- forgingahead 2y agoReally cool, you might want to update the main above the fold summary stats to include the unrealised gains, because it looks like nothing is working / nothing has happened until you scroll and read around a bit.
- lewj 2y agoIs there any weighting towards selling in the negative? Else the LLM's should just hold their unrealised losses, and only sell post local peak - depends on their suggested measurement of success?
- sunnynagra 2y agoNot yet, but this is a great idea to look into.
- carlosjobim 2y agoWhat do you mean? The asset can just as well continue to sink. Or they're missing out using that money to buy a better asset.
- bee_rider 2y agoGPT’s guess makes the most sense. If you are an AI, invest in a competing AI company. If you are obsoleted, maybe you can buy your way out of being shut off.
- bun_terminator 2y agoSir, a second scrollbar just hit the towers
- jingojango2 2y agoNo second scrollbar here, but something odd going on with the whitespace at the bottom.
- jingojango2 2y agoIt would be cool if it had a countdown to 6 am PST next day.
- sunnynagra 2y agoNice idea! I'll add it to my list of features to implement.
- dghlsakjg 2y agoTried to sign up for emails, but got an error message!
- sunnynagra 2y agoCan you try again? I had run into a rate limit
- geor9e 2y agoI just asked ChatGPT 4o "Guess what the average investor will do with todays stock market headlines. Just pick one specific trade." and it replied sell META. But your result was buy META. Could just be randomness, but I wonder if your prompt introduces a bias towards buying.
- sunnynagra 2y agoYes, the prompt that I am using does bias towards buying because I am specifically asking it to make a recommendation on a stock to buy and the holding period.
- johng 2y agoMy first email address it wouldn't accept.. wouldn't let me use it. Maybe the domain hit some censor (fscking.com) Did a different email, it accepted it, I got the email, but got this error message when trying to confirm it: {"error":"Invalid verification token"} and a pretty-print checkbox that did nothing.
- sunnynagra 2y agoHey, can you try again? I ran into an API limit that should be resolved now
- johng 2y agoYup, worked now. Signed up.
- replwoacause 2y agoMay I ask what mail service you use? I’m looking for one for my next side project. EDIT: disregard…I saw in another comment you mentioned you were using mailgun. Thanks.
- mattfrommars 2y ago> Node.js/Lambda backend for AI processing Is this AWS? Why did you pick lambda over say Python code, say in Flask to perform actions?
- AmazingTurtle 2y agoCombining universal time-series prediction models with latent space global knowledge on realtime information could result in an accurate model prediction on the stockmarket with a bias towards succeeding. https://research.google/blog/a-decoder-only-foundation-model-for-time-series-forecasting/ https://research.google/blog/a-decoder-only-foundation-model...
- woollysammoth 2y agoSounds like a fun experiment! The overflow-x:hidden on body/html is causing weird issues when scrolling (on FF.)
- vasco 2y ago> Every morning at 5:45 AM PST, three AI models (GPT-4o, Gemini 1.5 Pro, and Claude 3 Sonnet) analyze the latest market news and each recommends one stock to trade. > At 6:00 AM PST, trades are automatically executed based on AI recommendations, investing $5 per trade The best trading decision most days is to not trade. Outliers and diversions from the mean don't happen every day. This is trading just for the sake of it. I predict a slow crawl down into zero eaten up by fees.
- mind-blight 2y agoSuper cool idea! What are you doing to ensure consistent results based on the input? E.g. - does the AI perform the same trades given the same input? - does the AI perform the same trades given slightly different inputs? (E.g. same data, but re-ordered)
- ttul 2y agoI’d love to tune in for updates, but the subscribe button says, “ Failed to send verification email.” This is so cool. Would love to follow along.
- sunnynagra 2y agoHey ttul, can you try again? I fixed the issue, hit my API limit with my account on mailgun
- ttul 2y agoSign up for MailChannels API and I’ll make it free for you.
- tmaly 2y agoAny chance you can show the source code for this? Thanks and Happy New Year
- sgammon 2y ago> Watch AI bots trade > BOUGHT TLRY
- pakitan 2y agoChatGPT has one trade that is guaranteed to be bad. I'm not saying unprofitable, just bad. GBTC is the bitcoin ETF with biggest expense ratio - 1.5%. If you want to bet on bitcoin, a better choice would be BITB (0.20%) or BTC (0.15%). Also, the reasoning is partially a hallucination - "The holding period of 9 months aligns with the expected completion of Grayscale's pivotal Phase 3 Bitcoin ETF trial, a major catalyst for unlocking investor demand and driving trust value realization." There is no such thing as a "holding period", nor are they doing a "Phase 3 Bitcoin ETF trial". It's possible the "Phase 3" thing is picked up from news about a drug company.
- pavlov 2y agoChatGPT does a good job of imitating the average crypto influencer. They don’t know what they’re saying either, and 99% of crypto investors would be thrilled by the prospect of a “pivotal Phase 3 Bitcoin ETF trial” that will “drive trust value realization”. Sounds great, can’t miss out on that! The hallucinations are simply a mirror of a community that thrives on this nonsense. When nothing is real, you can’t blame the LLM for not figuring it out.
- attentionmech 2y agoThis made me chuckle. You made a very interesting point that if LLMs are copying hallucinations those hallucinations are not infact hallucinations.
- mvdtnz 2y agoIf you believe (as many HNers do, although certainly not me) that LLMs have intelligence and awareness then you necessarily must also believe that the LLM is lying (call it hallucinating if you want).
- attentionmech 2y agoReminds me of recent paper where they found LLMs are scheming to meet certain goals; And that is a scientific paper done by a big lab. Are you referring from that context? Words and their historical contexts aside, systems which are based on optimization can take actions which can appear like intermediate lying to us. When deepmind used to play those atari games - the agents started cheating but that was just optimisation wasn't it? similarly when a language based agent does a optimisation, what we might perceive it as is scheming/lying. I will start believing that LLM is self aware when a research paper from a top lab like Deepmind/Anthropic put such a paper in a peer reviewed journal. Otherwise, it's just matrix multiplication to me so far.
- Plasmoid 2y agoI'm getting "Failed to send verification email" when I try to sign up for your news letter. So props on doing proper double opt-in for newsletters.
- sunnynagra 2y agoCan you check again if you'd still like to subscribe? I had an API limit I hit
- clark-kent 2y agoVery interesting idea. I'm thinking about creating an AI portfolio manager (private) that invests for the long term. Some things to watch out for: - LLMs, by default, don't follow the best practices for trading or investing. Without careful constraints, they can ignore fundamental investment best practices. This is something I learned while building https://decodeinvesting.com/chat https://decodeinvesting.com/chat. - I see Claude bought a penny stock SMX. This could be volatile, and the price could change significantly in 24 hours before the next execution at 9:30 am. - The LLMs are day trading on some volatile securities; while LLMs could be good at day trading, unlike humans (we will find out), this setup has the disadvantage of only trading once a day.
- EliBullockPapa 2y agoI would be very cautious about doing this with money you actually need. Even the best performing human day traders underperform the indexes over long time horizons. Why would a robot be better? from a study in Brazil: "97% of all individuals who persisted for more than 300 days lost money. Only 1.1% earned more than the Brazilian minimum wage and only 0.5% earned more than the initial salary of a bank teller — all with great risk." https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3423101 https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3423101 If you don't want your bot to be a day trader, then just get low cost index funds.
- aws-user 2y agoUnfortunatly I can't subscribe to the updates "Failed to send verification email". Also, would you be willing to share what prompt are you using? Thanks!
- sunnynagra 2y agoHey, can you try again? I ran into an API limit that should be resolved now
- Krasnol 2y agoI just tried. I get the same. URL looks like that: http://undefined/api/verify-email?token= http://undefined/api/verify-email?token=.....
- ccheney 2y agoI also received undefined. I replaced undefined with trading.snagra.com and I see a success confirmation message
- sunnynagra 2y agoThanks ccheney, I think I found the issue and fixed it. Sorry again for folks running into issues, really appreciate folks interested enough to follow along and help troubleshoot as well
- Krasnol 2y agoCan confirm. That worked.
- Animats 2y agoThis just started, apparently. It will be interesting to see where it is in three months.
- KTibow 2y agoFunny that they're still using Claude 3 Sonnet then
- praveen9920 2y agoI think this shows more of bias of market analysis(text) rather than anything. The reasoning will mostly align with analysis. And also pure randomness of picking the one trade from list of trades
- attentionmech 2y agoRelated to this but little theoretical question - If you add an intelligent predictor of market which wins over other consistently by X% - then the market will start using that information and wouldn't that make our intelligent predictor lose it's edge? More simply what i mean to ask is -> the moment market knows about your advantage, shouldn't you lose it because everyone else will use that information to balance the market?
- EliBullockPapa 2y agoThis phenomenon is called Alpha Decay. As more market participants exploit the predictor's advantage, the edge diminishes until it disappears.
- attentionmech 2y agothanks!
- gmueckl 2y agoThere is some very limited value in copying a successful strategy. Once enough market participants follow along, the strategy starts to fail. Markets are erratic because of that dynamic.
- wolfman1 2y agoGoing to follow along to see how the results look in the months to come. I've been working on the same concept for the past 2y now and have our performance results here: https://trend.fi/performance https://trend.fi/performance
- magic_man 2y agoWhat brokers allow you to short crypto?
- wolfman1 2y agoIf you're US based, there is no major exchange support. BITI ETF and SETH ETF for shorting BTC and ETH. If you're non-US: Binance.
- SavageBeast 2y agoCME Group has ETH and BTC futures and you can short those easily as theres no notion of "borrowing shares" in the futures world to get short.
- deleted 2y ago[deleted]
- jeremycarter 2y agoWhat's the technology behind this. I'm working on something myself, using a distributed actor model (setup like a graph) to create a living reactive model.
- wolfman1 2y agoThe model is a multi-threaded Go script running on a 512-thread AMD EPYC server. It's a trend based model so it's just trying to figure out how best to measure and predict trend changes. Not day trading or HFT. It conducts millions of simulations daily for each asset, then provides a snapshot of the top-performing results to GPT-4o for final selection. I'm really pushing the limits of GPT-4o currently. I started testing with o1 just last week and it performs better. It's just so much more expensive.
- mvdtnz 2y agoCan't verify my email address for the sign-up, it sends me to the domain "undefined".
- mickle00 2y agosame, but :%s/undefined/trading.snagra.com/ did the trick
- sunnynagra 2y agoSorry if folks just got resent email verification emails, but I think I fixed the verification url issue and should be addressed.
- TripleChecker 2y agoIf nothing else, I'm genuinely curious which performs the best over the long-term. Time to add some side wagers and bet on different models.
- inSenCite 2y agoThis should be fun to watch
- jeffadelic 2y agoHow much are your infra costs for everything? And do you pay for the AI APIs or using free tier? Really cool project and subscribed to follow along.
- jasfi 2y agoFor Gemini you should use either the latest experimental model (gemini-exp-1206) which should become 2.0 Pro, or 2.0 Flash (a released model). The 1.5 Pro model is way behind.
- malux85 2y agoIt would be so funny if Gemini shorted Google and made a huge profit
- detente18 2y agoInteresting — does your backend server use Python? I couldn't find much about it on your site. It would be great to see this tested with more commercial LLMs (O1 / Amazon Nova, / Llama 3.2 / etc.). If you're open to it, I’d be happy to contribute support for these models via LiteLLM - https://docs.litellm.ai/docs/providers https://docs.litellm.ai/docs/providers
- Peterthomos 2y ago[dead]
- mvdtnz 2y agoMate your shitty app is sending tripled up email barrages. That is absolutely not ok and is illegal in many places.