Could you please help me to have a look at the attached estimation figures? Is it wired, especially the orthogonalized shock figures?
estimation.pdf (150 KB)
Oscillations like this typically mean that there is still at timing issue in your model giving rise to complex eigenvalues. Please try to calibrate your model properly before estimation (using “consensus” parameters) and see whether you can fix this.
Dear professor, thanks for your reply and that helps me a lot. I have modified the model and solved the problem. There is the new estimation figure. Could you please help me check the figure and see if there is something weird. And I got several new questions:
1.Why many variables don’t come back to the steady state of 0.
2.I have seen your article “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”, and adjusted the data according to the article, but I still want to confirm if I use the right method.
a. Output: actually in my model(which is a model without a specified trend), I use two variables about output, total economic output and the output of the real estate sector. Firstly, I get the real output per capita, and then the data is seasonally adjusted(named y), taken the logarithm(named lny) and HP filtered(named hptrend_lny), so I use the difference between lny and hptrend_lny as the observation variables, named y_ob .
b. Inflation and interest rate: in the model, I use the gross inflation. Firstly, I get the gross inflation with the equation CPI(t)/CPI(t-1) , and then the data is seasonally adjusted(named pi),HP filtered(named hptrend_pi), so I use the difference between lnpi-ln(hptrend_pi) as pi_ob. As for the interest rate, I choose the 7-day inter-bank offered rate and use the same method to adjust the data. I find the mean of r_ob is not 0, but -0.03, so do I have to demean it and does the demeaned data suit the original taylor rule equation?
c. House price and land price: Actually, I think that the difference between the methods above is the order of taking logarithm and getting filtered. The article says that taking logs makes the resulting series scale invariant, which is important with exponentially growing variables. So I’m confused about how to deal with the data of house price, is it the same with inflation?
Actually, I have seen that “Never use an HP filter for detrending data for estimating a DSGE model” in your paper and the forum, and take the filter by one-side HP filter, but I didn’t find out how to set the “one-side” in the EViews7.0 or 8.0 or 9.0. Could you please tell me how to run a one-side HP filter in EViews or Matlab?
3. In addition, I’m still confused about the form of the taylor rule. I use the equation R(t)=r_RR(t-1)+(1-r_R)(r_pipi(t-1)+r_y(y(t-1)-y)) as the taylor rule. And in the linear model, the linear form of the taylor rule becomes RR_hat=r_RRR_hat(-1)+)+(1-r_R)(r_pipipi_hat(-1)+r_yyy_hat(-1)), where R, pi, y are the steady state of interest rate , gross inflation and output. I use R=1/beta and pi=1, but what’s the value of y, should I use the mean of data series y or lny? I’m confused about it because there is much difference between y and lny.
Sorry to bother you with such basic problems and look forward to your reply sincerely.
silvia_estimation.pdf (598 KB)
- Could it be that your model has a unit root and the shocks therefore result in non-stationary dynamics?
- a) Thou shalt not use the two-sided HP filter! More on this later
- b) When you take log of a gross rate, you roughly get the net rate. Thus, your logging is incompatible with your statement that you match them to gross rates in the model. Moreover, these rates are stationary. Usually we do not filter them again.
- c) The house price should be treated like the consumption deflator.
Regarding the one-sided HP-filter: it is now contained in the Dynare unstable version. You can also download the Matlab file here: raw.githubusercontent.com/DynareTeam/dynare/master/matlab/one_sided_hp_filter.m
- The original Taylor rule that you describe is not really a nonlinear one that you would linearize. Rather the one in levels is multiplicative, resulting in the steady state dropping out when linearizing. For that reason, the y should not appear.
Regarding the attachment: the movements in the data for R look too big compared to the ones in pi, suggesting a scaling problem. Moreover, the values for gammapi and gammy seem rather unusual, suggesting a problem with the Taylor rule specification or the data
Professor, I have attempted to use the one-side hp filter, but I find that the first two values of extracted deviations from the extracted trends(ytrend or ycycle) are much smaller than any other values, so can I just use it to calculate the observation variables in the linear model? Or how can I adjusted the function parameters to get a normal result？ In addition, the means of the calculated observation variables are not 0, for example the mean of y_ob is -0.0027, so should I demean it and does the demeaned data suit the linear equation?
Please provide the data to replicate the issue. The problem with the filtered data not being mean 0 can unfortunately happen in short samples.
Professor, here is the data and I just copy several series of observation variables in the excel. The first row is the data of lny and the second row is the trend of lny which is calculated by one-side hp fitler, and the last row is the the deviation from the trend. I use the matlab function that you provided and set the parameters with default values. It can be seen that the fisrt two values in the third row is much smaller than others. So could you please tell me how to deal with it?
one_side_HP_filter.xls (10.9 KB)
There is nothing to deal with here. It simply is what you get when you use a one-sided filter. The filter does not know there is a drop in the series coming later on.