程序代写代做代考 go Economics 430

Economics 430
Lecture 4 Characterizing Cycles Moving Average Models
1

Today’s Class
• Covariance Stationary Time Series • White Noise
• The Lag Operator
• Wold’s Theorem
• Characteristics of the MA(q) Process – Example: MA(1) Process
2

Covariance Stationary Time Series
Data
In R: acf(data)
Data
In R: pacf(data)
Recall that covariance stationary processes have ρ(k) and p(k) that0 as k\infty.
3

White Noise 1 of 3
• White Noise: Time series process with zero mean, constant variance, and no serial correlation.
• Sinceρ(k)=0andp(k)=0fork≥1,thereisno link between past and present observations.
Cannot predict the future.
• Examples: S&P500 returns, interest rates, etc.
4

Example: Autocorrelation Functions of Monthly Returns for Microsoft and the Dow Jones Index
40 30 20 10
0 -10 -20 -30 -40 -50
86 88 90 92 94 96 98 00 02 04
20 10 0 -10 -20 -30
86 88 90 92 94 96 98 00 02 04
Microsoft monthly returns
Dow Jones monthly returns
5

Wold’s Theorem (Part I)
• Q: What’s left after filtering the trend and seasonal components?
• A: Covariance stationary (short memory) residuals! How should we model them?Wold’s Theorem!
• Wold’s Representation Theorem: Let {yt } be any zero-mean covariance-stationary process. Then
and
(Innovations)
where and bo=1.
6

Moving Average Models
• Def: MA(q) = Moving Average process or order q≥0:Yt =μ+θ1 εt-1 +θ2εt-2 +…+θqεt-q,
where
• Examples:
–MA(1): Yt =μ+θ1 εt-1 +εt
– MA(5): Yt = μ +θ1 εt-1 + θ5εt-5+ εt – MA(10): Yt = μ +θ10εt-10+ εt
7

Moving Average Models
For every MA(q) process, we need to address the following 3 questions:
1. WhatdoesatimeseriesofanMAprocess look like?
2. WhatdothecorrespondingACFsandPACFs look like?
3. Whatistheoptimalforecast?
8

Moving Average Models
Example: MA(1) Process
• (1) What does a time series of an MA process look like?
• Consider the following MA(1) process: Yt =μ+θεt-1 +εt
• We can plot this process for μ =2, and different values of θ, e.g., for θ=0.05, θ=0.5, θ=0.95, and θ=2.
• We can show that E(Yt)=0, and σ2(Yt) = (1+θ2)σ2ε
9

5 4 3 2 1 0
θ=0.05
5 4 3 2 1 0
-1
200 225 250 275 300 325 350 375 400
MA(1):Yt =μ+θεt-1 +εt
-1
200 225 250 275 300 325 350 375 400
5 4 3 2 1 0
MA(1) with theta= 0.05
θ=0.95
5 4 3 2 1 0
MA(1) with theta=0.5
θ=2
-1
200 225 250 275 300 325 350 375 400
-1
200 225 250 275 300 325 350 375 400
MA(1) with theta=0.95
MA(1) with theta=2.0
10
θ=0.5

Moving Average Models
Example: MA(1) Process
• (2) What do the corresponding ACFs and PACFs look like?
• ACF:
– (i) We would expect to see only 1 spike different from zero, i.e.,
ρ1≠0, and all others equal to zero (ρk=0, k>1).
– (ii) The magnitude of the spike should be proportional to θ for |θ|<1. – Note: You can show (please fill in the steps) that ρ1 = θ /(1+θ2) – (iii) Given the expression above, the sign of the ACF is the same as the sign of θ. 11 Moving Average Models Example: MA(1) Process • (2) What do the corresponding ACFs and PACFs look like? • PACF: – Note: You can show (please fill in the steps) that the autocovariance of order 1 is given by: γ1 = θσ2ε , and all other orders are equal to 0. – (i) The PACF decreases to zero in an alternating fashion, according to pk >0 (k=odd), and pk<0 (k =even). – (ii) We can also show that p1 = ρ1. 12 Autocorrelation Functions of Simulated MA(1) Processes θ=2 θ = 0.5 θ = 0.05 θ = 0.95 Can you distinguish them? 13 Moving Average Models Example: MA(1) Process • From our previous example, based on the ACFs alone, we could not distinguish the MA(1) process with θ=0.5 from the MA(1) process with θ=2. This property is known as invertibility. • Def: Invertibility An MA(1) process is invertible if |θ| <1. Otherwise, if |θ|≥1, the process is noninvertible. 14 Moving Average Models Example: MA(1) Process • Meaning of Invertibility: You can transform the MA(1) process to an ‘autoregressive’ function of its own past (lagged values), such that the recent past has more weight than the distant past. • Example: Yt = μ +θεt-1 + εt = μ + (1-(-θ)L) εt • Solveforεt 15 Moving Average Models Example: MA(1) Process • Since |θ|<1, we can perform a Taylor series expansion of the denominator: • Therefore, we can re-express as:  = Autoregressive Process 16 Moving Average Models Example: MA(1) Process • If an MA process is invertible, you can always find an Autoregressive representation. • To predict the future, we need the information contained in the past. • As noted earlier, the recent past has more weight than the distant past since: 17 Moving Average Models Example: MA(1) Process • Q: What can we conclude for the case when |θ|≥1? • A: We cannot perform the Taylor series expansion on θ but we can on 1/θ. • Since θ>1, consider expanding 1/(1-θL) as follows:
Infinite lag polynomial
18

