Learn R Programming

GeomComb (version 1.0)

comb_BG: Bates/Granger (1969) Forecast Combination Approach

Description

Computes forecast combination weights according to the approach by Bates and Granger (1969) and produces forecasts for the test set, if provided.

Usage

comb_BG(x)

Arguments

x
An object of class foreccomb. Contains training set (actual values + matrix of model forecasts) and optionally a test set.

Value

Returns an object of class foreccomb_res with the following components: with the following components:

Details

In their seminal paper, Bates and Granger (1969) introduce the idea of combining forecasts. Their approach builds on portfolio diversification theory and uses the diagonal elements of the estimated mean squared prediction error matrix in order to compute combination weights:

$$w_i^{BG} = \frac{\hat{\sigma}^{-2} (i)}{\Sigma_{j=1}^N \hat{\sigma}^{-2} (j)}$$

where $\hat{\sigma}^{-2} (i)$ is the estimated mean squared prediction error of the i-th model.

The combined forecast is then obtained by:

$$\hat{y}_t = {\mathbf{f}_{t}}'\mathbf{w}^{BG}$$

Their approach ignores correlation between forecast models due to difficulties in precisely estimating the covariance matrix.

References

Bates, J. M., and Granger, C. W. (1969). The Combination of Forecasts. Journal of the Operational Research Society, 20(4), 451--468.

Timmermann, A. (2006). Forecast Combinations. In: Elliott, G., Granger, C. W. J., and Timmermann, A. (Eds.), Handbook of Economic Forecasting, 1, 135--196.

See Also

foreccomb, plot.foreccomb_res, summary.foreccomb_res, accuracy

Examples

Run this code
obs <- rnorm(100)
preds <- matrix(rnorm(1000, 1), 100, 10)
train_o<-obs[1:80]
train_p<-preds[1:80,]
test_o<-obs[81:100]
test_p<-preds[81:100,]

data<-foreccomb(train_o, train_p, test_o, test_p)
comb_BG(data)

Run the code above in your browser using DataLab