cointegrating var models and probability forecasting: applied to a small open economy gustavo...

24
Cointegrating VAR Models Cointegrating VAR Models and Probability and Probability Forecasting: Forecasting: Applied to a Small Open Economy Applied to a Small Open Economy Gustavo Sánchez Gustavo Sánchez April 2009

Upload: beatrix-patrick

Post on 02-Jan-2016

224 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Cointegrating VAR Models Cointegrating VAR Models and Probability and Probability

Forecasting:Forecasting:Applied to a Small Open Applied to a Small Open

EconomyEconomy

Gustavo SánchezGustavo Sánchez

April 2009

Page 2: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

SummarySummary

VEC and Cointegrating VAR ModelsVEC and Cointegrating VAR Models Estimate ParametersEstimate Parameters

Probability ForecastingProbability Forecasting Simulate ForecastsSimulate Forecasts Summary Statistics to estimateSummary Statistics to estimate

probabilities of eventsprobabilities of events

Page 3: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Point Forecast and Confidence Point Forecast and Confidence IntervalInterval

15.8

1616

.216

.416

.6

16.3

16.4

16.5

16.6

16.7

6.8

77.

27.

47.

6

33.

54

4.5

2008q4 2009q1 2009q2 2009q3 2009q4 2008q4 2009q1 2009q2 2009q3 2009q4

Forecast for lm1 Forecast for lgdp

Forecast for lcpi Forecast for loilp

95% CI forecast

Page 4: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Probability of Inflation Greater than 45

Proportion estimation Number of obs = 225

  Proportion Std. Err. [95% Conf. Interval]

inf_45  

0 0.2888889 0.0302838 0.2292113 0.348566

1 0.7111111 0.0302838 0.6514336 0.770789

0.0

2.0

4.0

6D

en

sity

0 20 40 60 80inf

kernel = epanechnikov, bandwidth = 1.9987

Density Inflation

Page 5: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Cointegrating VAR modelsCointegrating VAR models

Based on the vector error correction (VEC) model Based on the vector error correction (VEC) model specification.specification.

The specification assumes that the economic The specification assumes that the economic theory characterizes the long-run equilibrium theory characterizes the long-run equilibrium behaviorbehavior

The short-run fluctuations represent deviations The short-run fluctuations represent deviations from that equilibrium.from that equilibrium.

The short-run and long-run (economic) concepts The short-run and long-run (economic) concepts are linked to the statistical concept of are linked to the statistical concept of stationarity.stationarity.

Page 6: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Cointegrating VAR modelsCointegrating VAR modelsReduced form for a VEC modelReduced form for a VEC model

I(1) Endogenous variables

Where:

:tz

tit

p

iitt zzbtaz

1

11

:

:i

:,ba

:t

Matrix with coefficients associated to short-run dynamic effects

Vectors with coeficients associated to the intercepts and trends

Vector with innovations

Matrices containing the long-run adjustment coefficients and coefficients for the cointegrating relationships

Page 7: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Cointegrating VAR modelsCointegrating VAR modelsReduced form for a VEC modelReduced form for a VEC model

tit

p

iitt zzbtaz

1

11

Identifying Identifying αα and and ββ requires r requires r22 restrictions restrictions (r: number of cointegrating vectors).(r: number of cointegrating vectors).

Johansen FIML estimation identifies Johansen FIML estimation identifies αα and and ββ by imposing r by imposing r22 atheoretical restrictions. atheoretical restrictions.

Page 8: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Cointegrating VAR modelsCointegrating VAR models

Garrat et al. (2006) describe the Cointegrating Garrat et al. (2006) describe the Cointegrating VAR approach:VAR approach:

Use economic theory to impose restrictions to Use economic theory to impose restrictions to identify identify αβαβ..

Exact identification is not necessarily achieved by Exact identification is not necessarily achieved by the theoretical restrictions. the theoretical restrictions.

Test whether the overidentifying restrictions are Test whether the overidentifying restrictions are valid.valid.

Page 9: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

** Restrictions on VEC system **

*** Restrictions on Beta lm1 ***constraint 1 [_ce1]lm1=1. . .constraint 6 [_ce1]ltipp906bn=0

