主要内容

Forecast Multivariate Model Responses Using Econometric Modeler App

This example shows how to estimate a VAR model, and then generate forecasts from the model by using the Econometric Modeler app. This example follows from the analysis in Compare Predictive Performance After Creating Models Using Econometric Modeler.

Although the example uses a VAR model, the workflow is similar for all multivariate models available in Econometric Modeler, such as VEC models. Econometric Modeler cannot forecast models containing an exogenous predictor variables, such as VARX models.

The data set, which is stored in Data_USEconModel.mat, contains the raw, quarterly US GDP, M1 money supply, and 3-month T-bill rate, among other series, from 1947 through 2009.

Load and Import Data into Econometric Modeler

At the command line, load the Data_USEconModel.mat data set.

load Data_USEconModel

At the command line, open the Econometric Modeler app.

econometricModeler

Alternatively, open the app from the apps gallery (see Econometric Modeler).

Import DataTimeTable into the app:

  1. On the Modeler tab, in the Import section, click the Import button .

  2. In the Import Data dialog box, select the check box for the DataTimeTable variable.

  3. Click Import.

GDP, M1SL, and TB3MS, among other series, appear in the Time Series pane, and a time series plot containing all series appears in the figure window.

Transform Series

Remove the exponential trend from the GDP and M1 money supply series by applying the log transform to each series. Click the Modeler tab, and then, in the Time Series pane, click GDP and Ctrl click M1SL. In the Transforms section, click Log. The transformed series GDP_Log and M1SL_Log appear in the Time Series pane, and their time series plot appears in the Plot(GDP_Log) figure window.

Stabilize the series by applying the first difference to each series.

  1. Click the Modeler tab, and then, in the Time Series pane, click GDP_Log and Ctrl+click M1SL_Log and TB3MS.

  2. In the Transforms section, click Difference. The transformed series GDP_Log_Diff, M1SL_Log_Diff, and TB3MS_Diff appear in the Time Series pane, and their time series plot appears in the Plot(GDP_Log_Diff) figure window.

  3. Rename GDP_Log_Diff and M1SL_Log_Diff to GDPRate and M1SLRate by clicking their names twice in the Time Series pane, and typing their new names.

Estimate VAR Models

Fit a 3-D VAR(2) model to the US quarterly GDP growth rate series GDPRate, M1 money supply growth rate series M1SLRate, and change in the 3-month treasury bill rate series TB3MS_Diff.

  1. In the Time Series pane, click GDPRate and Ctrl+click M1SLRate and TB3MS_Diff.

  2. In the Models section, click VAR.

  3. In the VAR Model Parameters dialog box, set Autoregressive Order (p) to 2. Then, click Estimate.

    The model variable VAR appears in the Models pane, its value appears in the Preview pane, and its estimation summary appears in the Fit(VAR) document.

Forecast Estimated Model

Forecast the model into a 10-year (40-period) horizon.

  1. In the Models pane, select the VAR model.

  2. On the Modeler tab, in the Forecast section, click Forecast.

  3. In the Forecast Model Response dialog box, set Number of periods in forecast horizon to 40. Click Forecast.

    This screen shot shows the Forecast Model Response dialog box with Number of periods in forecast horizon set to 40.

In the Forecasts pane, a variable For_VAR appears. This variable is a structure array with the following fields:

  • Forecastfh-by-m matrix of forecasted responses, with rows corresponding to the fh specified periods in the forecast horizon and columns corresponding to the variables in the model.

  • UpperConfidenceBoundfh-by-m matrix of upper confidence bounds of the pointwise 95% Wald-based forecast intervals

  • LowerConfidenceBoundfh-by-m matrix of lower confidence bounds of the pointwise 95% Wald-based forecast intervals

Note

In the Forecast Model Response dialog box, when you set Method to Simulation, Econometric Modeler computes and returns Monte Carlo simulation statistics:

  • Forecastfh-by-m matrix of pointwise means of the forecasted paths

  • UpperConfidenceBoundfh-by-1 matrix of upper confidence bounds of the pointwise 95% percentile-based forecast intervals

  • LowerConfidenceBoundfh-by-1 matrix of lower confidence bounds of the pointwise 95% percentile-based forecast intervals

In the right pane, in the For(VAR) tab, is a plot containing the following time series associated with the GDPRate variable:

  • The time series data (blue line)

  • Forecasts (dashed blue line)

  • The pointwise 95% percentile-based confidence intervals (light blue region)

This time series plot shows the GDP rate time series with forecasts and forecast intervals.

In the long run, the rate settles at around 1.5% on average, but expected to be within the bounds of slightly below 0% to 3.5%.

Plot the TB3MS_Diff forecasts and forecast intervals. In the right pane, in the For(VAR) window, click Time Series > TB3MS_Diff.

This time series plot shows the change in the treasury bill time series with forecasts and forecast intervals.

In the long run, the change in the 3-month treasury bill settles slightly below 0, and is expected to be in the bounds of -2 to 2.

See Also

Apps

Objects

Functions

Topics