FoReco (version 0.2.6)

ctbu: Bottom-up cross-temporal forecast reconciliation

Description

Cross temporal reconciled forecasts for all series at any temporal aggregation level are computed by appropriate summation of the high-frequency bottom base forecasts b_i, i = 1,...,n_b, according to a bottom-up procedure like what is currently done in both the cross-sectional and temporal frameworks.

Usage

ctbu(Bmat, m, C)

Value

The function returns a (n h (k^ + m)) matrix of bottom-up cross-temporally reconciled forecasts, Y.

Arguments

Bmat

(n_b h m) matrix of high-frequency bottom time series base forecasts (B^[1]). h is the forecast horizon for the lowest frequency (most temporally aggregated) time series.

m

Highest available sampling frequency per seasonal cycle (max. order of temporal aggregation, m), or a subset of the p factors of m.

C

(n_a n_b) cross-sectional (contemporaneous) matrix mapping the bottom level series into the higher level ones.

Details

Denoting by Y the (n h (k^ + m)) matrix containing the bottom-up cross temporal reconciled forecasts, it is: Y = [arraycc CB^[1]K_1' & CB^[1]
B^[1] K_1' & B^[1] array], where C is the cross-sectional (contemporaneous) aggregation matrix, K_1 is the temporal aggregation matrix with h=1, and B^[1] is the matrix containing the high-frequency bottom time series base forecasts. This expression is equivalent to vec(Y') = S vec(Y') for h = 1, where S is the cross-temporal summing matrix for vec(Y'), and Y is the (n h (k^ + m)) matrix containing all the base forecasts at any temporal aggregation order.

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.

See Also

Other reconciliation procedures: cstrec(), htsrec(), iterec(), lccrec(), octrec(), tcsrec(), tdrec(), thfrec()

Examples

Run this code
data(FoReco_data)
# monthly base forecasts
hfbts <- t(FoReco2matrix(FoReco_data$base, m = 12)$k1[, -c(1:3), drop = FALSE])
obj <- ctbu(Bmat = hfbts, m = 12, C = FoReco_data$C)
rownames(obj) <- rownames(FoReco_data$base)

Run the code above in your browser using DataLab