Presentation is loading. Please wait.

Presentation is loading. Please wait.

Financial Econometrics Lecture Notes 2

Similar presentations


Presentation on theme: "Financial Econometrics Lecture Notes 2"— Presentation transcript:

1 Financial Econometrics Lecture Notes 2
University of Piraeus Antypas Antonios

2 Contents Time Series Models Forecasting
Stationarity VS Non Stationarity ARIMA(p,d,q) Models Forecasting In Sample & Out of Sample Modeling The Dynamics of The Variance Conditional Heteroskedasticity Models - GARCH(p,q) Re-specifying our initial model

3 Data Time Series We analyze how a variable of interest evolves over time Example: Collect the historic values of X1,t: “Advertisement Expenditures “ and Yt: “Sales of Product A “ realized by Company “ABC” to examine the success of advertisement campaigns of this company Subscript “t” refers to the value of a variable at date t, e.g. Y2000 refers to the sales that Company “ABC” realized during the year 2000

4 Time Series Analysis Modeling time series Definitions
Exogenous Models: Describe a time series as a function of other time series Time Series Models: Models aiming to describe the dynamics of the series Definitions First Order Stationarity E(yt)=μ is constant Second Order Stationarity ( or weakly stationarity ) var(yt)=σ2 is constant cov(yt,yt+s)=f(s) is a function of the distance “s” Second Order Stationarity Implies First Order Stationarity

5 Series is Second Order Stationary
Time Series Analysis Examples of stationarity Series is Second Order Stationary

6 Time Series Analysis Examples of stationarity
Series is First Order Stationary and not Second Order Stationary (the variance changes at some time)

7 Series is Not Stationary
Time Series Analysis Examples of stationarity Series is Not Stationary

8 Time Series Analysis Stationarity and Empirical Stylized Facts
Prices of an Asset are not Stationary Returns of an Asset are Stationary

9 Time Series Analysis Autoregressive models of order p are used to model time dependence in our series using past realizations First Order Autoregressive Model - AR(1) – is the simplest case We regress Yt on itself (auto regressive), one lag back (first order) gretl command for estimating an AR(1) Model ols Y const Y(-1) or arma 1 0 ; y or arima ; y gretl command for estimating an AR(3) Model ols y const y(-1) y(-2) y(-3) or arma 3 0 ; y or arima ; y arma and arima functions will be explained in more detail later Behavior of Yt depends on the value of ρ

10 Time Series Analysis First Order Autoregressive Model - AR(1)
Example 1: ρ=0 Observe that series is mean-reverting fast - Independent

11 Time Series Analysis First Order Autoregressive Model - AR(1)
Example 2: ρ=0.9 – Observe stochastic cycles: Slow Mean Reversion - Dependent

12 Time Series Analysis First Order Autoregressive Model - AR(1)
Properties Case 1: |ρ|<1 – Series is stationary Mean is Constant Variance is Constant Covariance is a function of i. As i increases, since |ρ|<1, covariance (therefore correlation )will be decreasing

13 gretl output (right click series and select Correlogram)
Time Series Analysis First Order Autoregressive Model - AR(1) Properties Case 1: |ρ|<1 – Series is stationary If ρ is positive, autocorrelation will decrease monotically. (why?). Therefore, if we assume that a series can be modeled through an AR(1) model, with a positive ρ, the autocorrelation function should look like here gretl output (right click series and select Correlogram)

14 gretl output (right click series and select Correlogram)
Time Series Analysis First Order Autoregressive Model - AR(1) Properties Case 1: |ρ|<1 – Series is stationary If ρ is negative, autocorrelation will decrease non-monotically (why?). Therefore, if we assume that a series can be modeled through an AR(1) model, with a negative ρ, the autocorrelation function should look like here gretl output (right click series and select Correlogram)

15 Econometric Analysis Time Series Analysis
First Order Autoregressive Model - AR(1) Case 2: ρ=1 – Series is not stationary!

16 series name=y-y(-1) or series name=diff(y)
Time Series Analysis First Order Autoregressive Model - AR(1) Case 1: ρ=1 – Series is not stationary! In this case we say that our series has (at least) one unit root. We also say that our series contains stochastic trend If this is the case we can transform our non-stationary series into stationary by taking the first differences, that is creating a new series as: gretl Command for Creating this new series: series name=y-y(-1) or series name=diff(y) As noted before, prices of assets are non-stationary. If we take first differences of prices, we generate a new series which will be stationary. BUT, we prefer taking first differences at the log prices since the generated stationary series will represent the returns of the asset.

