Hi All,

I'm thoroughly enjoying all of the recent exchanges. There are clearly some very impressive people on board.

CB,

You have mentioned this notion of tweaking the endpoints of the HP filter to get rid of the end point bias a couple times. I'm not sure why I got so fired up about this issue right now, but I just wanted to check this one with you. Is it as simple as the following?

If the HP filter says:

Price(t) = Trend(t) + Cycle(t)

then for some subset of the Price vector, normally I think we can construct the trend component of price with the following matrix multiplication:

Trend = inv(Identity + lamda * transpose(D) * D) * Price

where one specific D matrix could be written as

1 -2 1 0 0 0 0 0

0 1 -2 1 0 0 0 0

0 0 1 -2 1 0 0 0

0 0 0 1 -2 1 0 0

0 0 0 0 1 -2 1 0

0 0 0 0 0 1 -2 1

By tweaking the end points, do you mean adjusting D to look like the following?

1 -2 1 0 0 0

1 -2 1 0 0 0

0 1 -2 1 0 0

0 0 1 -2 1 0

0 0 0 1 -2 1

0 0 0 1 -2 1

and then carrying out the matrix inversion, etc. This is effectively just changing your definition of the approximate second derivative of price with respect to time for the end points.

So if we normally think of the approximate first & second derivatives as:

P'(t) = d/dt (P(t)) = [P(t + dt) - P(t - dt)] / (2*dt)

P''(t) = d/dt (P'(t)) = [P(t + 2*dt) - 2*P(t) + P(t - 2*dt)] / (2*dt)^2

We would then define the endpoint first derivatives as:

P'(t) = [P(t + dt) - P(t)] / dt

and

P'(t) = [P(t) - P(t - dt)] / dt

and compute the second derivatives from these to get the structure of the second D matrix above.

Is it really this straight forward, or are you thinking of something more sophisticated?

Thanks,

Ngawang

I'm thoroughly enjoying all of the recent exchanges. There are clearly some very impressive people on board.

CB,

You have mentioned this notion of tweaking the endpoints of the HP filter to get rid of the end point bias a couple times. I'm not sure why I got so fired up about this issue right now, but I just wanted to check this one with you. Is it as simple as the following?

If the HP filter says:

Price(t) = Trend(t) + Cycle(t)

then for some subset of the Price vector, normally I think we can construct the trend component of price with the following matrix multiplication:

Trend = inv(Identity + lamda * transpose(D) * D) * Price

where one specific D matrix could be written as

1 -2 1 0 0 0 0 0

0 1 -2 1 0 0 0 0

0 0 1 -2 1 0 0 0

0 0 0 1 -2 1 0 0

0 0 0 0 1 -2 1 0

0 0 0 0 0 1 -2 1

By tweaking the end points, do you mean adjusting D to look like the following?

1 -2 1 0 0 0

1 -2 1 0 0 0

0 1 -2 1 0 0

0 0 1 -2 1 0

0 0 0 1 -2 1

0 0 0 1 -2 1

and then carrying out the matrix inversion, etc. This is effectively just changing your definition of the approximate second derivative of price with respect to time for the end points.

So if we normally think of the approximate first & second derivatives as:

P'(t) = d/dt (P(t)) = [P(t + dt) - P(t - dt)] / (2*dt)

P''(t) = d/dt (P'(t)) = [P(t + 2*dt) - 2*P(t) + P(t - 2*dt)] / (2*dt)^2

We would then define the endpoint first derivatives as:

P'(t) = [P(t + dt) - P(t)] / dt

and

P'(t) = [P(t) - P(t - dt)] / dt

and compute the second derivatives from these to get the structure of the second D matrix above.

Is it really this straight forward, or are you thinking of something more sophisticated?

Thanks,

Ngawang