Econometric Analysis

Download Report

Transcript Econometric Analysis

University of Piraeus
Antypas Antonios
Contents
 Time Series Models
 Forecasting
 In Sample & Out of Sample
 Modeling The Dynamics of The Variance
 Conditional Heteroskedasticity Models - GARCH(p,q)
 Re-specifying our initial model
 Forecasting
 Forecasting: what value we expect our series to take in a later
period?





Suppose we have an ARIMA(1,0,0) series yt:Yt  c  Yt 1  ut
c
Then E (Yt ) 
1 
That is, given no other information, we expect that our series will take
the value c for every point of time (since our series is stationary)
1 
When we do not take into account information about the expectation
of a random variable, we say that we examine the unconditional mean
of the random variable
We need to discriminate between unconditional and conditional
expectations
 Forecasting
 Forecasting: what value we expect our series to take in a later
period?


What happens if there is valuable information that we wish to take
into account in the derivation of our forecast?
Suppose we collect all valuable information that we expect to
influence our sense on the expected value of our series, into a set It.
Subscript t demonstrates that we allow our information set to be time
varying, that is information comes in and out of our set It
continuously.
 Forecasting
 Forecasting: what value we expect our series to take in a later
period?

An example of having valuable information influences our
expectations
 Suppose you talk about a football game between teams West and East
 Before the game we believe that these two teams have the same chances
to win game. Suppose we are interested in the probability of A={Team
West wins the game}. Then
 P(A)=50%
 What happens to this probability if valuable information starts arriving
e.g.:
 Information B={Team East has paid the referee to be biased}. Then
we would lower this probability by some degree e.g.
 P(A given Information B)=20%
 Forecasting
 Forecasting: what value we expect our series to take in a later
period?

An example of having valuable information influences our
expectations
 What happens to this probability if valuable information starts arriving
e.g. you get aware of the following information:
 Information It={The score of the game at minute t}.
 I20 ={East-West:0-2} – that is team West is winning by two goals after
20 minutes of game. Then we would still have
P(A)=50% but
 P(A given I20)= P(A | I20)= 90% (Why this probability is lower ?)


I80 ={East-West:4-2} – that is team East is winning by two goals after
80 minutes of game. Then we would still have
P(A)=50% but
 P(A given I80)= P(A | I80)= 20% (Why this probability is higher?)

 Time Series Analysis
 Forecasting: what value we expect our series to take in a later
period?



Two types of forecasting: In the Sample & Out 0f the Sample
In sample forecasting uses all information until time t, and forecasts
values for periods T≤t. We study in sample forecasting to see the
fitting abilities and interpreting our model
Out of sample forecasting uses all information until time t and makes
forecasts for periods T≥t. Out of sample forecasting is more important
in financial applications since it values the ability of our model to
describe the future given only past information
 Forecasting
 Forecasting: what value we expect our series to take in a later
period?




We return to our example of an ARIMA(1,0,0) series yt:Yt  c  Yt 1  ut
Define It to be all the valuable information about the series revealed
until period t
Forecasting one period ahead: E (Yt 1 | It )  E (c  Yt  ut 1 | I t )  c  Yt
Forecasting two periods ahead
E (Yt 2 | It )  E (c  Yt 1  ut 2 | It )  c   E (Yt 1 | I t )
Conditional Expectation
Depends on the Specific
ARIMA (p,d,q) model that
we use to describe our series
In Sample Uses the
actual value of Yt+1.
Static forecasting
Out of Sample Uses
the forecasted value of
Yt+1.
Dynamic forecasting
 Forecasting
 Forecasting: what value we expect our series to take in a later
period?

How to compare two models with respect to their forecasting abilities?
 Use both models and derive forecasted values
where i=1,2
 Derive the forecast errors of the models

Calculate Mean Error: MEModel _ i
1 T
  ErrorModel _ i
T t 1
1 T
2
  ErrorModel
_i
T t 1

Calculate Mean Square Error: MSEModel _ i

Calculate Root Mean Square Error: RMSEModel _ i  MSEModel _ i

Within the above measures choose the model with lower value
 Econometric Analysis: Modeling The Dynamics of The
Variance
 One of stylized facts of financial time series is volatility
clustering, that is windows – clusters – in time where
variance is constant but changes between clusters.
 e.g. Daily Returns of SP500 15
10
5
0
-5
-10
-15
Econometric Analysis
 If volatility is low today, it is most probable that volatility will
remain low tomorrow
 If volatility is high today, it is most probable that volatility
will remain high tomorrow
15
10
5
0
-5
-10
-15
Econometric Analysis
 If volatility is low today, it is most probable that volatility will
remain low tomorrow
 If volatility is high today, it is most probable that volatility
will remain high tomorrow
 We need a class of models to incorporate these features
 Suppose we have an AR(1) process: Yt  c  Yt 1  ut
c
2
 Then: E (Yt ) 
and var(Yt ) 
2 . What about conditional
1 
1 
moments?
var(Yt | I t 1 )  var(c  Yt 1  ut | I t 1 ) 
 E (Yt | It 1 )  c  Yt 1 and  var(u | I )  E (u  E (u | I ) | I ) 2 