Moving Average Models
Example: MA(1) Process
• Def: Forward Operator (F) = 1/L, where
FYt = Yt+1  F(L(Yt )) = F(Yt-1) = Yt. The forward operator is inverse of the lag operator. It delivers the process at a future date.
Autoregressive representation of a noninvertible MA(1) process.
19
The present is a function of the future.

Moving Average Models
Example: MA(1) Process
• If an MA process is invertible, you can always find an Autoregressive representation.
• To predict the future, we need the information contained in the past.
• As noted earlier, the recent past has more weight than the distant past since:
20

Moving Average Models
Example: MA(1) Process
• What is the practical use of all this?
What process would you suggest?
 MA(1)
21

Moving Average Models
Forecasting in an MA(1) Process
• Consider first the 1-step-ahead forecast, h = 1: MA(1): Yt = μ +θεt-1 + εtYt+1 = μ +θεt + εt+1
• Optimal Point Forecast: ft,1 = E(Yt+1|It) = μ +θεt
– Note: We can write εt in terms of lags of Yt
• One-period-ahead Forecast Error: et,1 = Yt+1 – ft,1= εt+1
• Uncertainty of the Forecast: σ2t+1|t = var(Yt+1|It) = σ2ε
• Density Forecast: f(Yt+1|It) ~ N(μ +θεt , σ2ε )
– Note: We can compute the confidence intervals from the density
forecast.
Please go over the steps for h=1 and h=2 (Section 6.2a)
22

Moving Average Models
Forecasting in an MA(1) Process
• Consider first the k-step-ahead forecast, h = k: MA(1): Yt = μ +θεt-1 + εtYt+1 = μ +θεt + εt+1
• Optimal Point Forecast: ft,k = E(Yt+k|It) = μ
• k-period-ahead Forecast Error: et,k = Yt+k – ft,k= εt+k+θεt+k-1
• Uncertainty of the Forecast: σ2t+k|t = σ2ε(1+θ2) = σ2Y
• Density Forecast: f(Yt+k|It) ~ N(μ, σ2Y )
23

Moving Average Models
Example: MA(1) Process
• Forecasting the 5-year Constant Maturity Yield
Model: Yt = μ +θεt-1 + εt
Estimated Model: Yt = 0.160 +0.485εt + εt where and
24

Estimation Output: 5-Year Treasury Yield (Monthly Percentage Changes)
25

December 2007-April 2008 Forecasts of 5-year Treasure Yield Changes
26

Moving Average Models
Example: MA(1) Process
16 12 8 4 0 -4 -8 -12
forecasting sample
estimation sample
multistep forecast
-16
2007M01 2007M04 2007M07 2007M10 2008M01 2008M04
Actual data (5-year Treasure rate changes) Forecast
Lower bound, 95% confidence interval Upper bound, 95% confidence interval
27

Moving Average Models
Example: MA(2) Process
Yt =2−εt−1 +0.25εt−2 +εt
55 44 33 22 11 00
-1 -1
200 225 250 275 300 325 350 375 400 200 225 250 275 300 325 350 375 400
(a) (b)
MA(2) with theta_1=1.70 and theta_2=0.72
MA(2) with theta_1=-1 and theta_2=0.25
28

Yt =2+1.7εt−1 +0.72εt−2 +εt
Both ACFs show 2 spikes only
 MA(2)
Yt =2−εt−1 +0.25εt−2 +εt
29

28 27 26 25 24 23 22 21 20 1
Moving Average Models
Example: MA(?) Process
MICROSOFT daily stock prices Jan.8, 2003-April 13, 2005
Jun/03 Mar/04
Stock Price (close)
30
Dec/04 570 20-day moving average

8 4 0
-4 -8
8 4 0
-4
-8
Daily returns (3-day moving average smoothed price)
Moving Average Models
Example: MA(?) Process Daily Returns to Microsoft
100 200
Daily returns (close price)
500
300 400
100 200 300 400 500
3-day MA is less volatile
31

Moving Average Models
Example: MA(2) Process Returns
3-day MA
Looks like white-noise
Looks like an MA(2) process 32

Moving Average Models
Example: MA(q) Process
What type of a process is this?
MA(4) Process
33
In general, for any MA(q) process, ρk = 0 for any k>q.