Build and preview a custom scenario
build_scenarioAuthor custom macro path or shock scenarios, preview the resolved document, fingerprint, and warnings, then pass it to run_stress_scenario; no market runs.
Instructions
Author a custom scenario and see what it resolves to before running it. Give a macro PATH as hold, ramp and step instructions in steps, or explicit INTERVENTIONS as shocks and assumed transmission. Returns the resolved document, its fingerprint and any warnings; pass that document to run_stress_scenario as scenario. Days count from 0, so an event at day 50 needs a run of at least 51 days. Runs no market.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | The run length you intend, 1 to 60 (up to 252 through start_job). A path's table covers these days, and a scenario whose events all fall after them is refused. | |
| label | No | A name for the scenario, carried into results. | |
| steps | No | A macro PATH, pinned for the whole run. Each step is {"kind": "hold", "fields": {"vix": 30.0}}, {"kind": "ramp", "field": F, "start": X, "end": Y, "over": N, "begin": D} or {"kind": "step", "field": F, "before": X, "after": Y, "at": D}. Fields: vix, federal_funds_rate, corporate_bond_yield, inflation_rate, qe_pe_boost, qe_assets_ratio, fear_greed_index, gdp_growth, unemployment_rate, tariff_rate, oil_price, cycle, epicentre, treasury_yield_2y, treasury_yield_10y. | |
| shocks | No | INTERVENTIONS the scenario asserts happened, each {"target": T, "operation": "set|add|multiply", "value": V, "at": D, "duration": N, "shape": "impulse|hold|ramp|permanent"}. list_scenarios gives every target and what it was measured to move. | |
| transmission | No | Interventions the scenario ASSUMES followed, in the same form as shocks. The simulator treats them alike; the split records which effects are assumptions. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||