*** Restrictions on Beta lmt ***constraint 8 [_ce2]lmt=1

. . .constraint 11 [_ce2]ltipp906bn=0

*** Restrictions on alpha ***constraint 12 [D_loilp]l._ce1=0constraint 13 [D_loilp]l._ce2=0

** VEC specification **

vec lm1 lmt lcpi loilp ltcpn lxt ltipp906bn lgdp ///if tin(1991q1,2008Q4), lags(2) rank(2) ///bconstraints(1/11) aconstraints(12/13) ///noetable

Page 10: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Vector error-correction modelSample: 1991q1 - 2008q4 No. of obs = 72 AIC = -15.80442Log likelihood = 659.9591 HQIC = -14.6589Det(Sigma_ml) = 1.51e-18 SBIC = -12.92697Cointegrating equationsEquation Parms chi2 P>chi2-------------------------------------------_ce1 2 50.19532 0.0000_ce2 3 1639.412 0.0000-------------------------------------------Identification: beta is overidentifiedIdentifying constraints: ( 1) [_ce1]lm1 = 1 ( 2) [_ce1]lmt = 0 ( 3) [_ce1]lxt = 0 ( 4) [_ce1]loilp = 0 ( 5) [_ce1]lcpi = 0 ( 6) [_ce1]ltipp906bn = 0 ( 7) [_ce2]lm1 = 0 ( 8) [_ce2]lmt = 1 ( 9) [_ce2]lxt = 0 (10) [_ce2]ltcpn = 0 (11) [_ce2]ltipp906bn = 0

Page 11: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

------------------------------------------------------------------------------ beta | Coef. Std. Err. z P>|z| [95% Conf. Interval]-------------+----------------------------------------------------------------_ce1 | lm1 | 1 . . . . . lmt | (dropped) lcpi | (dropped) loilp | (dropped) ltcpn | .215578 .0697673 3.09 0.002 .0788365 .3523194 lxt | (dropped) ltipp906bn | (dropped) lgdp | -4.554976 .6489147 -7.02 0.000 -5.826825 -3.283127 _cons | 57.02687 . . . . .-------------+----------------------------------------------------------------_ce2 | lm1 | (dropped) lmt | 1 . . . . . lcpi | -.0317544 .0087879 -3.61 0.000 -.0489784 -.0145304 loilp | -.0780758 .0255611 -3.05 0.002 -.1281746 -.027977 ltcpn | (dropped) lxt | (dropped) ltipp906bn | (dropped) lgdp | -2.519458 .1105036 -22.80 0.000 -2.736041 -2.302875 _cons | 26.26122 . . . . .------------------------------------------------------------------------------

Page 12: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

*** Point Forecast ***

fcast compute y_, step(4)

keep y_lm1 y_lmt y_lcpi /// y_loilp y_ltcpn y_lxt /// y_ltipp906bn y_lgdp quarter

keep if tin(2009q1,2009q4)

save "filename"

Page 13: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

** Residuals from the VEC equations **

foreach x of varlist lm1 lmt lxt loilp /// ltcpn lcpi ///

ltipp906bn lgdp {

predict res_`x' if e(sample), ///residuals ///equation(D_`x')

}

Page 14: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Probability ForecastingProbability Forecasting

It is basically an estimation of the It is basically an estimation of the probability that a single or joint event probability that a single or joint event occurs. occurs.

We could define the event in terms of the We could define the event in terms of the levels of one or more variables, for one or levels of one or more variables, for one or more future time periods.more future time periods.

It is associated to the uncertainty It is associated to the uncertainty inherent to the predictions produced by inherent to the predictions produced by regression models.regression models.

Page 15: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Probability ForecastingProbability Forecasting

This methodology can be applied to a wide This methodology can be applied to a wide diversity of models. Our focus here is on diversity of models. Our focus here is on the predictions from a cointegrating VAR the predictions from a cointegrating VAR model. model.

In general, forecasting based on In general, forecasting based on econometric models are subject to:econometric models are subject to:

Future uncertaintyFuture uncertainty Parameters uncertaintyParameters uncertainty Model uncertaintyModel uncertainty Measurement and policy uncertaintyMeasurement and policy uncertainty

Page 16: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Probability ForecastingProbability Forecasting

