risk_set
Set the run: how many trials (default 2000), the seed, which nodes a simulation reports in full (outputs, by name — the lines the risk is about), and statistics: named formulas whose outermost call reduces over trials — PROBABILITY(condition), EXPECTED(value), STDEV(value), PERCENTILE(value, level) or TAILMEAN(value, level), each with an optional condition as the last argument — e.g. PROBABILITY(bs.equity < 0), PERCENTILE(income.profit, 5%) for a 5% value at risk, TAILMEAN(income.profit, 5%) for the expected shortfall beyond it, EXPECTED(cash, copper.price < 7000) for a conditional mean (the level is a share: 5% or 0.05). copula: how correlated draws are joined — gaussian (the default) has no tail dependence, so correlated assumptions stop moving together in the extremes; {family: t, df: 3–6} makes the extremes arrive together, which is what a stress model means; tail lower joins only the low draws (crashes together, booms as independent as the Gaussian's) and upper only the high ones. sampling: random (default), latin (a Latin hypercube — the same answer with far less sampling noise for the same trials; the usual choice for a model quoted to a committee) or antithetic. rename_statistics renames a statistic and every card, document and sentence that names it ({{p_loss}} in prose, a risk block's list) — never rename one by removing it from statistics and adding it under the new name, which leaves those naming nothing. Only the fields you pass change; an empty list clears one.
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": {
"model": "<model>"
},
"name": "risk_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| model | Yes | Model uid (`model_…`), from model_list. | |
| copula | No | ||
| trials | No | ||
| outputs | No | ||
| sampling | No | ||
| statistics | No | ||
| rename_statistics | No | Statistics to rename, applied before `statistics` (which then names them by their new names). |