Simulate an alpha
simulate_alphaBacktests a FASTEXPR expression to return alpha statistics and validation checks, and resumes timed-out simulations by ID instead of rerunning them.
Instructions
Backtest one FASTEXPR expression and return its alpha with stats and checks.
A simulation usually takes 1 to 10 minutes. If it outlasts the timeout the result has status
PENDING and a simulation_id: call get_simulation_status to resume, never simulate again.
Identical expression and settings return the earlier result (from_ledger) without spending
quota. ERROR or FAIL results carry BRAIN's message, usually a syntax or field problem.Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"expression": "<expression>"
},
"name": "simulate_alpha"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | True blocks until done or timeout; False returns the id at once. | |
| decay | No | Smoothing window in days. | |
| delay | No | Data delay, 0 or 1. | |
| force | No | Run again even if the ledger has this exact alpha. | |
| region | No | Market region, e.g. USA. Empty uses the default. | |
| universe | No | Universe, e.g. TOP3000. Empty uses the default. | |
| max_trade | No | ON or OFF. | |
| expression | Yes | FASTEXPR expression. | |
| truncation | No | Max weight. | |
| test_period | No | ISO duration, e.g. P2Y. | |
| nan_handling | No | ON or OFF. | |
| unit_handling | No | VERIFY. | |
| neutralization | No | NONE, MARKET, SECTOR, INDUSTRY or SUBINDUSTRY. | |
| pasteurization | No | ON or OFF. | |
| instrument_type | No | EQUITY. | |
| timeout_seconds | No | Seconds to block. Empty uses WQB_SIMULATION_TIMEOUT. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alpha | No | ||
| quota | No | ||
| status | Yes | ||
| message | No | ||
| alpha_id | No | ||
| children | No | ||
| progress | No | ||
| next_step | No | ||
| from_ledger | No | ||
| simulation_id | Yes | ||
| elapsed_seconds | No |