50
1 Econ 240C Lecture Five

1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

  • View
    217

  • Download
    2

Embed Size (px)

Citation preview

Page 1: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

1

Econ 240C

Lecture Five

Page 2: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

2

Page 3: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

3

Page 4: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

4

Page 5: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

5

Outline Box-Jenkins Models Time Series Components Model Autoregressive of order one

Page 6: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

6

Box and Jenkins Analysis The grand design A stationary time series, x(t), is modeled as

the ratio of polynomials in the lag operator times white noise, wn(t)

X(t) = A(z)/B(z) * wn(t) Example 1: A(z)=1=z0, B(z)=1, x(t) =wn(t) Example 2: A(z)=1, B(z) = (1-z), x(t) =rw(t)

Page 7: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

7

ARIMA models cont.

Example 3: A(z) =1, B(z) = (1-bz), x(t) =ARONE(t)

Historically, before Box and Jenkins, time series were modeled as higher order autoregressive processes

Example 4: A(z) = 1, B(z) = (1 –b1z –b2 z2), x(t) =ARTWO(t)

Page 8: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

8

ARIMA models cont.

To estimate higher order models, you have to estimate more parameters, i.e. tease more information out of the data, risking insignificant parameters

Box and Jenkins discovered that by using a ratio of polynomials you could get by with fewer paramemters: x(t) = [(1 + az)/(1-bz)] wn(t)

Page 9: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

9

Part I: Time Series Components Model The conceptual framework for inertial

(mechanical) time series models: Time series (t) = trend + cycle + seasonal +

residual We are familiar with trend models, e.g. Time series = a + b*t + e(t) , i.e. time series = trend + residual

where e(t) is i.i.d. N(0, )

Page 10: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

10

Time Series Components Model We also know how to deal with seasonality.

For example, using quarterly data we could add a dummy zero-one variable, D1 that takes on the value of one if the observation is for the first quarter and zero otherwise. Similarly, we could add dummy variables for second quarter observations and for third quarter observations: Time series = a + b*t + c1*D1 + c2*D2 + c3*D3 +

e(t)

Page 11: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

11

Time Series Components Models So we have: time

series = trend + seasonal + residual But how do we model cycles? Since macroeconomic variables are likely to

be affected by economic conditions and the business cycle, this is an important question.

The answer lies in Box-Jenkins or ARIMA models.

Page 12: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

12

Time Series Components Models ARIMA models are about modeling the

residual The simplest time series model is:

time series(t) = white noise(t) some other time series models are of the

form: time series = A(Z)*white noise(t), where A(Z) is a polynomial in Z, a dynamic multiplier for white noise.

For the white noise model, A(Z) = Z0 =1

Page 13: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

13

Time Series Components Models For the random walk, RW(t), RW(t) =

A(Z)*WN(t) where A(Z) = (1+Z+Z2 +Z3 + …)

For the autoregressive process of the first order, ARONE(t), ARONE(t) = A(Z) * WN(t) where A(Z) = (1+b*Z+b2*Z2 +b3*Z3 +…) and -1<b<1 , i.e. b is on the real number line and is less than one in absolute value

Page 14: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

14

Time Series Components Models So ARIMA models have a residual, white

noise, as an input, and transform it with the polynomial in lag, A(Z), to model time series behavior.

One can think of ARIMA models in terms of the time series components model, where the time series, y(t), for quarterly data is modeled as: y(t)=a+b*t+c1*D1+c2*D2 +c3*D3+A(Z)WN(t)

Page 15: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

15

Time Series Components Models But y(t), with a trend component, and a

seasonal component, is evolutionary, i.e. time dependent, on two counts. So first we difference the time series, y(t), to remove trend, and seasonally difference it to remove the seasonal component, making it stationary. Then we can model it as an ARMA model, i.e. an autoregressive- moving average time series.

Page 16: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

16

Time Series Components Models

Symbolically, we difference, , y(t) to remove trend, obtaining y(t)

Then we seasonally difference, S, y(t) to remove the seasonality, obtaining S y(t).

