Conformalized Forecasting using Machine Learning (and statistical) models with ARCH effects

mlarchf(
  y,
  h = 10L,
  mean_model = forecast::auto.arima,
  model_residuals = forecast::thetaf,
  fit_func = ahead::ridge,
  predict_func = predict,
  type_pi = c("surrogate", "bootstrap", "kde"),
  type_sim_conformalize = c("surrogate", "block-bootstrap", "bootstrap", "kde",
    "fitdistr"),
  ml_method = NULL,
  level = 95,
  B = 250L,
  ml = TRUE,
  stat_model = NULL,
  ...
)

Arguments

y

A numeric vector or time series of class ts

h

Forecasting horizon

mean_model

Function to fit the mean model (default: forecast::auto.arima)

model_residuals

Function to model the residuals (default: forecast::thetaf)

fit_func

Fitting function for the variance model (default: ahead::ridge)

predict_func

Prediction function for the variance model (default: predict)

type_pi

Type of prediction interval ("kde", "surrogate", or "bootstrap") for volatility modeling

type_sim_conformalize

Type of simulation for conformalization of standardized residuals ("block-bootstrap", "surrogate", "kde", "bootstrap", or "fitdistr")

ml_method

caret package Machine learning method to use, if fit_func and predict_func aren't provided. If NULL, uses fit_func and predict_func.

level

Confidence level for prediction intervals

B

Number of bootstrap replications or simulations

ml

If TRUE, fit_func and predict_func are used, otherwise a statistical model in stat_model

stat_model

A statistical model, e.g forecast::thetaf or forecast::auto.arima

...

Additional parameters to be passed to stat_model

Value

A forecast object containing predictions and prediction intervals

Examples

# Example usage will be added