fit_time_series
Fit time-series models (GBM, ARMA, GARCH) to historical data, rank by AIC/SIC/HQIC, and optionally write the best projection as an array formula.
Instructions
ModelRisk: Fit TIME-SERIES models to a historical data range and rank them by goodness of fit — GBM (plus mean-reverting / jump-diffusion / seasonal variants), AR1/AR2, MA1/MA2, ARMA, ARCH/GARCH/EGARCH. Each family's VoseTimeFitObject is scored with AIC / SIC / HQIC on a transient scratch sheet (nothing in the workbook is modified by the ranking). Optionally pass target_range (+ dry_run=False) to write the best model's projection — a VoseTimeFit(...) ARRAY formula, one period per cell, CSE-entered — so each simulated path carries the fitted dynamics (autocorrelation, volatility clustering) period to period. Note: unlike distribution fitting, parameter uncertainty is not supported here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet | Yes | Sheet holding the historical data. | |
| dry_run | No | Preview the projection formula without writing. Default True. | |
| families | No | Family stems to try, e.g. ['GBM','AR1','GARCH']. Omit for a broad 12-family default. | |
| workbook | Yes | Workbook file name. | |
| criterion | No | Ranking criterion: 'SIC' (default), 'AIC', or 'HQIC'. | SIC |
| data_range | Yes | A1 range of the history, oldest first, e.g. 'B5:B64'. May be sheet-qualified ('Data!B5:B64'). | |
| target_range | No | Range to CSE-enter the best model's projection into, e.g. 'D5:D16' for a 12-period forecast. Omit to rank only. | |
| target_sheet | No | Sheet for target_range. Defaults to `sheet`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skipped | No | ||
| written | No | True when the projection was CSE-entered into target_range. | |
| criterion | Yes | ||
| candidates | Yes | Successfully-fitted families, best first. | |
| data_range | Yes | ||
| best_family | No | Top-ranked family, or null if every fit failed. | |
| sample_size | Yes | ||
| target_range | No | ||
| projection_formula | No | The VoseTime<Family>Fit(...) array formula for the projection. |