Karpathy's Autoresearch On My AI Polymarket Trading Bot
Summary
This content details the development and live testing of an automated arbitrage trading bot on PolyMarket, inspired by Andrej Karpathy's auto-research project. The bot operates within a "trading auto-research loop," using a GitHub repository to evolve its strategy. A markdown file, "training program," defines experiment logic, including how strategies are chosen, run, and evaluated. The system updates strategy code, creates new experiments, and tests them on PolyMarket's five-minute Bitcoin up/down market in dry mode, with a brief live test demonstrating a profit of $2 over approximately 20 minutes. Weak experiments are discarded, while improvements are kept, with a confirmation step for strong results due to data noise. The bot successfully executed five arbitrage trades, maintaining a 100% win rate during the live demonstration.
Key takeaway
For AI Engineers developing automated trading systems, consider adapting an auto-research loop to autonomously evolve and optimize your strategies. By defining experiment logic in a "training program" and using GitHub for code evolution and memory, you can continuously improve bot performance and identify profitable arbitrage opportunities, as demonstrated by the $2 profit in 20 minutes.
Key insights
An auto-research loop can autonomously evolve trading strategies for arbitrage bots.
Principles
- GitHub can serve as a memory and evolution platform for agent-driven code.
- Experiment logic should be codified in a "research playbook" for autonomous agents.
Method
An agent updates strategy code based on a markdown-defined "training program," tests it in a live environment, evaluates results, and iteratively refines the strategy, committing changes to a GitHub repository.
In practice
- Implement a confirmation step for strong results in noisy data environments.
- Use dry runs for strategy testing before live deployment to avoid financial loss.
Topics
- Auto-research
- Algorithmic Trading
- Arbitrage Bots
- Poly Market
- Strategy Evolution
Best for: AI Engineer, Machine Learning Engineer, Software Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by All About AI.