ch. 21-22: time series · • difference stationary processes (dsp): if a time series has a unit...

45
1 Ch. 21: Time Series Time series • Stationarity Unit roots Dickey fuller test Cointegration and spurious regressions Testing for cointegration Error Correction Mechanism (ECM)

Upload: others

Post on 01-Feb-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

1

Ch. 21: Time Series

• Time series• Stationarity• Unit roots• Dickey fuller test• Cointegration and spurious regressions• Testing for cointegration• Error Correction Mechanism (ECM)

Page 2: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

2

Example: Table 21.1

• Table 21.1Macroeconomic Data, United States, 1970.1 to 1991.4

GDP = Gross Domestic Product, Billions of 1987 $PDI = Personal Disposable Income, Billions of 1987 $PCE = Personal Consumption Expenditure, Billions of 1987 $PROFITS = Corporate Profits After Tax, Billions of 1987 $DIVIDEND = Net Corporate Dividends Payments, Billions of 1987 $

Page 3: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

3

Time Series• twoway (tsline GDP, lpattern(solid)) (tsline PDI, lpattern(dash)) (tsline PCE, lpattern(dot))

2000

3000

4000

5000

1970q1 1975q1 1980q1 1985q1 1990q1t

GDP PDIPCE

Page 4: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

4

Stationary Stochastic Processes• Stochastic Random Process• Realization• A Stochastic process is said to be stationary if its mean

and variance are constant over time and the value of covariance between two time periods depends only on the distance or lag between the two time periods and not on the actual time at which the covariance is computed

• Most time series are non-stationary. Mean, variance and autocovariance change over time

Page 5: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

5

Stationary Stochastic Processes

