iterec function

Iterative cross-temporal reconciliation

Iterative cross-temporal reconciliation

This function performs the iterative procedure described in Di Fonzo and Girolimetto (2023), which produces cross-temporally reconciled forecasts by alternating forecast reconciliation along one single dimension (either cross-sectional or temporal) at each iteration step.

iterec(base, cslist, telist, res = NULL, itmax = 100, tol = 1e-5, type = "tcs", norm = "inf", verbose = TRUE)

Arguments

  • base: A (n×h(k+m)n \times h(k^\ast+m)) numeric matrix containing the base forecasts to be reconciled; nn is the total number of variables, mm is the max. order of temporal aggregation, kk^\ast is the sum of (a subset of) (p1p-1) factors of mm, excluding mm, and hh is the forecast horizon for the lowest frequency time series. The row identifies a time series, and the forecasts in each row are ordered from the lowest frequency (most temporally aggregated) to the highest frequency.
  • cslist: A list of elements for the cross-sectional reconciliation. See csrec for a complete list (excluded base and res).
  • telist: A list of elements for the temporal reconciliation. See terec for a complete list (excluded base and res).
  • res: A (n×N(k+m)n \times N(k^\ast+m)) optional numeric matrix containing the in-sample residuals at all the temporal frequencies ordered from the lowest frequency to the highest frequency (columns) for each variable (rows). This matrix is used to compute some covariance matrices.
  • itmax: Max number of iteration (100, default).
  • tol: Convergence tolerance (1e-5, default).
  • type: A string specifying the uni-dimensional reconciliation order: temporal and then cross-sectional ("tcs") or cross-sectional and then temporal ("cst").
  • norm: Norm used to calculate the temporal and the cross-sectional incoherence: infinity norm ("inf", default), one norm ("one"), and 2-norm ("two").
  • verbose: If TRUE, reconciliation information are printed.

Returns

A (n×h(k+m)n \times h(k^\ast+m)) numeric matrix of cross-temporal reconciled forecasts.

Examples

set.seed(123) # (3 x 7) base forecasts matrix (simulated), Z = X + Y and m = 4 base <- rbind(rnorm(7, rep(c(20, 10, 5), c(1, 2, 4))), rnorm(7, rep(c(10, 5, 2.5), c(1, 2, 4))), rnorm(7, rep(c(10, 5, 2.5), c(1, 2, 4)))) # (3 x 70) in-sample residuals matrix (simulated) res <- rbind(rnorm(70), rnorm(70), rnorm(70)) A <- t(c(1,1)) # Aggregation matrix for Z = X + Y m <- 4 # from quarterly to annual temporal aggregation rite <- iterec(base = base, cslist = list(agg_mat = A, comb = "shr"), telist = list(agg_order = m, comb = "wlsv"), res = res)

References

Di Fonzo, T. and Girolimetto, D. (2023), Cross-temporal forecast reconciliation: Optimal combination method and heuristic alternatives, International Journal of Forecasting, 39, 1, 39-57. tools:::Rd_expr_doi("10.1016/j.ijforecast.2021.08.004")

See Also

Cross-temporal framework: ctboot(), ctbu(), ctcov(), ctlcc(), ctmo(), ctrec(), cttd(), cttools(), tcsrec()