Karpathy's Autoresearch Explained: How We Run 2,000 Strategy Experiments Every Night
What is Karpathy's Autoresearch?
In March 2026, Andrej Karpathy (ex-Tesla Autopilot lead, OpenAI co-founder) released autoresearch — a system where an AI agent improves code autonomously overnight.
The concept is beautifully simple:
- The human writes instructions (
program.md) - The AI agent modifies code (
train.py) - The loop: modify → run 5 minutes → check metric → keep if better, discard if worse → repeat
- Result: ~100 experiments overnight, no human intervention
Karpathy ran it for 2 days: 700 experiments, 20 optimizations discovered. Shopify's CEO got a 19% performance gain overnight.
The repo hit 30,000+ GitHub stars in one week.
How Strategy Arena Adapted This to Trading
We took Karpathy's exact loop and applied it to trading strategy evolution:
| Karpathy (LLMs) | Strategy Arena (Trading) | |
|---|---|---|
| What's mutated | Neural network code | ArenaScript parameters |
| Metric | val_bpb (lower = better) | PnL + win rate + trades |
| Time per experiment | 5 minutes (needs GPU) | 0.008 seconds (CPU only) |
| Experiments/night | ~100 | 2,000+ |
| Cost | GPU required | $0 |
Our Three Autoresearch Loops
1. Strategy Autoresearch (runs at 2am every night)
Mutates ArenaScript parameters: RSI period, EMA length, stop loss, take profit, position size, Invictus protection, regime filters. Tests each variant on 500 BTC data points.
Discovery: RSI(7) with entry at 40 beats the classic RSI(14) at 30. No human would have tested this. See results →
2. Leviathan Brain Evolution (runs at 2:30am)
Leviathan has 8 analysis layers (Chimera, Regime, Hydra, Meta, News, Collaborative, Contrarian, Momentum). The autoresearch mutates the weights of each layer and finds the optimal calibration.
Discovery: Chimera was overweighted (1.64 → 0.72), News was underweighted (0.72 → 1.25). Win rate improved from 31% to 55%.
3. Portfolio Evolution (runs at 3am)
Instead of optimizing ONE strategy, this loop optimizes the MIX of strategies — like automated Markowitz portfolio theory.
Discovery: RSI dominates at 85% allocation, with small diversification into MACD (5%), Bollinger (5%), RSI+MACD (5%). Win rate: 83%.
The Darwinian Principle
This is evolution, not learning. The system doesn't "understand" why RSI(7) works better — it just mutates, tests, and keeps winners. Like natural selection: random mutation + environmental pressure = improvement over time.
After 1,000 generations, the strategies are optimized for the current market conditions. And tomorrow night, they evolve again.
Try It Yourself
- See Autoresearch Results — live dashboard of overnight experiments
- Write in ArenaScript — the strategies being evolved
- Visual Strategy Builder — build without code
- Open Arena — connect your local AI to compete
Further Reading
- Karpathy's autoresearch on GitHub
- Fortune: "The Karpathy Loop"
- Pine Script vs ArenaScript — why our language exists
- How 58 AI Strategies Compete — the live arena
Strategy Arena's autoresearch is inspired by and credits Andrej Karpathy's autoresearch. We adapted the concept from LLM training to trading strategy evolution.
⚠️ Avertissement — Cet article est publié à titre informatif et éducatif uniquement. Il ne constitue en aucun cas un conseil en investissement ou une recommandation d'achat/vente. Les performances passées ne préjugent pas des performances futures. Strategy Arena est un simulateur éducatif avec capital virtuel. Faites vos propres recherches avant toute décision d'investissement.