financial accelerator with asset price bubble

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.

financial accelerator with asset price bubble

Postby flaminia2010 » Fri Mar 26, 2010 11:20 am

I everyone,
I am new with dynare and probably my question is silly, but anyone knows how to write the code for the model of BGG with the asset price bubble they describe in "monetary policy and asset price volatiliy"? I found the code for the BGG baseline model here in the forum, but I attach it for you if you want to try to implement it with the "bubble". attached you find also the article I cited.

I have tried for many days to modify it but I couldn't find a solution. could you help me? I am trying to do some exercise with it.

Thanks for your help
Attachments
BGG.mod
(1.92 KiB) Downloaded 150 times
monetary_policyBernanke.pdf
(310.91 KiB) Downloaded 179 times
flaminia2010
 
Posts: 12
Joined: Fri Mar 26, 2010 10:53 am

Re: financial accelerator with asset price bubble

Postby flaminia2010 » Wed May 05, 2010 8:29 pm

Hi,
I have unsuccessfully tried to write the code of the financial accelerator with asset prices bubbles as BG do in the appendix of the paper I attached last time.
I think that one problem of my code could be the equation of net wealth, in fact they write the evolution of the state variable as a function of
(rs -E_t-1(rs))
How can I write in dynare this expression? I changed it in dynare, but I am not sure it is right.
Can someone help me?
Here you can find the code I wrote.
thanks for your help
Attachments
BGGEUflpro.mod
(1.98 KiB) Downloaded 146 times
flaminia2010
 
Posts: 12
Joined: Fri Mar 26, 2010 10:53 am

Re: financial accelerator with asset price bubble

Postby jpfeifer » Fri May 07, 2010 5:04 pm

Hi,
first of all, in the parameter declaration you need to move delta before the computation of b. Otherwise, it is still initialized at 0 at this point, so that
Code: Select all
b= a*(1-delta);

yields a division by 0. This is the reason why b is NaN when the program stops with an error.
Second, you could have seen this problem, if you would have moved the steady command before the check command.
Third, even after correcting the above error, the Blanchard-Kahn conditions are not fulfilled. So there are still problems.

Regarding the problem with the conditional expectation, have a look at http://www.dynare.org/DynareWiki/NewOperators. If I understand it correctly, you need an additional variable AUX_EXPECT_1_1 and the lines
Code: Select all
AUX_EXPECT_1_1 = rU(-1);
nU = Rk*((kn*(rsU - AUX_EXPECT_1_1(-1)) + ((1-tau*Rk)/tau)*yU) + nU(-1));
------------
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: financial accelerator with asset price bubble

Postby flaminia2010 » Sat May 08, 2010 6:24 am

thanks a lot for your help, it worked...almost.
first of all I tried to use the aux variable, but dynare doesn't recognize it. So I used the expextation variable and it worked, but after caclulating the steady state values dynare shows the following message:
??? Error using ==> disp_dr>subst_auxvar
Invalid auxiliary type: AUX_EXPECT_LAG_1_11

Error in ==> disp_dr at 101
str1 = subst_auxvar(k1(klag(k,1)),klag(k,2)-M_.maximum_lag-2);

Error in ==> stoch_simul at 68
disp_dr(oo_.dr,options_.order,var_list);

Error in ==> bgguspro at 252
info = stoch_simul(var_list_);

Error in ==> dynare at 132
evalin('base',fname) ;
What does it means? and why the aux variable doesn't work? I attach here the file I modified.
thanks a lot again
Attachments
BGGUSpro.mod
(2.02 KiB) Downloaded 106 times
flaminia2010
 
Posts: 12
Joined: Fri Mar 26, 2010 10:53 am

Re: financial accelerator with asset price bubble

Postby flaminia2010 » Tue May 25, 2010 8:05 am

Hi,
I implemented the BG model with asset price bubble, it runs and gives me back stable steady state values, but the results are not satisfying at all as it could be easily seen comparing graphs of may model to the BG's (in the file attached in previous post).
Why is that? Where is my mistake now?
thanks for your help
Attachments
BGGUSpro.mod
(2.26 KiB) Downloaded 206 times
flaminia2010
 
Posts: 12
Joined: Fri Mar 26, 2010 10:53 am

Re: financial accelerator with asset price bubble

Postby SébastienVillemot » Mon Jun 07, 2010 3:00 pm

Hi,

Concerning the expectation auxiliary variable, the wiki page that was mentionned above is obsolete and was misleading. This explains the error that you got.

For the right usage of the EXPECTATION operator, see these pages:
http://www.dynare.org/DynareWiki/NewFeatures (in the section dedicated to the EXPECTATION operator)
http://www.dynare.org/manual/ch04s02.html (idem)

Best,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests