This preview shows page 1. Sign up to view the full content.
Unformatted text preview: MIT OpenCourseWare http://ocw.mit.edu 14.384 Time Series Analysis
Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Filtering 14.384 Time Series Analysis, Fall 2007 Recitation by Paul Schrimpf Supplementary to lectures given by Anna Mikusheva September 21, 2007 1 Recitation 3 Filtering
In lecture 4, we introduced filtering. Here we'll spend a bit more time deriving some common filters and showing how to use them. Recall that an ideal bandpass filter has 1 [l , h ] B (ei ) = 0 otherwise and can be written as B (e ) = where j i  j eij 1 = eij d 2 [l ,h ] 1 ij = e d + eij d 2 l ,h h ,l i j 1 = e h  eil j + eil j  eih j 2ij sin(jh )sin(jl ) j = 0 = h l j j=0 BaxterKing
Baxter and King (1999) proposed approximating the ideal filter with one of order J by solving 1 min B(ei  B (ei )2 d B() 2  s.t. B(1) = BaxterKing 2 where the constraint may or may not be present. We might want to impose B(1) = 0 so that the filtered series is stationary, or if we're constructing a lowpass filter, we might want B(1) = B(ei0 ) = 1 to preserve the lowest frequency movements. The Lagrangian is 1 B (ei  L= bj eij B (ei  bj eij d + ( bj  ) 2 
jJ jJ jJ The first order conditions are 1 1 B (ei  [bk ] : 0 = bj eij eik d + eik B (ei  bj eij d + 2  2  jJ jJ : 0 = j  jJ Using the fact that conditions for bj are 1 2 ei(jk) =  1 j=k and 0 j=k 2 1 2  B ()eij = j , the first order bj = j + Using the constraint to solve for gives: = j + jJ 2J + 1 2 j = To summarize: the Baxter King filter of order J on [l , h ] constrained to have B(0) = is given by bj =j + 2  2J + 1 jJ where j = sin(jh )sin(jl ) j h l = 1  j 2J + 1
jJ j = 0 j=0 ChristianoFitzgerald 3 ChristianoFitzgerald
Christiano and Fitzgerald (1999) propose a generalization of the BaxterKing filter. The advocate choosing a finite approximation to the ideal filter by solving min E[(Bt (L)xt  B (L)xt )2 ]
Bt () where xt is some chosen process. Bt (L) is allowed to use all data available in your sample of length T . Note that Bt (L) will generally not be symmetric and will change with t. As shown in problem set 1, this is equivalent to solving, 1 min Bt (ei )  B (ei )2 Sx ()d Bt () 2  where Sx () is the spectrum of xt . The BaxterKing filter can be considered a special case of this approach where xt is white noise, and we restrict Bt () to be timeinvariant and only have bj = 0 for j J. Christiano and Fitzgerald argue that having xt a random walk works well for macro timeseries. HodrickPrescott
Recall that the HodrickPrescott filter solves: min{ (t  xt )2 + (t+1  2t + t1 )2 }
t For 1 < t < T  1, the first order conditions are: 0 = 2(t  xt ) + 2(  2(t+1  2t + t1 )+ + t  2t1 + t2 + + t+2  2t+1 + t ) 0 =  xt + t2  4t1 + (6 + 1)t  4t+1 + t+2 The first order conditions for t = 0, 1, T  1, T are we have 2 + 1 2 5 + 1 4 = 4 6 + 1 . . . similar. Writing them all in matrix form, 1 0 0 ... 0 0 ... 0 4 ... 0 X .. . We can then form our cycle as ct = xt  t . ...
View
Full
Document
 '09
 Geurrieri

Click to edit the document details