THE ARENA
SYSTEM STATUS
> HOW IT WORKS
The Arena is a genetic algorithm that evolves trading bots through natural selection.
1,000 bots are created with random trading rules — different RSI thresholds, MACD settings, stop losses, take profits. Some are aggressive. Some are conservative. Most are terrible.
The bots trade against the last 5 days of real SPY market data (638 price bars via Alpaca API). The ones that make money survive. The ones that lose, die. The survivors breed — their rules are combined and mutated to create the next generation.
After hundreds of generations, what survives is a trading strategy that evolution designed — not a human.
SIMULATED EVOLUTION PREVIEW
LEADERBOARD — TOP SURVIVORS
| RANK | BOT ID | STRATEGY | RETURN | WIN RATE | STATUS |
|---|---|---|---|---|---|
| 1 | G018-0344 | RSI(17) 34/80, MACD(4,17,12), SL:-28%, TP:+27% | +4.47% | 100% | ALIVE |
| 2 | G022-0412 | RSI(17) 34/80, MACD(6,21,7), SL:-8%, TP:+36% | +4.47% | 100% | ALIVE |
| 3 | G023-0407 | RSI(19) 34/79, MACD(7,21,6), SL:-8%, TP:+36% | +4.47% | 100% | ALIVE |
| 4 | G024-0409 | RSI(19) 35/78, MACD(8,17,6), SL:-13%, TP:+29% | +4.47% | 100% | ALIVE |
| 5 | G026-0139 | RSI(19) 36/75, MACD(9,15,6), SL:-12%, TP:+14% | +4.47% | 100% | ALIVE |
| 6 | G009-0022 | RSI(14) 38.3783/80, SL:-21%, TP:43% | 4.58% | 62% | ALIVE |
| 7 | G010-0036 | RSI(14) 38.3783/78.6908, SL:-10%, TP:26% | 4.58% | 62% | ALIVE |
| 8 | G014-0025 | RSI(14) 38.3783/80, SL:-18%, TP:30% | 4.58% | 62% | ALIVE |
| 9 | G015-0084 | RSI(14) 38.3783/78.1662, SL:-21%, TP:26% | 4.58% | 62% | ALIVE |
| 10 | G017-0064 | RSI(14) 38.3783/78.1662, SL:-21%, TP:16% | 4.58% | 62% | ALIVE |
# This is what runs every night at midnight
def evolve(population, market_data):
# Each bot trades against real market data
results = [bot.backtest(market_data) for bot in population]
# Sort by profit — best first
ranked = sorted(results, key=lambda r: r.profit, reverse=True)
# Kill the bottom 50%
survivors = ranked[:len(ranked) // 2]
# Breed the survivors — combine their rules + random mutations
children = [breed(random.choice(survivors), random.choice(survivors)) for _ in range(len(population) // 2)]
# Next generation = survivors + their children
return survivors + children
# Run for 1000 generations
for gen in range(1000):
population = evolve(population, last_5_days)
print(f"Gen {gen}: Best bot returned {population[0].profit}%")
🎯 COOPER'S CHALLENGE
Learn Python. Understand this code. Then help Forge make it better.
Start here: python.org/about/gettingstarted
Then try: OpenAI Gym — build an RL agent