svForecastControlCreate#
Purpose#
Create an svForecastControl structure with default values for SV-BVAR density forecasting.
Format#
- ctl = svForecastControlCreate()#
- Returns:
ctl (struct) –
An instance of an
svForecastControlstructure with the following default values:ctl.h
Scalar, forecast horizon. Default = 12.
ctl.mode
String, forecast mode.
"mean_path"Deterministic h-path using posterior mean innovations. Fast but underestimates forecast variance (Jensen’s inequality). (Default)
"simulate"Draw innovation paths from the SV-implied time-varying covariance. Gives proper predictive density.
ctl.n_paths
Scalar, number of simulation paths per posterior draw (
"simulate"mode only). Default = 100.ctl.quantile_levels
Vector, quantile levels to report. Default = 0.05|0.16|0.50|0.84|0.95.
ctl.h_init
String, log-volatility initialization for forecasting.
"stochastic"Draw h_T from the reservoir. Captures h_T uncertainty. (Default)
"posterior_mean"Use posterior mean h_T. Faster, underestimates tails.
ctl.store_draws
Scalar, 1 to store raw forecast draws in dfc.draws, 0 to discard. Default = 0.
ctl.seed
Scalar, RNG seed for simulation mode. Default = 42.
Examples#
new;
library timeseries;
fctl = svForecastControlCreate();
// Switch to simulation mode for proper density
fctl.mode = "simulate";
fctl.n_paths = 500;
// Custom quantiles for risk management
fctl.quantile_levels = 0.01|0.05|0.50|0.95|0.99;
// Use with bvarSvForecast
dfc = bvarSvForecast(result, 12, fctl);
Library#
timeseries
Source#
forecast.src
See also
Functions bvarSvForecast()