lecture_3_-_2014

  • Upload
    rambori

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

  • 8/9/2019 lecture_3_-_2014

    1/26

    Applied Econometrics

    Introduction to Time Series

    Roman Horvth

    Lecture 3

  • 8/9/2019 lecture_3_-_2014

    2/26

    2

    Contents

    StationarityWhat it is and what it is for

    Some basic time series models

    Autoregressive (AR) Moving average (MA)

    Consequences of non-stationarity (spuriousregression)

    Testing for (non)-stationarity Dickey-Fuller test

    Augmented Dickey-Fuller test

  • 8/9/2019 lecture_3_-_2014

    3/26

    3

    Xtis stationary if:the series fluctuates around a constant long runmean

    Xt has finite variance which is not dependent upon timeCovariance between two values of X

    tdepends only on the

    difference apart in time (e.g. covariance between Xtand Xt-1isthe same as for Xt-8and Xt-9)

    E(Xt

    ) = (mean is constant in t)Var(Xt) =

    2 (variance is constant in t)Cov(Xt,Xt+k) = (k) (covariance is constant in t)

    If data not stationary, spurious regression problem

    (Weak) Stationarity

  • 8/9/2019 lecture_3_-_2014

    4/26

    4

    Examples of Times Series Models

    ARautoregressive models Xt= + *Xt-1+ ut is called AR(1) process Xt= + 1*Xt-1+ 2*Xt-2+.+k*Xt-k+ ut is AR(k) process

    MAmoving average models Xt= + ut + 2*ut-1 is called MA(1) process

    Xt= + ut + 2*ut-1+.+k*ut-k .is called MA(k) process

    If you combine AR and MA process, you getARMA process E.g. ARMA (1,1) is Xt= +*Xt-1+ut+ 2ut-1

  • 8/9/2019 lecture_3_-_2014

    5/26

    5

    Is MA and AR process stationary?

    Compute mean, variance and covariance andcheck if it depends on time

    For AR process, you may easily derive that theprocess is stationary if < 1

    For MA (1) process, mean is , variance is ut2

    *(1+2

    2) and covariance cov(Xt, Xt-k) is either 0if k>1 or ut

    2*2 ,so it does not depend on time

    (MA(k) is stationary process)

  • 8/9/2019 lecture_3_-_2014

    6/26

    6

    White noise process:

    Xt = ut ut ~ IID(0, 2)

    Example of Stationary Time Series

    -0.6

    -0.4

    -0.2

    0

    0.2

    0.4

    0.6

  • 8/9/2019 lecture_3_-_2014

    7/26

    7

    Another Example of Stationary Time Series

    Xt= 0.5*Xt-1+ ut ut ~ IID(0, 2)

    Stationary without drift

    -0.6

    -0.4

    -0.2

    0

    0.2

    0.4

    0.6

    0.8

  • 8/9/2019 lecture_3_-_2014

    8/26

    8

    Example of Non-stationary Time Series

    Yt= + *t + ut,wheret is time trend

    Take the expected value E(Yt) = + *t ,clearly the mean depends on time and the series

    is non-stationary

  • 8/9/2019 lecture_3_-_2014

    9/26

    9

    In contrast a non-stationary time series has at leastone of the following characteristics:Does not have a long run mean which the series

    returnsVariance is dependent upon time and goes toinfinity as the sample period approaches infinity

    Correlogram does not die out - long memory

    Non-stationary time series

  • 8/9/2019 lecture_3_-_2014

    10/26

    10

    Example of Non-stationary Time Series

    The level of GDP is not constant; the mean increases over

    time.

    UK GDP Level

    0

    20

    40

    60

    80

    100

    120

    1992Q

    3

    1993Q

    2

    1994Q

    1

    1994Q

    4

    1995Q3

    1996Q2

    1997Q1

    1997Q4

    1998Q3

    1999Q2

    2000Q1

    2000Q4

    2001Q

    3

    2002Q

    2

    2003Q

    1

  • 8/9/2019 lecture_3_-_2014

    11/26

    11

    Non-stationary time seriescorrelogram

    UK GDP (Yt)

    For non-stationary series the Autocorrelation Function (ACF)declines towards zero at a slow rate as kincreases.

    0 1 2 3 4 5 6 7

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1.0

    ACF-Y

  • 8/9/2019 lecture_3_-_2014

    12/26

    12

    Some transformation = first differenece, logarithm, second

    difference ...First difference of UK GDP (Yt = Yt - Yt-1) is stationary:- growth rate is reasonably constant through time- variance is also reasonably constant through time

    Possible solutions of non-stationarity

    0

    0.2

    0.4

    0.6

    0.8

    1

    1.2

    1.4

    1992Q3

    1993Q2

    1994Q1

    1994Q4

    1995Q3

    1996Q2

    1997Q1

    1997Q4

    1998Q3

    1999Q2

    2000Q1

    2000Q4

    2001Q3

    2002Q2

    2003Q1

  • 8/9/2019 lecture_3_-_2014

    13/26

    13

    Stationary time series - correlogram

    UK GDP Growth ( Yt)

    ACF decline towards zero as kincreasesDecline of ACF is rapid for stationary series

    0 1 2 3 4 5 6 7

    -0.75

    -0.50

    -0.25

    0.00

    0.25

    0.50

    0.75

    1.00

    ACF-DY

  • 8/9/2019 lecture_3_-_2014

    14/26

    14

    Non-stationary Time Series Continued

    Random Walk

    Xt= Xt-1+ ut, where ut ~ IID(0, 2)

    Mean is constant in t: E(Xt) = E(Xt-1)

    X1=X0+ u1 (take initial valueX0)X2=X1 + u2= (X0 + u1) + u2

    Xt=X0 + u1+ u2 ++ ut (take expectations)

    E(Xt) = E(X0 + u1+ u2 ++ ut) = E(X0)= constant

    Variance is not constant in t:

    Var(Xt) = Var(X0) + Var(u1) ++ Var(ut)

    = 0+ 2

    ++ 2

    =t 2

  • 8/9/2019 lecture_3_-_2014

    15/26

    15

    Random walk

    0

    0.5

    1

    1.5

    2

    2.5

    Xt

    = Xt-1

    + ut

    ut

    ~ IID(0, 2)

  • 8/9/2019 lecture_3_-_2014

    16/26

    16

    AR(1) process: Xt= + Xt-1 + ut ;(ut ~ IID(0, 2))

    < 1stationary process - process forgetspast

    = 1non-stationary process - process doesnot forget past

    = 0 without drift

    0 with drift

    MA processis always stationary

    Relationship between stationary and non-

    stationary process

  • 8/9/2019 lecture_3_-_2014

    17/26

    17

    Summary on basic time series processes

    AR (k) process

    MA(k) process

    ARMA (p,l) process If you k-th difference the data, then you have

    ARIMA (p,k,l)estimation of ARIMA models

    is a subject of next lecture

  • 8/9/2019 lecture_3_-_2014

    18/26

    18

    Spurious Regression

    (spurious correlation)

    Problem that time-series data usually includes trend

    Result:

    Spurious correlation (variables with similar trends

    are correlated)Spurious regression (independent variable with

    similar trend looks as dependent = strong statisticalrelationship)

    coefficient significant (high adjusted-R2, larget-statistics) ... even if unrelated in economicterms

  • 8/9/2019 lecture_3_-_2014

    19/26

    19

    How to avoid spurious regression:

    3 approaches to non-stationarity

    1. Include a time trendas an independent variable (old-fashioned) yt= c + 1xt+ 2t + ut .....(t = 1,2, ..., T)

    2. 1st differencethe data if variables I(1); 2nd difference ifI(2)

    = converts non-stationary variables into stationaryvariables

    Problems:

    theory often about levels

    detrending loss of information

    3. Cointegration+ ECM

    = Long-run relationship +short-run adjustment

  • 8/9/2019 lecture_3_-_2014

    20/26

    20

    (A) Informal methods:- Plot time series- Correlogram

    (B) Formal methods:

    - Statistical test for stationarity- Dickey-Fuller tests.

    How do we identify non-stationary

    processes?

  • 8/9/2019 lecture_3_-_2014

    21/26

    21

    Informal Procedures to identify non-stationary

    processes(a) Constant mean?

    (b) Constant variance?

    0 50 100 150 200 250 300 350 400 450 500

    -200

    -150

    -100

    -50

    0

    50

    100

    150

    200 var

    0 50 100 150 200 250 300 350 400 450 500

    0

    2

    4

    6

    8

    10

    12

    RW2

    f d d f

  • 8/9/2019 lecture_3_-_2014

    22/26

    22

    Informal Procedures to identify non-stationary

    processes

    Diagnostic testCorrelogram for stationary process (dies outrapidly, series has no memory)

    0 50 100 150 200 250 300 350 400 450 500

    -0.25

    0.00

    0.25

    0.50whitenoise

    0 5 10

    -0.5

    0.0

    0.5

    1.0ACF-whitenoise

    f l d id if i

  • 8/9/2019 lecture_3_-_2014

    23/26

    23

    Informal Procedures to identify non-stationary

    processes

    Diagnostic testCorrelogram for a random walk (does not die out,high autocorrelation for large values of k)

    0 50 100 150 200 250 300 350 400 450 500

    0.0

    2.5

    5.0

    7.5

    10.0

    12.5randomwalk

    0 5 10

    0.25

    0.50

    0.75

    1.00ACF-randomwalk

  • 8/9/2019 lecture_3_-_2014

    24/26

    24

    Dickey-Fuller Test

    Test based on Yt

    = Yt-1

    + ut

    - DF test to determine whether =1

    Yes unit root non-stationary

    No no unit root

    Dynamic model:

    Subtract Yt-1 ...Yt- Yt-1= (-1)Yt-1+ ut

    Reparameterise: Yt= Yt-1+ ut

    where = (-1)

    Test =0 equivalent to test =1

  • 8/9/2019 lecture_3_-_2014

    25/26

    25

    Augmented Dickey-Fuller Test

    Augment dynamic modelYt= Yt-1+ ut:

    1) Constant or drift term (0)

    Yt= 0+ Yt-1+ ut

    2) Time trend (T)

    Yt= 0+ T + Yt-1+ ut

    3) Lagged values of the dependent variable

    Yt= 0+ T + Yt-1+ 1Yt-1+ 2Yt-2+ ... + ut

    Find the right specification, trade-off parsimony vs. whitenoise in residual

  • 8/9/2019 lecture_3_-_2014

    26/26

    26

    Critical values

    DF/ADF use t- and F-statistics but critical values arenot standard

    Problems:

    distributions of these statistics are non-standard special tables of critical values (derived from

    numerical simulations)

    Usual t- and F-tests not valid in presence of unit

    roots