Financial Econometrics Lecture Notes 3

1 Financial Econometrics Lecture Notes 3University of Pir...
Author: Emma Lawson
0 downloads 3 Views

1 Financial Econometrics Lecture Notes 3University of Piraeus Antypas Antonios

2 Contents Time Series Models ForecastingIn Sample & Out of Sample Modeling The Dynamics of The Variance Conditional Heteroskedasticity Models - GARCH(p,q) Re-specifying our initial model

3 Forecasting Forecasting: what value we expect our series to take in a later period? Suppose we have an ARIMA(1,0,0) series yt: Then That is, given no other information, we expect that our series will take the value for every point of time (since our series is stationary) 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

4 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.

5 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%

6 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 given I80)= P(A | I80)= 20% (Why this probability is higher?)

7 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

8 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: Define It to be all the valuable information about the series revealed until period t Forecasting one period ahead: Forecasting two periods ahead 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

9 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: Calculate Mean Square Error: Calculate Root Mean Square Error: Within the above measures choose the model with lower value

10 Econometric Analysis: Modeling The Dynamics of The VarianceOne 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

11 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

12 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: Then: and What about conditional moments? and That is although unconditional variance is constant – Unconditional Homoskedasticity, conditional variance is allowed to vary over time – Conditional Heteroskedasticity

13 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 approximates current volatility approximate past volatilities ( p periods back) α,β1,β2,…βp are positive Σβi<1

14 Econometric Analysis Bollerslev (1986) proposed the Generalized AutoRegressive Conditional Heteroskedasticity models of order p,q - GARCH(p,q) 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 MA(p) TERMS AR(q) TERMS

15 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

16 Econometric Analysis How to estimate a GARCH model in gretlMethod 1: Using gretl’s UI – Go Model – Time Series – GARCH Variants (or GARCH if you want to run the standard GARCH model)

17 Econometric Analysis How to estimate a GARCH(p,q) model in gretlMethod 1: Using gretl’s UI AR lags allows to correct for serial autocorrelation Mean regressors allow you to include additional explanatory variables

18 Econometric Analysis How to estimate a GARCH model in gretlMethod 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 =𝜔+𝑏𝑒𝑡𝑎 𝜎 𝑡−1 2 +𝑎𝑙𝑝ℎ𝑎 𝜎 𝑡−1 2 + 𝑒 𝑡

19 Econometric Analysis How to estimate a GARCH model in gretlOnce 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

20 Econometric Analysis How to estimate a GARCH model in gretlStep 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

21 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

22 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

23 Econometric Analysis What if Dynamic Models are not suitable for modeling the non – spherical disturbances Correcting Heteroskedasticity Consider the model: In the White Heteroskedasticity Test, we check if the dynamics of volatility are caused by the explanatory variables and a function of them If we reject the null of homoskedasticity then by investigating the t-statistics we can infer which factor causes heteroskedasticity, e.g. therefore we conclude that heteroskedasticity is of the form var(ut)=σ2 We transform our initial model by deviating our model with In the new transformed model, the new error term is homoscedastic since

24 “saveModel”<- ols y const x zEconometric 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 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

25 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

26 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

27 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

28 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

29 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

30 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.

31 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

32 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

33 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