fit_tail
Fit an extreme-value tail (GPD, GEV, etc.) to data and compute tail risk (mean, P95, P99, P99.5, P99.9) analytically without simulation. Writes a fit object for further analysis.
Instructions
ModelRisk: Fit an extreme-value / Generalised-Pareto tail to data and read its risk. family is 'GPD' (peaks-over-threshold, the standard tail model), 'GEV' (block maxima), 'ExtValueMax', or 'ExtValueMin'. For GPD peaks-over-threshold, pass the range of exceedances above your threshold as data_range. Writes a VoseFitObject (dry_run previews) and returns the fitted tail's mean and high percentiles (P95 / P99 / P99.5 / P99.9) computed analytically — the tail risk without a simulation. Feed the written object cell to compute_distribution / get_tail_risk for more.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet | Yes | ||
| family | No | 'GPD' (default), 'GEV', 'ExtValueMax', or 'ExtValueMin'. | GPD |
| dry_run | No | ||
| workbook | Yes | ||
| data_range | Yes | A1-style range of the tail data. | |
| target_cell | Yes | ||
| uncertainty | No | Fit with parameter uncertainty. Default True. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mean | Yes | ||
| family | Yes | Tail family fitted, e.g. 'GPD' or 'GEV'. | |
| written | Yes | ||
| data_range | Yes | ||
| percentiles | Yes | Fitted-tail percentiles, e.g. {'P95': ..., 'P99': ..., 'P99.5': ...}. | |
| object_formula | Yes | The Vose<Family>FitObject formula written (or previewed). |