17 Time Series Analysis First Order Autoregressive Model - AR(1)
Case 1: ρ=1 – Series is not stationary! It is possible that our series is non-stationary because it evolves naturally with time, that is it contains deterministic trend. If this is the case, we will model our series including in the explanatory factors the time trend. We need to test the Null Hypothesis of a Unit Root in our series in order to decide for the appropriate method of de-trending our series (Check the following slides)

18 Time Series Analysis Autoregressive Model of order p - AR(p)
We regress Yt on itself (auto regressive), p lags back (p order) Case 1: Σ ρ i < 1 – Series is stationary Case 2: Σ ρ i = 1 – Series has a unit root Analysis of correlation function remains the same

19 Econometric Analysis Time Series Analysis
Testing for a Unit Root = Testing for stationarity in the Mean Popular tests Augmented Dickey - Fuller Test Phillips - Perron Test If we reject the null hypothesis of a unit root then our series is stationary (|ρ|<1) and we can move on modeling If we do not reject the null hypothesis of a unit root, then our series is non-stationary. We take first differences and test the new series for stationarity. We keep taking first differences to the generated series until we reject the null.

20 Econometric Analysis Time Series Analysis
How to perform a Unit Root Test for series yt(example refers to Y1t from dataset2.xlsx) Select series Y1 (click on it) Go Variable -> Unit Root Tests and select the preferred statistic e.g. Augmented Dickey-Fuller Consider the other choices as discussed in class Press OK

21 Econometric Analysis Time Series Analysis
How to perform a Unit Root Test for series yt(example refers to Y1t from dataset2.xlsx) Examine the results of the hypothesis testing Since the Probability is over 0.05 and the Null Hypothesis is Y has a unit root, then we do not reject that our series is non-stationary gretl output

22 Time Series Analysis Testing for a Unit Root = Testing for stationarity in the Mean If we reject the Null Hypothesis, we say that our series is integrated of order 0 and write yt – I(0) If we do not reject the Null Hypothesis, we take the first differences dyt and test the new series for a unit root. If the new series dyt is stationary then we say that our series is integrated of order 1, that is we need to differentiate once to transform our non-stationary series to stationary and write yt – I(1) (also dyt – I(0))

23 Time Series Analysis Moving Average model of order q are used to model time dependence in our series using past values of the error term First Order Moving Average Model - MA(1) – is, as before, the simplest case We regress Yt on the error term one lag back (first order) Behavior of Yt depends on the value of θ

24 Time Series Analysis First Order Moving Average Model - MA(1)
Properties Case 1: |ρ|<1 – Series is stationary Mean is Constant Variance is Constant Only covariance of today (t) with yesterday (t-1) is non-zero.

25 Time Series Analysis First Order Moving Average Model - MA(1)
If we expect that a series can be modeled through an MA(1) model, the autocorrelation function should look like here gretl output

26 Time Series Analysis Moving Average of order q – MA(q)
Analysis of correlation function remains the same How to estimate a MA(1) model in gretl arma 0 1 ; y or arima ; y How to estimate a MA(3) model in gretl arma 0 3 ; y or arima ; y

27 Time Series Analysis We can combine the discussed models into one, creating the Autoregressive Moving Average models of order p and q If we add the information of the order of integration, that is the number of times we have to take first differences in order to result to a stationary series, we define ARIMA (p,d,q) where d is the order of integration, p & q as before Example: If we write that yt –ARIMA(2,1,1) this means that we have to generate dyt=yt-yt-1 and use the following model:

28 Time Series Analysis How to determine the appropriate ARIMA(p,d,q) model to describe a time series Step 1: Perform Unit Root Testing to determine the order of integration (d). If d>=1 then go to step 2, else go to step 3 Step 2: Based on step 1, generate from original (non-stationary) series a new stationary series Step 3: Estimate alternative competitive models and use model selection criteria (Akaike, Hannan Quinn, Swhatch) to select the best model Step 4: Run misspecification test procedures to make sure no dependency is left out of the models

29 Time Series Analysis How to estimate a ARMA (p,q) model in gretl
arma p q ; y or arima p 0 q ; y How to estimate a ARIMA (p,d,q) model in gretl arima p d q ; y


Download ppt "Financial Econometrics Lecture Notes 2"

Similar presentations


Ads by Google