• Most time series are non-stationary. Mean, variance and autocovariance change over time

)])([(:var)()var(:var

)(:

:if stationaryisYt process stochastic The

22

μμγσμ

μ

−−==−=

=

+kttk

tt

t

YYEianceCoYEYiance

tallforYEMean

Page 6: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

6

Nonstationary Stochastic Processes

• A common form of non-stationarity is “random walk model” (RWM)

• Pure random walk, Yt=Yt-1+ut

• Random walk with drift, Yt=b1+Yt-1+ut

• random walk with drift and deterministic trend, Yt=b1+b2t+Yt-1+ut

• All three processes are non-stationary but can be converted to stationary

Page 7: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

7

Nonstationary Stochastic Processes• In RWM without drift, value of Y at time 't' is equal to its value

in previous time period (t-1) plus a random shock (ut) which is white noise. Yt=Yt-1+ut

• Stock prices, exchange rates etc are those that follow this process. Therefore impossible to predict

• Y1=Y0+u1• Y2=Y1+u2=Y0+u1+u2• Y3=Y2+u3=Y0+u1+u2+u3• RWM without drift is therefore non-stationary• Feature: RWM is said to have infinite memory because of

persistence of random shocks• First difference operator converts RWM without drift to

stationary series

Page 8: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

8

Test of Stationarity• Graphical method: plot gives an initial clue about the

nature of the time series• Autocorrelation function

– Covariance at lag k/variance– Consider lag up to one-third of times series length– Near zero ACF for all lags indicates stationarity– Box Pierce Q statistic tests joint hypothesis that AC for all lag is

simultaneously=0– Ljung-Box statistic is a variant with better small sample

properties• Unit root test

Page 9: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

9

Correlogram

( )( )

( )

mcorrelogra sample theisation autocorrel sample theofplot Theˆˆ

ˆ

ˆ

ˆ

function.ation autocorrel sample thecomputecan Wemcorrelogra polulation thegives thisofGraph

varianceklagatCovariance

(ACF)Function ation Autocorrel

0k

2

0

k

0k

γγ

ρ

γ

γ

γγ

ρ

k

t

ktt

k

nYY

nYYYY

=

−=

−−=

==

∑ +

Page 10: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

10

Example• ac GDP, lags(25)

-1.0

0-0

.50

0.00

0.50

1.00

Aut

ocor

rela

tions

of G

DP

0 5 10 15 20 25Lag

Bartlett's formula for MA(q) 95% confidence bands

Page 11: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

11

Q and Ljung-Box statistic

2m

1k

2k

2m

1k

2k

2)n(nLB

StatisticBox -Ljung

~ˆnQ

statistic-Q Pierce &Box

usecan wezero, toequalusly simultaneotscoefficienation autocorrel theall test To

m

m

knχρ

χρ

=

=

⎟⎟⎠

⎞⎜⎜⎝

⎛−

+=

=

Page 12: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

12

Unit Root Test

.0testWe)1(

modeltheestimatesone,Frequentlywalk.randomaisseriesTheproblem.rootunit

ahavewe1,fromdifferenttestnotdoesandY ,regression run the weIf

situation.arity nonstationA problem.root unit thehave we1, is Y oft coefficien fact thein

noisewhiteis

modeltheConsider

11

1t

1-t

1

=+=+−=Δ

+=

+=

−−

δδρ

ρρ

ttttt

tt

t

ttt

uYuYY

uY

Ifu

uYY

Page 13: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

13

Unit Root Test

• If a time series is differenced once and the differenced series is stationary, we say that the original (random walk) is integrated of order 1, and is denoted I(1).

• If the original series has to be differenced twice before it is stationary, we say it is integrated of order 2, I(2).

Page 14: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

14

Unit Root Test

• In testing for a unit root, we can not use the traditional t values for the test.

• We used revised critical values provided by Dickey and Fuller

• We call the test the Dickey-Fuller test for unit roots

Page 15: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

15

Dickey-Fuller (DF) and Augmented DF

(ADF).Test Fuller -Dickey augmented theasknown is This

Y.4

test toDF apply the weated,autocorrel is error term theIf0. test wecaseeach In

Y.3Y.2Y.1

:formthreefor thesetest DF apply the We

1121t

121t

11t

1t

t

m

iitit

tt

tt

tt

YYt

uYtuY

uY

εαδββ

δδββ

δβδ

∑=

−−

+Δ+++=Δ

=+++=Δ

++=Δ+=Δ

Page 16: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

16

Example: DFgen dGDP1 = D.GDPgen GDPlag1 = GDP[_n-1]reg dGDP1 GDPlag1, noconstant

Source | SS df MS Number of obs = 87-------------+------------------------------ F( 1, 86) = 33.62

Model | 44069.5473 1 44069.5473 Prob > F = 0.0000Residual | 112737.658 86 1310.903 R-squared = 0.2810

-------------+------------------------------ Adj R-squared = 0.2727Total | 156807.205 87 1802.38167 Root MSE = 36.206

------------------------------------------------------------------------------dGDP1 | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------GDPlag1 | .0057654 .0009944 5.80 0.000 .0037887 .0077421

------------------------------------------------------------------------------

Page 17: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

17

Example: DFreg dGDP1 GDPlag1

Source | SS df MS Number of obs = 87-------------+------------------------------ F( 1, 85) = 0.05

Model | 62.7187609 1 62.7187609 Prob > F = 0.8270Residual | 110987.902 85 1305.74002 R-squared = 0.0006

-------------+------------------------------ Adj R-squared = -0.0112Total | 111050.621 86 1291.28629 Root MSE = 36.135

------------------------------------------------------------------------------dGDP1 | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------GDPlag1 | -.0013679 .0062415 -0.22 0.827 -.0137777 .0110419

_cons | 28.20542 24.36532 1.16 0.250 -20.23937 76.6502------------------------------------------------------------------------------

Page 18: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

18

Example: DFreg dGDP1 t GDPlag1

Source | SS df MS Number of obs = 87-------------+------------------------------ F( 2, 84) = 1.32

Model | 3388.93239 2 1694.4662 Prob > F = 0.2721Residual | 107661.688 84 1281.68677 R-squared = 0.0305

-------------+------------------------------ Adj R-squared = 0.0074Total | 111050.621 86 1291.28629 Root MSE = 35.801

------------------------------------------------------------------------------dGDP1 | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------t | 1.477641 .9172438 1.61 0.111 -.346399 3.301681

GDPlag1 | -.0603169 .0371113 -1.63 0.108 -.1341169 .0134831_cons | 131.278 68.3846 1.92 0.058 -4.712261 267.2683

------------------------------------------------------------------------------

Page 19: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

19

Example: ADFdfuller GDP, trend lags(1)

Augmented Dickey-Fuller test for unit root Number of obs = 86

---------- Interpolated Dickey-Fuller ---------Test 1% Critical 5% Critical 10% Critical

Statistic Value Value Value------------------------------------------------------------------------------Z(t) -2.215 -4.071 -3.464 -3.158

------------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.4813

Page 20: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

20

Transforming Nonstationary Time Series

• We have to transform nonstationary time series to make them stationary• Many macroeconomic variables are non stationary• Difference Stationary Processes (DSP): if a time series has a unit root, the first

differences are stationary• A data series is DSP if data is generated by model:

TSPrather DSP are series timemicmacroeconoMost noise whitebemust )(ˆ

:if Process Stationary trenda be willmodel Thestochasticnot and ticdeterminis is variable trend theif

onlylegit is This regress. the toy variableexplanatoran ast add wedata,in trendof problem remove to:(TSP) process Stationary Trend

10t tYu t ββ −−=

0 ifdrift positiveroot with unit a has model This1

>+=− −

αα ttt uYY

Page 21: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

21

Cointegration• The linear combination of I(1) variables may produce a

spurious regression• However if there is a long-run relationship, errors have

tendency to disappear and return to zero i.e. are I(0).

• If there exists a relationship between two non stationary I(1) series, Y and X , such that the residuals of the regression

• are stationary, then the variables in question are said to be cointegrated

• There is a long term or equilibrium relationship between them

ttt uXY +β+β= 10

Page 22: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

22

Cointegration

• We need to check the residuals from our regression to see if they are I(0).

• If the residuals are I(0) or stationary, the traditional regression methodology (including t and f tests) that we have learned so far is applicable to data involving time series

Page 23: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

23

Cointegration

tests10% and 5% 1%,for 0.322 and 0.386 0.511, are valuesCutoff test.-DW standardfor 2d versus0dbut test

,regressionour for statisticDW get the weCRDW test In theWatson-Durbin Regression ingCointegrat 2.

residuals on theroot test unit ADFor DF apply thecan We1.:like methods Formal B.

residuals of mcorrelograPlot 2.residuals of series Plot time 1.

:like methods Informal A. ion,cointegrat gfor testin methods several are There

==

Page 24: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

24

Example: Cointegrationreg PCE PDI

Source | SS df MS Number of obs = 88-------------+------------------------------ F( 1, 86) =14369.09

Model | 18548225.7 1 18548225.7 Prob > F = 0.0000Residual | 111012.434 86 1290.84225 R-squared = 0.9941

-------------+------------------------------ Adj R-squared = 0.9940Total | 18659238.1 87 214474.002 Root MSE = 35.928

------------------------------------------------------------------------------PCE | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------PDI | .9672499 .0080691 119.87 0.000 .9512091 .9832907

_cons | -171.4412 22.91726 -7.48 0.000 -216.9992 -125.8832------------------------------------------------------------------------------

Page 25: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

25

Example: Cointegrationpredict uhat, residualgen duhat1 = D.uhatgen uhatlag1 = uhat[_n-1]reg duhat1 uhatlag1, noconstant

Source | SS df MS Number of obs = 87-------------+------------------------------ F( 1, 86) = 14.28

Model | 8404.84564 1 8404.84564 Prob > F = 0.0003Residual | 50612.5408 86 588.517916 R-squared = 0.1424

-------------+------------------------------ Adj R-squared = 0.1324Total | 59017.3864 87 678.360764 Root MSE = 24.259

------------------------------------------------------------------------------duhat1 | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------uhatlag1 | -.2753123 .0728518 -3.78 0.000 -.4201369 -.1304876

------------------------------------------------------------------------------• The Engle-Granger 1% critical value is -2.5899. Since computed tau=t value is muct more

negative than this. Our conclusion is that the residulas from the regression are I(0)• 0.9672 represents the long run or equilibrium, marginal propensity to consumer (MPC)

Page 26: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

26

Error Correction Mechanism (ECM)

tttt

ttt

XYXuX

εββαααεααα

+−−+Δ+=++Δ+=Δ

−−

)(ˆY

m.equilibriurun long toadjustmentrun short get to tomodel correctionerror use We

. variablesebetween th iprelationshrun long aexist e then ther,regression ingcointegrat a have weIf

1211210

1210t

Page 27: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

1

DF Critical Values• Critical values for tau=tδModel 1% 5% 10%1) –2,59 –1,94 –1,622) –3,50 –2,89 –2,583) –4,06 –3,46 –3,15• H0: ρ = 1, i.e. δ = 0 (unit root)• H0 will be rejected if the observed t-value< critical value• Large negative tau value is generally an indication of stationarity

