Output Gap with Dynamic HP Filter
Posted: Thu Oct 08, 2015 7:41 am
Dear all,
I am new to Eviews and I am trying to estimate output gap using a "dynamic" HP filter as in this paper http://www.bis.org/publ/work442.htm
The signal equation is Y(t) = Y*(t) + β( Y(t-1) - Y*(t-1) ) +ε(1,t)
The state equation is: ∆Y*(t+1) = ∆Y*(t)+ ε(0,t+1)
In a standard HP filter we set the relative weight (λ) of the variance of ε(1,t) to that of ε(0,t+1) equal to 1600 (for quarterly frequency). In this paper, in order to account for the fact that Y* depends also on β and to avoid small sample problems, they iterate over different values of λ until:
VAR[Y(t) - Y*(hp, t)] / VAR[∆Y*(hp, t) - ∆Y*(hp, t-1)] = VAR[Y(t) - Y*(alt, t)] / VAR[∆Y*(alt, t) - ∆Y*(alt, t-1)]
where Y*(hp, t) is the potential output estimated from the standard HP filter and Y*(alt, t) is potential output estimated using the equations above.
I have 2 problems implementing this methodology:
1) My code is not being able to impose the state equation at t+1 (although, given the constraint and some other writings in the paper, it might be a typo and they actually use a standard [∆Y*(t) = ∆Y*(t-1)+ ε(0,t)]
2) I don't know how to specify the constraint for λ.
Below is what I have written so far using the standard constraint of λ=1600, but it is not working as the state equation is not accepted.
Any hint for solving problem 1 and especially 2?
Many thanks,
gip
I am new to Eviews and I am trying to estimate output gap using a "dynamic" HP filter as in this paper http://www.bis.org/publ/work442.htm
The signal equation is Y(t) = Y*(t) + β( Y(t-1) - Y*(t-1) ) +ε(1,t)
The state equation is: ∆Y*(t+1) = ∆Y*(t)+ ε(0,t+1)
In a standard HP filter we set the relative weight (λ) of the variance of ε(1,t) to that of ε(0,t+1) equal to 1600 (for quarterly frequency). In this paper, in order to account for the fact that Y* depends also on β and to avoid small sample problems, they iterate over different values of λ until:
VAR[Y(t) - Y*(hp, t)] / VAR[∆Y*(hp, t) - ∆Y*(hp, t-1)] = VAR[Y(t) - Y*(alt, t)] / VAR[∆Y*(alt, t) - ∆Y*(alt, t-1)]
where Y*(hp, t) is the potential output estimated from the standard HP filter and Y*(alt, t) is potential output estimated using the equations above.
I have 2 problems implementing this methodology:
1) My code is not being able to impose the state equation at t+1 (although, given the constraint and some other writings in the paper, it might be a typo and they actually use a standard [∆Y*(t) = ∆Y*(t-1)+ ε(0,t)]
2) I don't know how to specify the constraint for λ.
Below is what I have written so far using the standard constraint of λ=1600, but it is not working as the state equation is not accepted.
Code: Select all
@signal y = ystar + c(2)*(y(-1) - ystar1) + [var=1600*exp(c(1))]
@state ystar(1) = ystar + dystar
@state dystar(1) = dystar + [var=exp(c(3))]
@state ystar1 = ystar(-1)Many thanks,
gip