Video length is 20:00

Nonlinear Confidence Bands Computation in MATLAB

Kadir Tanyeri, IMF

The global dynamic stochastic general equilibrium model for forecasting main macroeconomic variables like GDP, inflation, and unemployment is nonlinear. There is a crucial need to compute confidence bands around the projections in order to establish the uncertainty about them, detect escalated up/down risks, and calculate useful statistics like recession and deflation probabilities.

Confidence intervals are calculated by drawing samples from the estimated distributions of exogenous shock terms and each time solving the system of equations using a nonlinear solver in MATLAB®. The standard method, Monte Carlo sampling, is not practical due to the enormous number of drawings needed. We opted for a more structured way of drawing the shocks in order to more evenly sweep the high dimensional space—Latin hypercube sampling–which we have implemented in MATLAB. This sampling technique implies a faster convergence; in other words, a smaller number of simulations is needed to obtain good estimates of the confidence bands.

Furthermore, we do use distributed computing in MATLAB over a cluster of servers to speed up the process even further. System solution and calculations are sent to more than 100 workers on a cluster of several servers, then results are collected and compiled, which enables the whole calculation to be completed overnight instead of taking months if none of these methods were involved.

Published: 7 Nov 2023