t
t 1
t
t
t 1
t 1
 E (ut2 | I t 1 )
 That is although unconditional variance is constant –
Unconditional Homoskedasticity, conditional variance is
allowed to vary over time – Conditional Heteroskedasticity
Econometric Analysis
 Engle (1980) proposed AutoRegressive Conditional
Heteroskedasticity models of order p - ARCH(p)
 Model conditional heteroskedasticity using as a proxy the
squared disturbances - errors of the model
 t2  ut2  a  1ut21  2ut22  ... put2 p   t
 u t2 approximates current volatility
2
2
2
 ut 1 , ut 2 ,..., ut  p approximate past volatilities ( p periods back)
 α,β1,β2,…βp are positive
 Σβi<1
Econometric Analysis
 Bollerslev (1986) proposed the Generalized AutoRegressive
Conditional Heteroskedasticity models of order p,q GARCH(p,q)
  t2  a  1ut21  ...   put2 p   1 t21  ...   q t2q   t
MA(p) TERMS
AR(q) TERMS
 Observe that this representation of the dynamics of the
volatility is similar to the representation of an ARMA(p,q)
process
 α,β1,β2,…βp,γ1,γ2,…γq are positive
 Σ(βi+γi )<1
Econometric Analysis
 Estimation of the parameters can only be achieved through
maximum likelihood estimation. Econometric programs
have installed routines for estimating these models
 Modifications of the original GARCH Models
 EGARCH
 GJR – GARCH
 NARCH
 TARCH
 SWARCH
Econometric Analysis
 How to estimate a GARCH model in gretl
 Method 1: Using gretl’s UI – Go Model – Time Series – GARCH
Variants (or GARCH if you want to run the standard GARCH
model)
Econometric Analysis
 How to estimate a GARCH(p,q) model in gretl
 Method 1: Using gretl’s UI
AR lags allows to correct for serial
autocorrelation
 Mean regressors allow you to
include additional explanatory
variables

Econometric Analysis
 How to estimate a GARCH model in gretl
 Method 2: Using Program Command. For example, to estimate
a GARCH(1,1) variance for the model Yt=c+ρYt-1+b1X1,t+b2X2,t+ut:
garch 1 1 ; y 1 x1 x2
after the dependent variable
define how many AR(p) lags
you want to include in the
model. You may do so if you
want to model autocorrelation
as well.
𝑦𝑡 = 𝑐𝑜𝑛𝑠𝑡 + 𝜌𝑦𝑡−1 + 𝛽1 Χ1,𝑡 + 𝛽2 Χ2,𝑡 + 𝑢𝑡
2
2
𝜎𝑡2 = 𝜔 + 𝑏𝑒𝑡𝑎 𝜎𝑡−1
+ 𝑎𝑙𝑝ℎ𝑎 𝜎𝑡−1
+ 𝑒𝑡
Econometric Analysis
 How to estimate a GARCH model in gretl
 Once the GARCH model has been estimated, you can verify
that heteroskedasticity has been resolved by testing the
standardized residuals for ARCH effects
 Step 1: Select to calculate standardized residuals when
estimating a GARCH model
 Step 2: From the model output, select Save->Residuals, or once
you have run the model type: series name=$uhat
Econometric Analysis
 How to estimate a GARCH model in gretl
 Step 3: Estimate with OLS a model with standardized residuals
being the dependent variable and include only a constant as
explanatory variable
 Step 4: Run an ARCH test to this model. If prob>0.05,
heteroskedasticity has been resolved -> the variance of the
error term of the modified model is homoscedastic
 Similar approach can verify that autocorrelation has been
resolved by adding ARMA terms in our model
Econometric Analysis
 Using Dynamic Models to Correct Misspecified Models
 In misspecification testing we check the residuals for the
presence of serial correlation or / and heteroskedasticity
 By conducting the appropriate tests we can conclude to the
ways that we should model the above findings

Correcting Serial Correlation
 We know how to interpret the correlogram of the residuals to see if we
can model their dependence using an ARMA (p,q) model
 If we see some pattern, we try to correct the presence of serial
correlation to the residuals by adding the appropriate ARMA(p,q)
terms to our equation as suggested by the correlogram
 We re-estimate our model and check if the serial dependence have
disappeared. We also check the t-statistics of the ARMA terms to verify
that they should remain in our equation
Econometric Analysis
 Using Dynamic Models to Correct Misspecified Models
 In misspecification testing we check the residuals for the
presence of serial correlation or / and heteroskedasticity
 By conducting the appropriate tests we can conclude to the
ways that we should model the above findings

Correcting Heteroskedasticity
 By performing the appropriate tests (ARCH LM test , correlogram
squared residuals) we can decide if we have heteroskedasticity of this
specific type
 If we do reject the Null of homoskedasticity, we can infer that we have
heteroskedasticity of GARCH type
 We re-estimate our model by adding the GARCH specification to the
error terms and check in the new residuals if the heteroskedasticity
remains
Econometric Analysis
 What if Dynamic Models are not suitable for modeling the
non – spherical disturbances

