Data handling.

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Data handling.

Postby lelos » Mon Feb 29, 2016 7:53 pm

Dear Professor Pfeifer,

I am new in DSGE models and Dynare. I am trying to estimate a DSGE model and I need to make sure that I am transforming my data correctly. I have read your paper (very useful !!) but I would like to share my doubts. The (quarterly) observed data I use is: Output growth, Labour productivity growth, GDP deflator Inflation, CPI Inflation, Wage Inflation, Nominal interest rate, and Nominal currency depreciation. Time-series are seasonally adjusted. Also I am entering my model in log-linear form – model (linear).

All growth rates (and inflation rates) (for consistency purposes with respect to the model) are quarterly non-annualised, and computed as the first difference of their respective values, i.e. output growth = output(t) - output(t-1) and Inflation rates = Price(t) – Price(t-1). I have matched these computations with my model using the above observation equations. I also assume zero inflation, growth and depreciation at the steady state. So please lets talk about detrending and demeaning issues.

1. Output growth: I take the logs of real GDP, then I take the first difference. As far as I know, taking first difference detrends the data, right ?? So there is no need to apply the one-side HP filter as well, right?? Also since I assume zero growth at steady state , I have to demean the growth rate, right ??

2. Inflation: I take the first difference of the logs of the prices. Again I just only need to demean the Inflation series, right ???

Using the Uncovered Interest Parity in the obs equations I relate the interest rates with the currency depreciation.

3. Interest rates: ir_obs = log(1+ir_data/400) – the mean [ log(1+ir_data/400) ]

4. Nominal currency depreciation: log(s)-log(s-1) and then only demean it.

Could you please correct me Professor ??
Much appreciated.
lelos
 
Posts: 35
Joined: Thu Feb 18, 2016 11:15 am

Re: Data handling.

Postby jpfeifer » Wed Mar 02, 2016 1:52 pm

1. Yes, you must not HP-filter the growth rates
2. Yes, you need to demean the quarterly price growth if you assume a 0 inflation steady state.
3. That looks correct if ir_data is an annualized net interest rate measured in percentage points while ir_obs is a quarterly net interest rate
4. If the exchange rate definition is consistent, this is also correct
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Data handling.

Postby lelos » Thu Mar 03, 2016 10:39 pm

I see. Can I ask a question regarding your paper's Remark 10 (Scaling With a Factor 100) ?? Probably I didnt 100% understand it.

For example,In a log-lin model I want to use the inv Gamma distribution with prior mean of 0.5% for a shock's std deviation.

1. If my data are scaled x100 then I should : inv_gamma_pdf, 0.5, inf; but if are not scaled then : inv_gamma_pdf, 0.005, inf; ???
2. Same changes must be made for the parameter's priors as well or only for the shocks' std deviations?
3. If all my data are scaled x100 (so I bring them in percent), I should leave the Federal fund rate as it is (in percent) right? I should not multiply it with 100 since its already in percent, correct? So only divide them by 4 in order to bring it in quarterly non-annualize form. I also see that in Smets and Wouter (2007) and Del Negro and Schorfheide (2012).

Much appreciated
lelos
 
Posts: 35
Joined: Thu Feb 18, 2016 11:15 am

Re: Data handling.

Postby lelos » Fri Mar 04, 2016 11:51 am

Oh, and something more general. If I decide not to scale my data x100 due to comparability (of the forecasts) with some BVAR models (which are not scaled) , is it wrong?? Is it necessary for a DSGE to be scaled x100 ???

Much appreciated
lelos
 
Posts: 35
Joined: Thu Feb 18, 2016 11:15 am

Re: Data handling.

Postby jpfeifer » Fri Mar 04, 2016 3:11 pm

If you are unsure, do not multiply by 100. That is the safest way.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Data handling.

Postby lelos » Fri Mar 04, 2016 7:21 pm

I see. Professor, could you please answer my question about the priors before the last one??

Much appreciated
lelos
 
Posts: 35
Joined: Thu Feb 18, 2016 11:15 am

Re: Data handling.

Postby jpfeifer » Sat Mar 05, 2016 6:10 am

1) Use
Code: Select all
inv_gamma_pdf, 0.005, inf;
for the priors of the standard deviations if
inv Gamma distribution with prior mean of 0.5%

is desired
2) This is only done for the standard deviations as they are the ones that are affected by the scaling
3) That depends on the exact observation equation used (e.g. net vs. gross etc.)
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Data handling.

Postby lelos » Sat Mar 05, 2016 11:55 am

Professor, sorry about it but perhaps I miss something.

1.
1) Use
CODE: SELECT ALL
inv_gamma_pdf, 0.005, inf;
for the priors of the standard deviations if inv Gamma distribution with prior mean of 0.5% is desired


That setting is for scaled data or not? how should I set it if I do not scale them??

2. Also I see some papers that detrend all of their data by taking the log of the first differences except the nominal interest rate (they do not even hp filter them). Can you see any reason behind that ??

Much appreciated
lelos
 
Posts: 35
Joined: Thu Feb 18, 2016 11:15 am

Re: Data handling.

Postby jpfeifer » Sun Mar 06, 2016 6:05 pm

1.) That is for non-scaled data, of course. Mathematically, 0.005 is 0.5%.
2.) Nominal interest rates do not have a (growth) trend that needs to be removed. They are already stationary, obviating the need for additional detrending.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 16 guests