Page 28: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

2

Ch. 22: Time Series

• Approaches to economic forecasting• ARIMA Models• BJ Methodology• Forecasting

Page 29: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

3

Approaches to Economic Forecasting

• Single-equation regression models• Simultaneous-equation regression models.• Autoregressive integrated moving average

(ARIMA) models• Vector autoregressive (VAR) models

Page 30: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

4

Autoregressive (AR) Process

error behaved welland Y of spast value ofonly function is

)Y()Y()Y()(Yas process AR(p)an can write we,

).2()Y()Y()(Y

asrepresent becan process siveautoregresorder -secondA Y ofmean

and WNis ,1)Y()(Y :as(AR(1))processsiveautoregresorder -firstarepresent can We

p-t2-t21-t1t

2-t21-t1t

11-t1t

t

tp

t

tt

Y

ugeneralIn

ARisThisu

uu

+−++−+−=−

+−+−=−

=

<+−=−

δαδαδαδ

δαδαδ

δαδαδ

L

Page 31: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

5

Moving Average (MA) Process

qtqttt

ttt

t

tt

uuuu

uuuu

uuu

−−−

−−

+++++=

+++=

++=

ββββμ

βββ

μββμ

L22110t

22110t

110t

Yas written becan process MA(q) thegeneral,In

Y:Process MA(2)

error term noise whiteis andconstantaisWhereY

as written becan process average movingorder -first The variablerandom stochastic a

of model possibleanother is process average moving The

Page 32: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

6

Autoregressive Moving Average (ARMA) Process

qtqttptptt

tttt

uuuYYY

uuYYARMA

−−−−

−−

+++++++=

+++=

βββααθ

ββαθ

LL 11011

11011

error noise or white edistrubanc theof valueslagged q and Y of valueslagged p

be will thereq)ARMA(p, general aIn

)1,1(

Page 33: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

7

Autoregressive Integrated Moving Average (ARIMA) Process

• To use an ARMA model, the time-series must be stationary

• Many series must be integrated (differenced) to make them stationary

• We write these series as I(d), where d=number of differences needed to get stationarity

• If we model the I(d) series as an ARMA(p,q) model, we get an ARIMA(p,d,q) model, where p=degree of autoregressive model, d=degree of integration and q=degree of moving average term

Page 34: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

8

Box Jenkins (BJ) Methodology

• Identification-find the values of p,d,q for series.

• Estimation-how we estimate parameters of the ARIMA model.

• Diagnostic checking-How well does the model fit the series.

• Forecasting-Good for short-term forecasting

Page 35: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

9

Identification

• Use the autocorrelation function (ACF) and the partial autocorrelation function (PACF)

• Partial autocorrelation function measures correlation between (time-series) observations that are k time periods apart after controlling for correlations at intermediate lags (lags less than k)

Page 36: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

10

Identification

Type of Model Typical Pattern of ACF

Typical Pattern of PACF

AR(p) Decays exponentially or with damped sine wave pattern or both.

Significant spikes through lags p.

MA(q) Significant spikes through lags q.

Declines exponentially.

ARMA(p,q) Exponential Decay. Exponential Decay.

Page 37: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

11

-0.45

-0.4

-0.35

-0.3

-0.25

-0.2

-0.15

-0.1

-0.05

0

0.05

1 2 3 4 5 6 7 8 9 10

Lag

acf a

nd p

acf

acfpacf

MA(1)

Page 38: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

12

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

1 2 3 4 5 6 7 8 9 10

Lags

acf a

nd p

acf

acfpacf

MA(2)

Page 39: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

13

-0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1 2 3 4 5 6 7 8 9 10

Lags

acf a

nd p

acf

acf

pacf

AR(1)

Page 40: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

14

-0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

1 2 3 4 5 6 7 8 9 10

Lags

acf a

nd p

acf

acfpacf

AR(1), +α

Page 41: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

15

-0.6

-0.5

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

1 2 3 4 5 6 7 8 9 10

Lags

acf a

nd p

acf

acfpacf

AR(1), -α

Page 42: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

16

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1 2 3 4 5 6 7 8 9 10

Lags

acf a

nd p

acf

acfpacf

Icke stationär AR(1), α=1

Page 43: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

17

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1 2 3 4 5 6 7 8 9 10

Lags

acf a

nd p

acf

acfpacf

ARMA(1,1)

Page 44: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

18

Estimation

• Identify the p and q• Estimate the parameters of the AR and

MA• It can be done by OLS or nonlinear

estimation methods

Page 45: Ch. 21-22: Time Series · • Difference Stationary Processes (DSP): if a time series has a unit root, the first differences are stationary • A data series is DSP if data is generated

19

Diagnostic Checking

• Check the adequacy of our model• Do a plot of the autocorrelation of

residuals from the model to see that they are white noise

• Run a Ljung-Box and Q test on the residuals to see that they are White noise