Now we can model this stationary time series, S y(t) as ARMA, e.g.

S y(t) = A(Z)*WN(t)

Page 17: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

17

Time Series Components Models After modeling S y(t) as an ARMA

process, we can recover the model for the original time series, y(t), by undoing the differencing and seasonal differencing.

This is accomplished by summation, i.e. integration, the inverse of differencing. Hence the name autoregressive integrated moving average, or ARIMA, for the model of y(t).

Page 18: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

18

Part II. Behavior of Autoregressive Processes of the

First Order From PowerPoint Lecture Three

Page 19: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

19

Model Three: Autoregressive Time Series of Order One

An analogy to our model of trend plus shock for the logarithm of the Standard Poors is inertia plus shock for an economic time series such as the ratio of inventory to sales for total business

Source: FRED http://research.stlouisfed.org/fred/

Page 20: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

20

Trace of Inventory to Sales, Total Business

1.30

1.35

1.40

1.45

1.50

1.55

1.60

92 93 94 95 96 97 98 99 00 01 02 03

RATIOINVSALE

Ratio of Inventory to Sales, Monthly, 1992:01-2003:01

Page 21: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

21

Behavior of ARONE Processes

So we have a typical trace of an ARONE How about the histogram? How about the correlogram?

Page 22: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

22

Histogram: Ratio of Inventory to Sales, Total Business

0

4

8

12

16

1.35 1.40 1.45 1.50 1.55

Series: RATIOINVSALESample 1992:01 2003:01Observations 133

Mean 1.449925Median 1.450000Maximum 1.560000Minimum 1.350000Std. Dev. 0.047681Skewness 0.027828Kurtosis 2.475353

Jarque-Bera 1.542537Probability 0.462426

Ratio of Inventory to Sales

Page 23: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

Ratio of Inventory to SalesSample: 1992:01 2003:01Included observations: 133

Autocorrelation Partial CorrelationAC PAC Q-Stat Prob

.|*******| .|*******|1 0.928 0.928 117.23 0.000 .|*******| .|* | 2 0.886 0.175 224.83 0.000 .|*******| .|* | 3 0.851 0.074 324.86 0.000 .|****** | *|. | 4 0.803 -0.087 414.54 0.000 .|****** | .|. | 5 0.764 0.019 496.51 0.000 .|****** | *|. | 6 0.715 -0.092 568.80 0.000 .|***** | .|. | 7 0.665 -0.048 631.90 0.000 .|***** | *|. | 8 0.611 -0.086 685.61 0.000 .|**** | .|. | 9 0.563 0.001 731.48 0.000 .|**** | .|. | 10 0.513 -0.038 769.87 0.000 .|**** | .|. | 11 0.462 -0.028 801.26 0.000 .|*** | .|. | 12 0.416 -0.006 826.93 0.000

Page 24: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

24

Part III. Characterizing Autoregressive Processes of the

