ai agents / algotrading / reinforcement learning / llm
How to Train an AI to Build Trading Strategies: Step One Is a Critic
I'm teaching an AI agent to build profitable trading strategies, where profitable means it beats the S&P 500 on Sortino ratio going forward. Step one is a critic: a model that grades my agent's plan, each tool call and its final answer as good, repair or bad, without ever seeing returns.
Step two is my own model, Qwen 3.5 with nine billion parameters, trained with reinforcement learning on a rented H200. It gets a Sortino score only on time periods it never saw, and the critic can zero that score. Today about one in three strategies my agent builds beats the S&P 500 going forward, and that is the bar.
Transcript
0:00Man Group, one of the biggest hedge funds in the world,
0:02uses AI agents to invent, code and backtest trading strategies.
0:07But there's a problem.
0:08Language models are trained to sound right, and a strategy that sounds right can still lose money.
0:13So here's how I'm building an AI model that builds profitable trading strategies.
0:18Aurora autonomously performs financial research and helps you deploy profitable trading strategies, using highly optimized, benchmarked models and prompts that each do one job.
0:28Ask her which AI stocks grew revenue four quarters straight, or what the core of Intel's business was last quarter.
0:34Those questions have a right answer, and they also have a right path.
0:38One answer told a user their strategy never traded, right next to thirty thousand dollars in fees.
0:44Step one is a critic.
0:46It grades every plan, step and final answer as good, repair or bad, based only on whether the work was correct and honest.
0:54Step two: I'll train my own model with reinforcement learning.
0:58Over and over, the model builds a trading strategy and gets a score.
1:02I won't score it on pure returns, because that teaches a model to take crazy risks, like betting everything on one stock.
1:08So the score is the Sortino ratio: how much the strategy earns for every unit of downside risk.
1:14And it's measured on time periods the strategy never saw, so the model can't win by memorizing the past.
1:20Before any score counts, the critic from step one checks how the model got there: did it do what the user asked, and are its numbers real? If not, the score is zero.
1:30Specifically, I'm using Qwen 3.5, nine billion parameters.
1:35Why Qwen? I looked at four open models: Qwen, Google's Gemma, Nvidia's Nemotron and Liquid's LFM.
1:42I narrowed it to Qwen and Liquid, and ran a mini bakeoff.
1:45Liquid only reads a hundred twenty-eight thousand tokens, so almost half of my full agent runs don't fit.
1:51It also got cut off mid-answer on twelve of its thirty plan grades, and got just seven right.
1:56Qwen reads two hundred sixty-two thousand tokens, enough for almost every run.
2:01And its weights are public, so I can retrain it on my own data.
2:04Instead of my own computer, I rent an H200 GPU on RunPod for about five dollars an hour, because the longest runs need over a hundred gigabytes of GPU memory.
2:14Today, about one in three strategies my agent builds beats the S&P 500 going forward, and that's the bar.
2:21If you want to see how I build an AI agent,
2:23like and follow for part two.
Join the conversation
Loading conversation…