# Examples by role

Source: https://docs.tradefloor.dev/examples.html

> Six worked examples, one per role. Each is a script that runs in a minute or two and settles a decision a backtest on one price history cannot.

Each example is a script built around a decision someone in that role has to make. It runs on your machine in a minute or two with no API key, and the figures below are what the scripts print. They all use something a backtest on one price history can't give you, such as a market run twice with one thing changed, many markets compared with a paired test, or orders that move prices and can be refused.

### A/B test an AI agent

For teams building AI trading agents. Claude Haiku 4.5 with one extra risk sentence in its prompt did better on 8 of 12 crisis markets and lost more in one shared crisis, too little either way to rule out luck. Claude's answers are recorded, and the run replays them with no API key. [Read the example](https://docs.tradefloor.dev/example-agent-team.html)

### Vet a trading bot

For developers with a bot on paper. A breakout bot beat buy-and-hold on 6 of 16 markets, about what a coin toss gives, so the run finds no edge to put money behind. [Read the example](https://docs.tradefloor.dev/example-algo-trader.html)

### Stress test a portfolio

For risk teams. An 80/20 portfolio fell 29% from its peak in a simulated recession against 5% normally, and broke a 15% limit in 10 of 10 markets. [Read the example](https://docs.tradefloor.dev/example-portfolio-risk.html)

### A liquidity lab

For finance lecturers. The same large order cost 285 basis points in a crisis against 40 in calm, and only 80% of it filled. [Read the example](https://docs.tradefloor.dev/example-teaching.html)

### Test a market hypothesis

For researchers. Three momentum traders raised volatility a little, and a fund trading after them paid 2.7 basis points more a trade on all 8 markets. [Read the example](https://docs.tradefloor.dev/example-market-research.html)

### Gate an agent on a risk rule

For teams that evaluate AI agents. Only the careful agent kept to a 1.0x exposure rule. The reckless one broke it on all 12 markets and had 600 orders refused. [Read the example](https://docs.tradefloor.dev/example-agent-evals.html)

The guides cover the techniques one at a time: [Compare strategies](https://docs.tradefloor.dev/guide-compare.html), [Fork a market](https://docs.tradefloor.dev/guide-fork.html), [Run a scenario](https://docs.tradefloor.dev/guide-scenario.html) and [Record and replay](https://docs.tradefloor.dev/guide-replay.html).
