Evaluate strategies on one market
evaluate_strategiesRun and score trading strategies on a simulated market alongside baselines, measuring return, P&L, trading costs, turnover, and errors.
Instructions
Run strategies on one simulated market, beside the baseline agents on the same market, and score each one: return, P&L, the cost of its own trading in basis points, turnover and errors. Use it first, but it runs one seed, so use rank_strategies before believing an ordering. A strategy is data, for example {"signal": {"kind": "momentum", "lookback_days": 1.0}, "portfolio": {"top_k": 5, "gross": 1.0}}, and validate_strategy checks one without running it. days 1 to 60 here (a few seconds), up to 252 through start_job; roster 2 to 120 names. preset runs another shipped model preset, outside the certification, and population adds background traders that react to each strategy. Deterministic: the same arguments give the same scores.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cash | No | Starting cash for each entrant, in currency. | |
| days | No | Trading days to run: 1 to 60 in a direct call, up to 252 (the certified horizon) through start_job. | |
| seed | No | Simulation seed, an integer from 0 to 2**64 - 1. The same seed and arguments give the same result. | |
| preset | No | A shipped model preset to run, by name: pt-v1, pt-v2, pt-v3, pt-v4, pt-v5, pt-v6, pt-v7, pt-v8, pt-v9, pt-v10, pt-v11, pt-v12, pt-v13, pt-v14, pt-v15, pt-v16, pt-v18, pt-v19, pt-v20, pt-v21. Omit for the shipped default, pt-v21, the only preset the realism envelope certifies; a result under any other carries a caveat saying it is outside the certification, with that preset's own measured record. describe_simulator lists every preset's record. | |
| universe | No | A roster document, usually the `universe` field of a build_universe result. Either {"size": n, "seed": s, "sectors": [...]} or {"instruments": [...]}. When given it replaces universe_size, universe_seed and universe_sectors. | |
| population | No | A shipped population of background traders to run beside, by name: standard, crowded. They share each strategy's market and react to its trading (populated mode), so a result says whether an edge survives other traders, and strategies no longer meet identical markets. Omit for isolated mode, the default. describe_simulator lists each population's traders. | |
| strategies | Yes | Strategies to run, keyed by a name you choose. Each value is a strategy spec, for example {"signal": {"kind": "momentum", "lookback_days": 1.0}, "portfolio": {"top_k": 5, "gross": 1.0}}. Signal kinds: hold, random, momentum, mean_reversion, oracle, blend. At most 8. The baseline names (buy_and_hold, random, momentum, mean_reversion, oracle) are taken. Check a spec with validate_strategy before running it. | |
| max_leverage | No | Cap on gross exposure as a multiple of net worth. null removes the cap, and the result then warns that trading size alone can win. | |
| steps_per_day | No | Decision points per trading day, 1 to 22. Each entrant is asked for orders at each one. A step is 65 minutes, so 6 cover the trading session, and days times steps may be at most 360 in a direct call. | |
| universe_seed | No | Seed that generates the roster, separate from the simulation seed. Ignored when `universe` is given. | |
| universe_size | No | Names in a generated roster, 2 to 120. Ignored when `universe` is given. | |
| universe_sectors | No | Lowercase sector ids to concentrate a generated roster on, for example ["technology", "energy"]. The ids: technology, financial_services, healthcare, energy, consumer_discretionary, consumer_staples, industrials, materials, real_estate, utilities, telecommunications, transportation. A concentrated roster is a named envelope gap, and the result says so. | |
| include_baselines | No | Add the baseline agents (buy_and_hold, random, momentum, mean_reversion, oracle) to the same market. On by default, because a return means little without buy-and-hold's beside it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||