Annual bilateral trade values one to eight years ahead, with a cross-validation-based uncertainty band.
Surface: /forecast
BACI 202601 (CEPII), HS96, 1996-2024 (retrieved 2026-06-01)
The forecast combines Holt's linear trend method, OLS linear regression, and a weighted moving average with drift.
Holt smoothing parameters are selected by a grid search that minimises in-sample mean squared error. The moving average uses up to the latest five observations with linearly increasing weights and a similarly weighted annual drift.
Each model's ensemble weight is proportional to inverse leave-last-out cross-validation MSE, using at most five folds. Equal weights are used when the cross-validation errors cannot determine weights. Negative ensemble forecasts are clamped to zero.
The uncertainty band uses the ensemble's pooled leave-last-out residual error, with fold-local weights recomputed so held-out observations do not enter their own forecast weights. The margin grows with the square root of the forecast horizon.
Total-trade forecasts read the bilateral total directly. Commodity forecasts approximate bilateral commodity trade as the bilateral total multiplied by the exporter's share of exports in the selected HS chapter group. BACI values are converted from thousands of USD to plain USD before modelling.
weight(m) = [1 / MSE(m)] / sum_j [1 / MSE(j)]forecast(k) = max(0, sum_m weight(m) * forecast(m,k))WMA = sum_i i * value(i) / sum_i iOLS_value(year) = intercept + slope * yearband(k) = forecast(k) +/- 1.96 * residual_SE * sqrt(k)| Path | Method | Returns | Example |
|---|---|---|---|
| /api/prediction/forecast | POST | The historical bilateral series in plain USD and forecast periods, predicted values, lower and upper bands, model weights, and leave-last-out backtest diagnostics. | Not linkable |