Building Autonomous Agentic AI Trading Pods
All About AIgo watch the original →
the gist
The author manages a portfolio of autonomous trading agents (pods) that execute independent strategies, using LLMs to research data, identify mean-reversion pairs, and monitor execution via cron jobs to avoid emotional interference.
Strategy for Autonomous Trading Pods
The author employs a strategy of distributing capital across multiple independent "pods," each running a distinct, automated trading logic. By decoupling these strategies, the author aims to reduce emotional interference and the urge to over-manage individual positions. The system relies on LLMs to research historical data, identify potential trading pairs, and explain the underlying mechanics of a trade before deployment. Once a pod is live, the author uses cron jobs to perform periodic health checks, ensuring the agent remains autonomous and requires no manual intervention.
Research and Execution Workflow
The research process begins by using an LLM to determine the optimal data source for a specific hypothesis. For mean-reversion strategies, the author uses the yfinance Python package to pull five years of closing price data for correlated assets. The author then tasks an LLM with analyzing the data to identify historical instances where the price ratio diverged and subsequently returned to the mean.
When evaluating a potential pair like V and MA, the LLM provides a quantitative breakdown of past performance. In one test case, the model identified 21 potential trades, resulting in 15 winners and 6 losers, with a maximum gain of 4%. The author emphasizes using the LLM to generate analogies for the trade logic, such as the "rubber band" analogy, where two correlated stocks are viewed as twins tethered by a band that stretches during market events and snaps back to equilibrium. This conceptual understanding allows the author to verify the model's logic before committing capital to a new pod.