Correcting Heteroskedasticity
 Consider the model: yt  a   X t   Z t  ut
 In the White Heteroskedasticity Test, we check if the dynamics of
volatility are caused by the explanatory variables and a function of
them ut2  a  1 X t   2 Z t  3 X t Z t   4 X t2  5 Z t2   t
 If we reject the null of homoskedasticity then by investigating the t2
statistics we can infer which factor causes heteroskedasticity, e.g. X t
therefore we conclude that heteroskedasticity is of the form
var(ut)=σ2 X t2
2
X
 We transform our initial model by deviating our model with
t
yt
y
Z
u
a  X t  Z t ut
1




 t 
    t  t  yt*  aX t*     Z t*  ut*
Xt Xt
Xt
Xt Xt
Xt
Xt
Xt Xt

In the new transformed model, the new error term
u
1
1
since var(ut* )  var( Xt )  X 2 var(ut )  X 2 X t2 2   2
t
t
t
ut*
is homoscedastic
Econometric Analysis
 What if Dynamic Models are not suitable for modeling the
non – spherical disturbances

Correcting Heteroskedasticity
 This method of estimation is called Generalized Least Squares
 How to apply this methodology in gretl
 Step 1: Estimate the equation yt  a   X t   Z t  ut

gretl command to estimate the model with ordinary least squares and
save the output in the session as saveModel:
“saveModel”<- ols y const x z
Econometric Analysis
 What if Dynamic Models are not suitable for modeling the
non – spherical disturbances

Correcting Heteroskedasticity
 This method of estimation is called Generalized Least Squares
 How to apply this methodology in gretl
 Step 2: Perform White Heteroskedasticity test
Econometric Analysis
 What if Dynamic Models are not suitable for modeling the
non – spherical disturbances

Correcting Heteroskedasticity
 This method of estimation is called Generalized Least Squares
 How to apply this methodology in Eviews (use workfile
heteroskedasticity.wf1)
 Step 2: Examine results of White test

We see that Probability < 0.05 therefore we reject the null of
homoskedasticity
Econometric Analysis
 What if Dynamic Models are not suitable for modeling the
non – spherical disturbances

Correcting Heteroskedasticity
 This method of estimation is called Generalized Least Squares
 How to apply this methodology in Eviews (use workfile
heteroskedasticity.wf1)
 Step 2: Examine results of White test

Observe that squared x appears to be the most significant
Econometric Analysis
 What if Dynamic Models are not suitable for modeling the
non – spherical disturbances

Correcting Heteroskedasticity
 This method of estimation is called Generalized Least Squares
 How to apply this methodology in gretl
 Step 2(b): Exclude alternative types of heteroskedasticity, e.g. check
for GARCH effects, by conducting an ARCH test
Econometric Analysis
 What if Dynamic Models are not suitable for modeling the
non – spherical disturbances

Correcting Heteroskedasticity
 This method of estimation is called Generalized Least Squares
 How to apply this methodology in gretl
 Step 3: Generate the new series for running GLS as shown in slide 23
series yStar=y/x
series constStar=1/x
series xStar=x/x
series zStar=z/x
 Step 4: Estimate the suggested model using ordinary least squares
“modelCorrected”<- ols yStar constStar xStar zStar
Econometric Analysis
 What if Dynamic Models are not suitable for modeling the
non – spherical disturbances

Correcting Heteroskedasticity
 This method of estimation is called Generalized Least Squares
 How to apply this methodology in gretl
 Step 5: Perform again White Heteroskedasticity test to confirm that
heteroskedasticity is not present in the final model. To do so, save
the residuals of the model (series resids=$uhat) and estimate a
simple ols model with only a constant and then test if that model has
heteroskedasticity or not.
Econometric Analysis
 What if Dynamic Models are not suitable for modeling the
non – spherical disturbances




What happens if we cannot model serial correlation or
heteroskedasticity in a specific way as described by the presented
models?
When heteroskedasticity or / and serial correlation is present our
estimates remain unbiased but we fail to estimate correctly the
variance of the estimators, therefore we can not make valid statistical
inference
White proposed an estimation procedure, where while keeping the
same estimates for the values of the coefficients, corrects the estimates
of the variances of the estimators for the presence of
heteroskedasticity
Newey –West expanded the estimation procedure of White by
correcting the estimates of the variances of the estimators for the
presence of heteroskedasticity and serial correlation
Econometric Analysis
 What if Dynamic Models are not suitable for modeling the
non – spherical disturbances




What happens if we cannot model serial correlation or
heteroskedasticity in a specific way as described by the presented
models?
First we check our residuals for the presence of serial correlation and
heteroskedasticity
If we detect only heteroskedasticity and we can not (or we do not wish
to) model it, then we re-estimate our model using White method
If we detect serial correlation with or with out heteroskedasticity and
we can not (or we do not wish to) model it, then we re-estimate our
model using Newey – West method
Econometric Analysis
 What if Dynamic Models are not suitable for modeling the
non – spherical disturbances


Applying White and Newey West estimation method in gretl
Manually from the estimation window, from Options Tab we can
select the same methods