Download Dan Hamilton WLV_DataScience_Aug9_2016

Document related concepts
no text concepts found
Transcript
Introduction to Macro
Economic Forecasting
Macroeconomic forecasting models with
econometric design considerations.
Dan Hamilton
August 9, 2016
Outline
 Economic Forecasting
 Estimating Correlation
Inertial Models
Structural Models
 Comparison: Inertial vs Structural
 Uncertainty
Confidence Intervals
Scenarios / Example
 Hybrid Estimation Techniques
Error-Correction
ARIMAX
 A Little Bit of History
 Econometrics vs Data Mining/Machine
Learning
Who Am I?
Director: MS in Quantitative Economics
• One – Year and you are Done!
• Learn How to Forecast and Analyze Data
Research: Forecasting Methods, Applied
Macroeconomics
Forecasting: Center for Economic Research
and Forecasting
•
•
•
United States
California
Ventura County
An Invitation: Ventura County Economic
Forecast conference, includes lunch, on Nov. 10,
10-2, at the Serra Center in Camarillo.
What is our current U.S.
forecast?
Real Gross Domestic Product
4.6
3.9 3.9
3.1
2.7
1.4
2.0
1.3
1.7
2.72.5 2.9
0.8
0.2
2.7
1.9
3.8
3.0
0.5
0.1
-2.7
-1.5
3.9
2.8
2.42.6
2.2
2.1
2.0
2.0
1.4 1.51.6
0.8
0.6
2.1
1.9
1.1
-0.5
-1.9
4.64.3
-0.9
-5.4
-8.2
2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018
Q1 Q1 Q1 Q1 Q1 Q1 Q1 Q1 Q1 Q1 Q1 Q1
Center for Economic Research and Forecasting
United States - (saar q-o-q percent change)
Wall Street Journal (June)
How do Economists Make
Forecasts?
•
•
•
•
•
•
Computer Programs
Data
Crystal Ball
Statistics
Theory
The Story
Computer Programs
• Subroutines
• More subroutines
• The more subroutines, the
more crashing
• You get the idea…
• Why cannot computers read
our minds?
Data
•
•
•
•
Lots of Data
Not the Detail we need
Timeliness
Local Data?
Crystal Ball
Get to know the Area or
Phenomena you are
Forecasting
Statistics
• Lies, Damned Lies, and
Statistics
• Fancy techniques
• But we are measuring
people who are making
decisions!
Statistics
“Econometrics recognizes that social
behavior is exceedingly complex and
that a limited number of variables
related together in fairly simple and
elegant equations cannot explain the
whole of such behavior.”
Lawrence Klein, 1953
Theory
• Correlations without meaning
• How do different sectors &
markets relate to each other?
• Can you find a proxy for missing
data?
The Story
• What else is going on in the
economy?
• Is there greater or less risk at
this time?
• Is the risk asymmetric?
• How can we provide information
to the statistical model?
The Key Statistical Building Block
of Forecasting is Correlation
Note: Economists Love
Running Regressions! 
Sir Francis Galton
1822 to 1911
Papers in the 1880s on correlation,
regression, and other related topics
A Fork in the Road
There are 2 main ways to
proceed with using correlation
analysis as a building block for
forecasting.
We can use “Inertia” or
“Structure”
MacroEconomic Characteristics
- Production can span multiple quarters
- Investment can span many years
- Household savings and consumption
behavior tends to evolve slowly over time
- Trading partners tend to “do business”
with each other for many years at a time
before changing partners.
- Activity is often “path dependent”
- Supply-chains have “inertia”
- Technology shocks can last many years
Question
Given the characteristics on prev. page
– do you think that GDP and GDP(-1)
are correlated?
Levels
Changes
i.e. “Yt”
i.e. “Yt – Yt-1“
99.6%
39.6%
We can exploit this to build an
“inertial” regression model of GDP.
This style of regression model does not
have X’s, i.e. independent variables.
Inertial Models
What Do Inertial Models Look
Like?
Three typical styles:
AR(2)
Yt = c + α Yt-1 + φ Yt-2 + εt
MA(2)
Yt = d + θ εt-1 + β εt-2 + εt
ARMA(2,2)
Yt = c + α Yt-1 + φ Yt-2 + θ εt-1 + β εt-2 + εt
… etc
There is an issue of filtering prior to
estimating the regressions on the
previous page.
Why? Macroeconomic data tend to be
consistent with a mathematically
unstable stochastic difference
equation.
What to do? Take the first difference:
∆yt = yt - yt-1
That was Univariate
Multi-Variate Inertial Models
Also: “Vector Auto-Regressions” or “VAR”
In general, a system with N variables and P lags.
This example is a system with 3 variables and P lags.
Y1t = a10 + a11 Y1t-1 + … + a1(NxP) Y3t-P + ε1t
Y2t = a20 + a21 Y1t-1 + … + a2(NxP) Y3t-P + ε2t
Y3t = a30 + a31 Y1t-1 + … + a3(NxP) Y3t-P + ε3t
Again, if the data is unstable, difference the Y’s.
Structural Models
Structural Models Also Exploit
Correlation
Do you think that Consumption and
Wealth are correlated?
Consumption’s correlation with Wealth:
Levels
98.6%
Changes
47.5%
Structural Modeling: Small Example
Y1 = α + β1X + β2Y2 +
Y2 = φ + β3X + ε2
Y3 = Y1 + Y2 + X
where:
ε1
Y1 is endogenous (stochastic)
Y2 is endogenous (stochastic)
X is exogenous (outside the model)
Y3 is endogenous (identity)
ε1 and ε2 are error terms
Your model will compute the forecasts of Y1, Y2,
and Y3. But, how is the forecast of X
determined?
You (!?) can specify its forecast.
Exogenous Forecast Specified by the Forecaster
Wow, that’s un-scientific?! Actually, its ok. Why?
[a] guidance might be available, e.g. monetary policy:
these days the Fed wants the public to know their
plans for the next year or so.
[b] If you are an expert on what you are forecasting,
you might have relevant information that the model
cannot see.
[c] Make it a “most likely”, which could be thought
of statistically as a moving average of history.
[d] Use a professional forecast for it, e.g. the price of
oil is a common exogenous variable, and the US-EIA
provides both short and long term forecasts.
Exogenous Forecast Specified by the
Forecaster
Are Assumptions the Only Option?
No.
Use inertial methods to forecast the “x”s.
How Structural Models Work
Exogenous Variables Forecast
Model
Endogenous Variables Forecast
You Can Compute More Than One
Forecast
Why?
Answer the question: what happens if X takes
a different future path than what is likely?
A common approach:
Baseline path for X
Optimistic path for X
Pessimistic path for X
Baseline forecast
Optimistic forecast
Pessimistic forecast
A Scenario is a Coordinated
Change to a Set of Exogenous
Variables
The Baseline Macro Scenario
Baseline Exogenous Forecast
(many variables)
Model
Baseline Endogenous Forecast
(many variables)
How Scenarios Work
Baseline
Exogenous
Path
Alternate
Exogenous
Path
Forecast Model
Baseline
Forecast
Alternate
Forecast
What is a Black Swan?
Ted Spread normalized by 3
month Treasury
1980Q1 1984Q3 1989Q1 1993Q3 1998Q1 2002Q3 2007Q1 2011Q3
Annual Yield as a percent of 3-mo. Treasury
The Great Recession
2008-Q4
Dow Jones
1.0 - σ
GDP
5.6 - σ
Ted Spread (norm)
315 – σ !!!!
Black Swan!
What is a Black Swan?
Baseline
Exogenous
Path
Financial Crises
/ Deep
Recession Force
Forecast Model
Baseline
Forecast
Deep Recession
Forecast
Scenario Example
Macroeconomic Example
What if Spain endured a financial crises, and
also, left the Euro Area in a sudden and
disorderly manner?
There would be a number of immediate
implications:
[a] there would be a financial crises, with a
congruent lack of credit
[b] Spain would default on its bonds
[c] there would be bank failures,
bankruptcies, etc.
[d] business investment would plummet
[e] household spending would retrench
Average GDP Growth, (Canada, France,
Germany, U.K.)
(Y-o-Y perc chg)
2.9 3.0
2.6 2.4 2.7
2.3 2.4
1.6
1.1
2.5
2.8
2.2 2.3 2.3
1.8 1.8 1.6 1.7 1.8 1.9 1.9 2.0
1.6 1.6 1.5
1.1
0.3
-0.3
-1.7
-1.2
-2.6
-3.6
-5.0
-4.2
-4.6
-7.8
-8.7
2007Q1
2008Q1
2009Q1
2010Q1
y-o-y percent change
2011Q1
2012Q1
"Financial Crises"
2013Q1
Real Gross Domestic Product
3.6
3.8 3.9 3.8
3.0
1.7
1.7
1.3
0.5
2.8
2.5 2.3
1.3
0.4
-0.7
1.8
1.0 0.8
1.6
2.2
3.1
2.7 3.0 2.9
0.7 0.8 1.0
0.6
-1.7
-2.0
-1.8
-3.5
-3.7
-5.9
-6.7
-8.9
2007Q1
2008Q1
2009Q1
2010Q1
2011Q1
Center for Economic Research and Forecasting
United States - (saar q-o-q percent change)
2012Q1
2013Q1
Financial Crises Scenario
Brexit
Britain is leaving the EU in pre-negotiated manner.
This is an orderly exit, not a disorderly exit.
What has happened so far?
[a] Financial market volatility (but not a crises)
[i] Pound fell
[ii] FTSE fell
[b] Impact of [a]: [i] UK exports are up, [ii] Less
investment in inventories/buildings/equipment
/intellectual property.
[c] UK GDP appears to be headed lower, however, it
could have been headed lower anyway, as the EU’s
economy is not doing well.
More on Brexit
[a] Britain does not actually exit the EU for 2 more
years. Key point: this is an orderly exit.
[b] Britain has not and will not default on their bonds
[c] Germany, for example, needs Britain … many
German exports go to Britain … it is not the case
that Britain has no bargaining power in this
situation.
[d] Britain’s trade arrangements pre-date the
formation of the EU, by decades, if not hundreds of
years.
[e] In the long run Britain may benefit from exiting
the EU (i.e. better trade arrangements, less red tape).
Brexit: the punchline
There may be an impact, driven
mostly by jittery financial markets
feeding over into the real economy.
The macro impact does not appear at
this time like it will be very big.
Will there be certain companies and
industries adversely impacted? Yes.
A Key Point
The global economy was already weak
and likely to get weaker despite Brexit.
Macro-Model Structure
Key Identity: Y = C + I + G + EX – IM
C = α + β1(Y – T) + β2(W) + β3(R) + ε
T = taxes, W=wealth, R=real interest rate
I = α + β1(ΔY(-1)) + β2(Q) + β3(R) + ε
Q = market value/cost of capital stock,
R=real interest rate
EX
= α + β1(WGDP) + β2(ER) + ε
WGDP = world GDP, ER = exchange rate
IM
= α + β1(Y – T) + β2(W) + β3(ER) + β4(CP)
+ β5(WIP) + ε
CP = commodity price index, WIP = world
intermediate goods price index
What Happened to G?
What are some other common
Assumption Variables in Macro
forecasting models?
Oil Price
Federal Funds Target Rate / Other Fed
Activities
World GDP
Commercial Banking Spread
Other Commodity Prices
A FLY IN the OINTMENT of Scenarios
Robert Lucas (1976) noted a conceptual problem
with this approach. This is known as the “Lucas
Critique”.
If the behavior of households, firms, and other
countries changes with a change to an exogenous
variable (oil price, gov expenditures, gov tax policy,
etc), then the estimated coefficients are no longer
appropriate.
Solution: try to use the most fundamental theory
available in specifying your regressions.
Not a problem for baseline forecasts where there is
no policy change.
The Lucas Critique
Baseline Tax
Policy (T)
New Tax
Policy (T*)
Forecast Model
The Lucas Critique: this
model is junk if Tax Policy
is changed to T*
Baseline Tax
Policy
Forecast
New Tax
Policy
Forecast
Inertial vs. Structural
Comparisons
Inertial
> no additional data is needed!
> exploiting auto-correlation
> a-theoretical (purely statistical)
> diagnostics are fast and easy
> inexpensive (both time and data)
Structural
> yes, additional data is needed!
> need theory!
> coefficient restrictions
> diagnostics much more work/time
> expensive (both time and data)
Comparison – Part II
Inertial
> there is no “story”, at least not one that
a client who is not a statistician would
appreciate
Structural
> you can tell your client why the forecast
evolves how it does (depends partly on the
evolution of the X variables and partly on
their weights)
This is typically a very big deal in
Macroeconomic Forecasting.
Are inertial models beautiful?
Inertial models are easily
automated, Structural models, not
so much.
ERP Software, Inventory Management
Software, &
Automated Forecasting Software
Which Method Gives Better Forecasts?
Inertial
> short term forecasts
Structural
> long term forecasts
Criticisms of Inertial Models
[a] typically good for the short-run only.
[b] inertial! This cannot anticipate future
market conditions
6
Inertial Model Example
4
2
0
-2
-4
-6
-8
-10
2004
2005
2006
2007
2008
Inertial Forecast
US Real GDP Growth Rate
Can We Combine Them?
Manually
> add inertial regressors to your
independent variable set
Structurally
> estimate an error-correction model
This is a pretty modern technique (Engle
and Granger, 1987)
ARIMAX
> add an X to ARIMA. Known to be helpful
in modeling sales. The X is information on
Marketing efforts (e.g. expenditures).
Error-Correction Models (ECMs)
They combine elements of structure as well
as inertia.
Single-equation SE-ECM
Multiple-equation
VECM
Error-Correction Models (ECMs)
Suppose you know that:
Yt = γ0 + γ1Xt + εt
This is called the “long-run” or “economic”
relation.
It will typically come from theory - examples:
> an equilibrium relation
> an arbitrage relation
> optimal relation from an optimization
problem
> an institutional relation
> etc
Yt = γ0 + γ1Xt + εt
We recognize that this relation might not always
hold exactly, that there will be certain times,
especially times where there is a sudden change
(a “shock”) to a relevant macroeconomic
variable, like oil prices, that impacts various
economic relationships like this one.
But the impact will be temporary.
The economy will move back to “equilibrium”
after the shock has passed.
This movement back is called “ErrorCorrection”.
Error-Correction Models (ECMs)
Yt = γ0 + γ1Xt + εt
If the economy does “error-correct” then we
can estimate this regression model:
ΔYt = β0 + α(ECMt-1)
+ β1(ΔYt-1) + β2(ΔYt-2) + β3(ΔXt-1) + β4(ΔXt-2)
+ … βP(ΔYt-P) + βQ(ΔXt-Q) + ut
Where the ECMt = εt = Yt - γ0 - γ1Xt
Select P and Q to eliminate serial correlation
from ut.
Error-Correction Models Comments:
[1] The ΔY equation on previous slide is a
combination inertial and structural model. The
structural part is the “Y” equation at the top,
and the inertial part are the lagged ΔY and ΔX
terms.
[2] The coefficient on the error-correction term,
ECM, must be negative. Why? If a shock causes
ε to rise (meaning Yt > γ0 + γ1Xt) then if the
error-correction process is to proceed it requires
that the term α(ECMt-1) exert downward pressure
on Y. Note: we are allowing for a time period to
pass, it could be more.
Error-Correction Models (ECMs)
In my experience, these models work better
for 4 or 5 year forecasts than for two year
forecasts. (Macro).
I suspect, but have not tested, these models
could “error-correct” more quickly with
financial modeling.
These can be setup as system, multi-variate
models, just add ECM terms to a VAR, called
VECM. These allow for “error-correction” to
happen to all variables.
What is the alpha coefficient is not negative,
are you sunk? No, see next slide.
Cointegration
A Pretty Modern Result (Stock 1987)
Yt = α + β Xt + θ Zt + εt
OLS on this regression, even if the Y’s are
unstable, as long as εt is stable, is consistent.
The statistical test then, is on the stability of
the errors.
However, most of the estimated second
moments, in particular the standard errors,
are biased. There are techniques for this,
(FM-OLS).
Uncertainty
Interval Forecasts or Confidence Intervals
Statisticians and Econometricians love
them. The Business world, (which
consume 90% of published forecasts), do
not.
The new rage in academia: density
forecasts. Same as C.I.s.
That is why we do scenarios. It’s the
story, yet again, demonstrating the
importance of the “story” in Macro
forecasting.
The History of Macro Forecasting
• John Maynard Keynes/Great Depression (1936) –
Invented Macroeconomics
• Lawrence Klein 1950s, (Nobel in 1980) - Largescale Instrumental Variables forecasting models
• Robert Lucas, Lucas Critique - 1976 (Nobel in
1995)
• Christopher Sims, VAR Models - 1980 (Nobel in
2011)
• Phillips & Engle/Granger (late 80s/early 90s)
Error-correction model estimation, FM-OLS
• Dan Hamilton (Nobel = never!) Single-equation
estimation that uses a mix of both inertial and
structural, as well as some use of ECMs.
Difficulties in Macro Forecasting
[1] Lucas Critique (although applies
more to scenarios)
[2] Multiple equilibria
[3] Structural change
Econometrics vs Data Mining/Machine
Learning
Historical econometric models can suffer
from overfitting. They do not “generalize”,
i.e. they do not forecast well.
Earlier in the previous century, when
econometrics formed, data sizes were small.
But now, this has changed, at least for some
data sets.
Training, Validation, and Testing should
help. However, changes in regime still pose
problems, as future regimes are unknown.
Questions?
Appendix
Estimation of Stochastic Eqns
•
•
•
•
•
•
•
•
•
Ordinary Least Squares
Generalized Least Squares
Instrumental Variables (2-Stage Least Squares)
Time Series Analysis - univariate inertial
models
Vector Autoregression - multivariate inertial
models (VAR)
Single Equation Error-Correction Models
(ECMs)
Vector Error-Correction Models (VECMs)
Dynamic OLS
Fully-Modified OLS (FM-OLS)
Even worse than uncertainty …
Multiple equilibria!
A Characterization …
Quarter 2
(equilibrium #1)
Quarter 1
Quarter 2
(equilibrium #2)
Quarter 3
(equilibrium #1)
Quarter 3
(equilibrium #2)
Quarter 3
(equilibrium #3)
Examples …
September 2008
Switch to a “bad equilibrium”
Middle 2009
Switch to a “good deflation
`equilibrium”