Analytical gradient

Topics: Kalman Filtering, Models
Dec 29, 2014 at 5:00 PM
Hello,

Is there any (short- or long-term) plan to include the analytical gradient to be used in the estimation of DSGE models, as in Iskrev (2010)?

Thanks,
Gabriel
Coordinator
Dec 29, 2014 at 5:59 PM
Hi Gabriel

I played around with analytical gradients a lot in the past, both in time and frequency domains. The idea sounds nice in theory, but in the real world, the likelihood function is really a mess most of the time, and letting the Optimization Tbx cope with the surface of the likelihood works much better in a vast majority of models.

Best,
Jaromir
Marked as answer by jaromirbenes on 12/29/2014 at 10:59 AM
Coordinator
Dec 29, 2014 at 6:06 PM
...a much better strategy is actually to first run estimation based on frequency-domain likelihood (which is much much faster but a less precise approximation for finite samples), and then use the result as starting values for another estimation run based on time-domain likelihood.

J.
Marked as answer by jaromirbenes on 12/29/2014 at 11:06 AM
Dec 29, 2014 at 9:40 PM
Hello Jaromir,

Thanks for your answer. Your experience is very appreciated.

Is it possible to estimate a DSGE based on frequency-domain likelihood within IRIS? Or do we have to provide our own solver via the estimate function?

Thanks,
Gabriel
Dec 29, 2014 at 9:42 PM
Hello Jaromir,

Thanks for your answer. Your experience is very appreciated.

Is it possible to estimate a DSGE based on frequency-domain likelihood within IRIS? Or do we have to provide our own solver via the estimate function?

Thanks,
Gabriel
Coordinator
Dec 29, 2014 at 9:42 PM
There is, of course, freq-domain likelihood in IRIS. I'll write an example for you after holidays. Just remind me in case I forget :)

Dec 30, 2014 at 2:05 AM
Edited Dec 30, 2014 at 2:06 AM
Hello Jaromir,

I tried to compute the likelihood in the frequency domain tonight and this is the piece of code I obtained:
Obj = loglik(mltv,d,starthist:endhist,...
    'objDecomp='    ,true, ...
    'domain='       ,'f', ...
    'outoflik='     ,{'dataC_','dataYH_','dataIK_','dataQH_','dataR_','dataR1_','dataNC_','dataNH_','dataWC_','dataWH_','dataMR_','dataMR1_','dataUKC_','dataUKH_','dataB_','dataQK_'}, ...
    'deviation='    ,false, ...
    'dtrends='      ,true, ...
    'relative='     ,true, ...
    'band=',        [6 40]);
with the parameters in outoflik being of course specific to my model. With a loop being written around this piece of code to solve the model and compute the steady-state, is it something that looks ok?

Best,
Gabriel
Coordinator
Dec 30, 2014 at 12:53 PM
You can actually call the estimate function wit the freq domain option.



Dec 30, 2014 at 1:36 PM
Thanks!

Probably a lot simpler this way.

Happy new year Jaromir, and thanks for your amazing job on IRIS!

Best,
Gabriel