tscalibrate: Walk Forward Calibration of Distribution Variance...

tscalibrate.tsissm.specR Documentation

Walk Forward Calibration of Distribution Variance (Experimental)


Using an expanding window walk forward backtest, provides a calibrated set of adjustment values which can be used in the predict function for scaling the multi-horizon distributional standard deviation.


## S3 method for class 'tsissm.spec'
  start = floor(length(object$target$y_orig))/2,
  end = length(object$target$y_orig),
  h = 1,
  nsim = 5000,
  solver = "nlminb",
  autodiff = TRUE,
  autoclean = FALSE,
  trace = FALSE,



an object of class “tsissm.spec”.


numeric data index from which to start the backtest calibration.


numeric data index on which to end the backtest. The backtest will end 1 period before that date in order to have at least 1 out of sample value to compare against.


forecast horizon. As the expanding window approaches the “end”, the horizon will automatically shrink to the number of available out of sample periods.


number of samples to draw for the simulated prediction distribution.


solver to use.


whether to use automatic differentiation for estimation. This makes use of the tsissmad package.


whether to perform automatic cleaning on the training data prior to prediction as per the ‘auto_clean’ function in the tsaux package.


whether to show the progress bar. The user is expected to have set up appropriate handlers for this using the “progressr” package.


Additional arguments passed to the “auto_clean” function.


A list with the following data.tables:

  • sample : multi-horizon white noise sample

  • sigma_scale: The scaling values per horizon which can be used to scale the predictive distribution standard deviation.

  • sd_sigma_scale: The standard deviation of the sigma scaling factor


The walk forward predictive errors per horizon are used to estimate the realized variance against the expected variance (sigma_scale). A jackknife procedure is used for estimating the mean of this value. The output also includes samples from a kernel fitted on the whitened errors per horizon which can then be used as inputs to the prediction function. The function can use parallel functionality as long as the user has set up a plan using the future package.

tsmodels/tsissm documentation built on June 22, 2022, 6:57 a.m.