This video demonstrates how to model the U.S. economy using a Vector Error-Correction (VEC) model in MATLAB's Econometric Modeler App. The process involves importing historical macroeconomic data (GDP, wages, hours worked, federal funds rate), applying log transformations to focus on growth rates, and using the Johansen test to determine the cointegration rank. The workflow includes selecting appropriate deterministic terms (H1 trend specification), estimating the VEC model with one lag, generating forecasts, and analyzing economic shocks through impulse response analysis. The model captures long-run relationships among non-stationary macroeconomic series while allowing for short-term disequilibrium adjustments.
Approfondir
Prérequis
- Pas de données disponibles.
Prochaines étapes
- Pas de données disponibles.
Approfondir
Modeling the United States Economy in MATLABAjouté :
This video demonstrates how to model the United States economy in mat lab using a vector error correction or vec model.
Starting with historical macroeconomic data, we will estimate the vec model and then use it to generate forecasts and analyze economic shocks.
We begin with seven indicators including GDP, wages, hours worked, and the federal funds rate. This raw data tends to trend upward over time. Because these series are on different scales, their raw levels can be misleading.
Using logs helps us focus less on absolute size and more on growth rates.
We start by opening the econometric modeler app and importing our data set.
Now we move into model estimation. A vec model is a good fit here because these macroeconomic series are non-stationary, but they can still share stable long run relationships through co-inttegration.
The workflow starts with the Johansson test, which we use to choose the co-integration rank. In this example, the vec lag length is set to one, meaning the model uses the previous quarter's changes to help explain the current quarter. Because the series shows clear trends, we test two Johansson terms that allow linear trends, H star and H1. For more information on how to choose the appropriate deterministic term, see the JCI test documentation.
For HAR, the test statistic first falls below the critical value at rank three, suggesting an estimated rank between three and four, although the result is somewhat marginal. For H1, the result is much clearer and the test more strongly supports a rank of four. To decide between the two, we run a likelihood ratio test. The test fails to reject H1, indicating that the additional trend term in HAR does not materially improve the fit. Based on that result, H1 is selected. With that structure in place, we estimate the VEC model. We select H1, set the co-int integration rank to four, choose one lag, and then click estimate.
The app shows the estimated model coefficients in the parameters table.
The co-integrating relation plot shows the long run relationships among the variables in the system. Those lines remain relatively stable over time, although they become more volatile around recessions.
Next, we click forecast to generate a forecast for GDP.
Once the analysis is complete, we can click export to generate either a live function or a report.
This makes it easy to capture the workflow, reproduce the analysis, and share the results outside the app.
Now that the model is fitted, we can ask a more concrete question. What happens when the economy experiences a shock?
That's where impulse response analysis comes in. We apply a one standard deviation shock to one variable at a time and track how GDP responds over the next 10 years. In this example, the responses show that shocks can leave a lasting effect on GDP.
If you want to explore more advanced workflows, this example also covers rolling out of sample forecast evaluation for real GDP, forecasting around the 2008 financial crisis with uncertainty bands, comparing the great inflation and great moderation periods, and conditional forecasting and simulation using CBO projections.
Visit the documentation page to explore the full workflow, code, and additional resources.
Vidéos Similaires
JPMorgan CEO JUST NUKED Mamdani... as NYC's Middle Class COLLAPSES
Englishman-In-NewYork
7K views•2026-05-30
Why Canadians can no longer afford to survive #canada #inflation #shorts
TrueNorthInvestor-v4j
131 views•2026-06-01
The Hidden Difference Between Breakouts & Real Moves #trading #orderflow
SmartMoneyFutures
272 views•2026-06-02
China Is Quietly Buying Gold, the Iran Deal Is Frozen, and Silver Is Heating Up
RichardHolloway0
694 views•2026-05-31
India's Industrialization & China's Reforms
HR-News-Channel
152 views•2026-06-01
Gachagua issues TOUGH DEMANDS to Ruto gvt before reading Ksh.4.8T 2026/7 Budget & Finance Bill 2026
_kenyanewsline
300 views•2026-06-05
Poilievre Blamed Carney for Canada's Recession But the Data Disagrees
Snap-Psychology
596 views•2026-06-01
I Think Oil Futures Dropped Before Trump’s Iran Statement — And Here’s Why
bradicemancolbert
709 views•2026-06-02











