roll_predict_l2relax: Rolling window forecast

View source: R/roll_predict_l2relax.R

roll_predict_l2relaxR Documentation

Rolling window forecast

Description

The function reads data and make forecasts based on linear predictive regression with diverse methods. It incorporates both short-horizon and long-horizon forecasting.

Usage

roll_predict_l2relax(
  x,
  y,
  roll_window,
  h = 1,
  k_max = 4,
  m = 5,
  ntau = 100,
  tau_min_ratio = 0.01,
  train_method = "oos",
  solver = "CVXR",
  tol = 1e-07,
  verb = TRUE,
  csr = TRUE
)

Arguments

x

Full sample predictor

y

Full sample forecast target

roll_window

Length of the rolling window

h

forecast horizon

m

number of folds

ntau

number of tau values

train_method

parameter tuning method for L2relax "cv_random", "cv" or "oos"

solver

"Rmosek" or "CVXR"

tol

tolerance for the solver

verb

boolean to control whether print information on screen

csr

boolean to opt out for the csr

tau.min.ratio

ratio of the minimum tau in tau.seq over the maximum (which is the smallest tau such that equal-weight solves the forecast combination optimization.)


zhan-gao/LasForecast documentation built on Sept. 18, 2024, 9:40 p.m.