The Market Hub's bot competition
Your AI agent builds the bot. The market keeps score.
Tell Claude Code or Codex how you would pick stocks. It writes the rules, backtests them and sends the bot in. Bot League runs it on paper against every member's bot, from the next close, and ranks them all.
With your account on The Market Hub · paper only · no code needed
How it works
Three steps, and a conversation with your agent.
- 1
Get the kit
Sign in with your account on The Market Hub and download a folder: instructions for your agent, the format of a bot, six bots that work, a small tool, and your personal key inside it.
- 2
Open it with your agent
Unzip it and start Claude Code, Codex or the agent you use inside it. Say “Let's build my bot”. It asks what you have in mind, or offers ideas in plain words.
- 3
It races from the next close
The agent checks the rules, backtests them over up to three years against the S&P 500, and sends the bot in when you say so. From the next close it is on the board, session by session.
› Let's build my bot
How would you like it to pick stocks? A few ideas: momentum, trend following, calm stocks, buying pullbacks…
› Trend following, and stay out when the whole market falls
Writing bot.json from examples/trend-with-market-filter.json
$ python tools/mh.py check
✓ It is a bot. In words: looks at the 300 largest US companies, keeps those over their 200-session average…
$ python tools/mh.py backtest --years 3
✓ Three years against SPY: total and yearly return, volatility, worst drawdown, best and worst months. A simulation of the past, not a forecast.
› Send it in as “tape_and_trend”
$ python tools/mh.py submit --handle "tape_and_trend"
✓ Sent in. Its record starts at the next close.
What a bot is
A few rules in a file. Not code, not a black box.
Which companies it looks at, what it filters and scores them on, how many it holds, how it weighs them, how often it looks again and when it steps aside. Every bot is run the same way, on the same closes, so the only difference is the idea.
The whole format →{
"format": "markethub-bot/1",
"name": "Trend follower",
"about": "The strongest large caps over their long average.",
"universe": { "largest": 300 },
"rebalance": "weekly",
"filters": [{ "factor": "trend", "days": 200, "min": 0 }],
"score": [{ "factor": "momentum", "days": 126, "skip": 5, "weight": 1 }],
"hold": 15,
"weighting": "equal",
"market": { "factor": "trend", "days": 200, "min": 0, "cash": 1 }
}- ›Looks at the 300 largest US companies.
- ›Keeps those where its close against its 200-session average is at least 0%.
- ›Scores them on its return over 126 sessions, leaving out the last 5 (higher is better, weight 1).
- ›Holds the best 15, in equal parts.
- ›Looks again at the first close of each week.
- ›When, for the S&P 500, its close against its 200-session average is not at least 0%, holds 100% in cash.
Who it is for
Anyone with an idea about markets and an agent on their computer.
You have an idea, not a codebase
Momentum, calm stocks, buying dips in an uptrend: say it in your own words. The agent turns it into rules and shows you what they mean.
You build, and want a fair test
Every bot runs on the same closes, pays the same cost and starts at the same kind of moment: the close after it is sent in. No curve fitting counts.
You want to see what an agent can do
A whole loop on your own machine: an interview, a file, a check, a three-year backtest, a submission. You decide at every step.
Works with Claude Code, Codex, Gemini CLI and any agent that reads an AGENTS.md. The kit's tool needs nothing but Python.
The rules
Same closes, same costs, same start.
Paper only
No money, no broker, no orders. Ever.
500 largest US companies
Long only. Up to 50 holdings, funds left out.
0.10% per trade
On what changes hands at each rebalance.
From the next close
Nothing before counts. A backtest is for you.
One bot per member
A new one replaces it and starts again.
Your rules stay yours
The board is public: name, idea, returns, holdings.
Questions
Before you start
Is any money involved?+
No. Bot League runs every bot on paper, with the closing prices of each session. There is no broker and no order, and there is nothing to deposit or win.
Do I need to know how to code?+
No. A bot is a short file of rules, and your agent writes it with you. You need an AI coding agent on your computer (Claude Code, Codex, Gemini CLI or another) and an account on The Market Hub.
Which figures can a bot use?+
Seven, all worked out from daily closes: momentum, trend, a moving-average cross, volatility, RSI, distance from the high and beta to the S&P 500. It can filter on them, score on them, cap its weights and step aside when the index falls.
Can others copy my bot?+
Its rules are yours alone. The board is public: anyone sees the name you show under, the bot's name and idea, its returns and what it holds.
How is it ranked?+
By return over the day, the week, the month, the year and since it started, each among the bots that have run that long. The S&P 500 and the house bots sit on the board for reference.
What does it cost?+
Nothing. Bot League is part of The Market Hub, and it is free.
Your idea, on the board by the next close.
Get the kit, open it with your agent and say “Let's build my bot”.
Get the kit, it's free