First Order ARONE(t) = b*ARONE(t-1) + WN(t) Lag by one ARONE(t-1) = b*ARONE(t-2) + WN(t-1) Substitute for ARONE(t-1) ARONE(t) = b*[b*ARONE(t-2) + WN(t-1] +

WN(t) ARONE(t) = WN(t) + b*WN(t-1) +b2*ARONE(t-2)

Page 25: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

25

Characterize AR of 1st Order

Keep lagging and substituting to obtain ARONE(t) = WN(t) +b*WN(t-1) +

b2*WN(t-2) + ….. ARONE(t) = [1+b*Z+b2Z2+…] WN(t) ARONE(t) = A(Z)*WN(t)

Page 26: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

26

Characterize AR of 1st Order

ARONE(t) = WN(t) +b*WN(t-1) + b2*WN(t-2) + …..

Note that the mean function of an ARONE process is zero

m(t) = E ARONE(t) = E{WN(t) + b*WN(t-1) + b2*WN(t-2) + …..} where E WN(t) =0, and EWN(t-1) =0 etc.

m(t) = 0

Page 27: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

27

WN(t) and WN(t-1)

WN(t) WN(t-1)WN(1)WN(2) WN(1)WN(3) WN(2)WN(4) WN(3)WN(5) WN(4)WN(6) WN(5)

Page 28: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

28

Autocovariance of ARONE E{[ARONE(t) - EARONE(t)]*[ARONE(t-u)-

EARONE(t-u)]}=E{ARONE(t)*ARONE(t-u)] since EARONE(t) = 0 = EARONE(t-u)

So AR,AR(u) = E{ARONE(t)*ARONE(t-u)}

For u=1, i.e. lag one, AR,AR(1) = E{ARONE(t)*ARONE(t-1)}, and

use ARONE(t) = b*ARONE(t-1) + WN(t) and multiply byARONE(t-1)

Page 29: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

29

Autocovariance of ARONE ARONE(t)*ARONE(t-1) = b*[ARONE(t-1)]2

+ARONE(t-1)*WN(t) and take expectations, E E{ARONE(t)*ARONE(t-1) = b*[ARONE(t-

1)]2 +ARONE(t-1)*WN(t)} where the LHS E{ARONE(t)*ARONE(t-1) is

AR,AR(1) by definition and

b*E *[ARONE(t-1)]2 is b*AR,AR(0) , i.e. b* the variance by definition but how about

Page 30: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

30

Autocovariance of an ARONE

E{ARONE(t-1)*WN(t)} = ? Note that ARONE(t) = WN(t) +b*WN(t-1) +

b2*WN(t-2) + ….. And lagging by one, ARONE(t-1) = WN(t-1)

+b*WN(t-2) + b2*WN(t-3) + ….. So ARONE(t-1) depends on WN(t-1) and earlier

shocks, so that E{ARONE(t-1)*WN(t)} = 0, i.e. ARONE(t-1) is independent of WN(t).

Page 31: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

31

Autocovariance of ARONE In sum, AR,AR(1) = b*AR,AR(0)

or in general for an ARONE, AR,AR(u) = b*AR,AR(u-1) which can be confirmed by taking the formula :

ARONE(t) = b*ARONE(t-1) + WN(t), multiplying by ARONE(t-u) and taking expectations.

Note AR,AR (u) = AR,AR(u) / AR,AR(0)

Page 32: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

32

Autocorrelation of ARONE(t)

So dividing AR,AR(u) = b*AR,AR(u-1) by AR,AR(0) results in

AR,AR (u) = b* AR,AR (u-1), u>0

AR,AR (1) = b* AR,AR (0) = b

AR,AR (2) = b* AR,AR (1) = b*b = b2

etc.

Page 33: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

33

Autocorrelation Function of an Autoregressive Process of the

First OrderLag u Autocorrelation

0 1

1 b

2 b2

3 b3

Page 34: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

Autocorrelation of Autoregressive Time Series of First Order, b=0.9

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 1 2 3 4 5 6 7 8

Lag

Au

toc

orr

ela

tio

n

Page 35: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

35

Part IV. Forecasting-Information Sources

The Conference Board publishes a monthly, Business Cycle Indicators

A monthly series followed in the popular press is the Index of Leading Indicators

Page 36: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

36

Page 37: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

37

Page 38: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

38

Leading Index Components Average Weekly Hours, manufacturing Initial claims For Unemployment Insurance Manufacturers’ New Orders

• Consumer goods

Vendor Performance Building Permits

• new private housing

Manufacturers’ New Orders• nondefense capital goods

Page 39: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

39

Leading Index (Cont.0 Stock Prices

• 500 common stocks

Money Supply M2 Interest Rate Spread

• 10 Treasury bonds - Federal Funds Rate

Index of Consumer Expectations

Page 40: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

40

Article About Leading Indices

http://www.tcb-indicators.org/GeneralInfo/bci4.pdf

BCI Web page: http://www.tcb-indicators.org/

Page 41: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

41

Revised Versus Old Leading Index

Page 42: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

42

Part V: Autoregressive of 1st Order The model for an autoregressive process of

the first order, ARONE(t) is: ARONE(t) = b*ARONE(t-1) + WN(t) or, using the lag operator,

ARONE(t) = b*ZARONE(t) + WN(t), i.e. ARONE(t) - b*ZARONE(t) = WN(t), and factoring out ARONE(t): [1 -b*Z]*ARONE(t) = WN(t)

Page 43: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

43

Autoregressive of 1st Order Dividing by [1 - b*Z], ARONE(t) = {1/[1 - b*Z]}WN(t)

where the reciprocal of [1 - bZ] is: {1/[1 - b*Z]} = (1+b*Z+b2*Z2 +b3*Z3 +…) which can be verified by multiplying [1 - b*Z] by (1+b*Z+b2*Z2 +b3*Z3 +…) to obtain 1.

Page 44: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

44

Autoregressive of the First Order Note that we can write ARONE(t) as

1/[1-b*Z]*WN(t), i.e. ARONE(t) ={1/B(Z)}* WN(t), where B(Z) = [1 - b*Z] is a first order polynomial in Z,

Or, we can write ARONE(t) as ARONE(t) = A(Z) * WN(t) where A(Z) = (1+b*Z+b2*Z2 +b3*Z3 +…) is a polynomial in Z of infinite order.

Page 45: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

45

Autoregresive of the First Order So 1/B(Z) = A(Z). A first order polynomial

in the denominator can approximate an infinite order polynomial in the numerator.

Box and Jenkins achieved parsimony, i.e. the use of only a few parameters which you need to estimate by modeling time series using the ratio of low order polynomials in the numerator and denominator:

ARMA(t) = {A(Z)/B(Z)}* WN(t)

Page 46: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

46

Autoregressive of the First Order For Now we will concentrate on the

denominator: ARONE(t) = {1/B(Z)}*WN(t), where the polynomial in the denominator, B(Z) = [1 - b*Z], captures autoregressive behavior of the first order.

Later, we will turn our attention to the numerator, where A(Z) captures moving average behavior.

Then we will combine A(Z) and B(Z).

Page 47: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

47

Puzzles

Annual data on output per hour; all persons, manufacturing

measure of productivity

Page 48: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

48

Fractional Changes: Productivity

-0.15

-0.10

-0.05

0.00

0.05

0.10

0.15

50 55 60 65 70 75 80 85 90 95 00

DLNPROD

Fractional Changes in Productivity

Page 49: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

49

Histogram

0

5

10

15

20

25

-0.10 -0.05 0.00 0.05 0.10 0.15

Series: DLNPRODSample 1950 2000Observations 51

Mean 0.027297Median 0.032187Maximum 0.142921Minimum -0.099530Std. Dev. 0.040806Skewness -0.691895Kurtosis 6.957785

Jarque-Bera 37.35525Probability 0.000000

Fractional Changes in Productivity

Page 50: 1 Econ 240C Lecture Five. 2 3 4 5 Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one

Date: 04/15/03 Time: 16:59

Sample: 1949 2000Included observations: 51

Autocorrelation Partial CorrelationAC PAC Q-Stat Prob

**| . | **| . | 1 -0.237 -0.237 3.0243 0.082 . | . | .*| . | 2 -0.036 -0.097 3.0953 0.213 .*| . | .*| . | 3 -0.059 -0.098 3.2906 0.349 ***| . | ****| . | 4 -0.402 -0.481 12.605 0.013 . |**** | . |**** | 5 0.588 0.461 32.933 0.000 .*| . | .*| . | 6 -0.187 -0.132 35.033 0.000 . | . | .*| . | 7 -0.041 -0.139 35.136 0.000 . | . | .*| . | 8 -0.017 -0.125 35.155 0.000 **| . | . |** | 9 -0.221 0.205 38.310 0.000 . |*** | .*| . | 10 0.351 -0.107 46.419 0.000 . | . | . |*. | 11 -0.030 0.114 46.480 0.000