ttt uxy

),0(~ 2Nu

Future and parameter uncertaintyFuture and parameter uncertainty Let’s consider the standard linear regression Let’s consider the standard linear regression

model:model:

WhereWhere

Page 17: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Probability ForecastingProbability Forecasting

)(1

)('),(1

ˆ sT

jT

sjT uxy

),(1sj

Ty

)(ˆ j

Future and parameter uncertaintyFuture and parameter uncertainty For example, for For example, for σσ22 known we could known we could

simulatesimulate; j=1,2,…,J ; s=1,2,…,S

)(1sTu

12 )'(,ˆ XXN T

2,0 N)(ˆ j

Where:

j-th random draw from

s-th random draw fromwhich is independent from the random

draw for

Page 18: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Probability ForecastingProbability Forecasting

Computations for VAR cointegrating Computations for VAR cointegrating modelsmodels Let’s consider the VEC modelLet’s consider the VEC model

Non-Parametric Approach

1. Simulated errors are drawn from in sample residuals

2. The Choleski decomposition for the estimated Var-Cov matrix of the error term is used in a two-stage procedure combined with the simulated errors in (1).

tit

p

iitt Htaazzz

10

1

11

'

Page 19: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

** Matrix for Simulation (First Stage, Pag.167) **

matrix sigma=e(omega) /* V-C Matrix of the residuals */

matrix P=cholesky(sigma) mkmat res_lm1 res_lmt res_lxt res_loilp ///

res_ltcpn res_lcpi /// res_lgdp res_ltipp906bn /// if tin(1991q1,2008q4), /// matrix(res)

matrix invP_res=inv(P)*res' matrix invP_rs1=invP_res‘ svmat invP_rs1,names(col)

Page 20: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

** Program for Residual Resampling **

program mysim_np, rclass preserve bsample 4 if tin(1991q1,2008q4) /* 4 frcst. per. */

mkmat IP_R_D_lm1 IP_R_D_lm IP_R_D_lcpi /// IP_R_D_loilp IP_R_D_ltcpn IP_R_D_lxt /// IP_R_D_ltipp906bn IP_R_D_lgdp,///

matrix(IP_R)

matrix PE_tr=P*IP_R' matrix PE=PE_tr' svmat PE,names(col)

● ● ●● ● ●● ● ●

Page 21: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

****** Simulation ****** simulate “varlist", rep(###) ///

saving("filename",replace): ///mysim_np

command: mysim_np s_lm1_1: r(res_lm1_1) s_lm1_2: r(res_lm1_2)

● ● ●● ● ●● ● ●

s_lgdp_3: r(res_lgdp_3) s_lgdp_4: r(res_lgdp_4)

Simulations (###) ─┼─ 1 ─┼─ 2 ─┼─ 3 ─┼─ 4 ─┼─ 5 .................................................... 50

● ● ●● ● ●● ● ●

Page 22: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

**** Probability Forecasting ****

generate dgdp=gdp/gdp2008*100-100 ///if year==2009 & ///replication>0

generate inf=cpi/cpi2008*100-100 ///if year==2009 & ///replication>0

generate gdp_n__inf45=cond(dgdp<0 & inf>45,1,0)

proportion gdp_n__inf35

Page 23: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Probability of Negative GDP and Inflation>45

Proportion estimation Number of obs = 225

  Proportion Std. Err. [95% Conf. Interval]

gdp_1__inf45  

0 .68 .0311677 .6185805 .7414195

1 .32 .0311677 .2585805 .3814195

0.0

2.0

4.0

6D

en

sity

0 20 40 60 80inf

kernel = epanechnikov, bandwidth = 1.9987

Density Inflation

0.0

5.1

.15

.2D

en

sity

-10 -5 0 5dgdp

kernel = epanechnikov, bandwidth = 0.6461

Density GDP

Page 24: Cointegrating VAR Models and Probability Forecasting: Applied to a Small Open Economy Gustavo Sánchez April 2009

Cointegrating VAR Models Cointegrating VAR Models and Probability and Probability

Forecasting:Forecasting:Applied to a Small Open Applied to a Small Open

EconomyEconomy

Gustavo SánchezGustavo Sánchez

April 2009