Use Cases
Each example takes a decision someone in that role has to make and answers it with a script that runs on your machine in a minute or two. The figures are what the scripts print, and a backtest on one price history couldn't give any of them.
Worked examples by role
For AI agent teams
A/B test an AI agent
Version 2 of a Claude trading agent adds one risk sentence to its prompt. The team needs to know whether the caution costs money in normal markets before shipping it.
Not yet. It lost far less in one shared crisis, but did better on only 7 of 12 crisis markets, too few to rule out luck.
For bot builders
Vet a trading bot
A breakout bot looks good on paper and is about to get real money. Its owner wants to know if it beats buying and holding.
Don't take it live yet. It won 6 of 16 markets, about what a coin toss gives.
For risk teams
Stress test a portfolio
The board has set a 15% limit on how far the house 80/20 portfolio may fall. It wants to know which kinds of market trouble would break it.
Hedge against a recession first. It took the worst fall to 21%, against 5% normally.
For lecturers
Teach liquidity
Students place the same large buy order in the same market twice, once calm and once in a crisis, and measure what it cost.
The order cost 117 basis points in the crisis against 40 in calm, and only 80% of it filled.
For researchers
Test a market hypothesis
A common claim is that momentum traders make a market wilder and more expensive to trade for everyone else. The script copies a market and lets them trade in one of the copies.
Volatility rose a little. A fund trading after them paid 2.8 basis points more a trade on all 8 markets.
For teams that evaluate agents
Gate an agent on a risk rule
To move to the next stage of testing, an agent must keep to a risk rule, and any bad order it sends must be refused with a reason.
Only the careful agent passed. The reckless one broke the rule on all 12 markets.
More ways to use it
Train a trading policy
The Gymnasium environment's reward includes the cost of the policy's own trading. A policy can't learn to trade more than the market can absorb.
Plan for a scenario
Write your own scenario, such as a credit squeeze or an oil shock, and run a strategy with and without it on the same markets.
Benchmark agents fairly
Fixed seeds and saved manifests give every agent the same markets, and anyone can rebuild a run to check a published score.
Connect any MCP client
Claude Code, Cursor, CrewAI and other MCP clients can build markets, score strategies and explain price moves through the local MCP server.