reverse_stress_test
Identify inputs driving extreme output outcomes by partitioning simulation data into breach and no-breach sets, then reporting mean shifts and tail concentrations to reveal stress scenarios.
Instructions
ModelRisk: Reverse stress test — start from a BAD output outcome and work back to the joint input state that produces it. Partitions the simulation's iterations into breach / no-breach (output above/below a threshold, given directly or as a percentile), then for each input reports how far its mean shifts inside the breach set (in its own standard deviations) and how concentrated breaches are in its tail — a breach-driver tornado — plus the mean input vector as a concrete named stress scenario. This is the Solvency II / PRA 'reverse stress test' and is only possible with the engine's recorded per-iteration joint sample matrix (requires a completed simulation).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_n | No | Max samples per variable to pull. Default 100000. | |
| direction | No | Breach side: 'above' (default) or 'below' the threshold. | above |
| threshold | No | Breach threshold on the output. Omit to use threshold_percentile. | |
| output_name | Yes | VoseOutput name to stress. | |
| workbook_name | No | Workbook name. Omit for the active workbook. | |
| threshold_percentile | No | Breach threshold as an output percentile (0-1), e.g. 0.95. Used when `threshold` is omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | ||
| drivers | Yes | Inputs ranked by how far they shift in the breach set. | |
| scenario | No | The mean input vector over the breach iterations. | |
| direction | Yes | 'above' or 'below' — the breach side of the threshold. | |
| threshold | Yes | ||
| iterations | Yes | ||
| output_name | Yes | ||
| breach_count | Yes | ||
| breach_probability | Yes |