from one type to two types of agents

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.

from one type to two types of agents

Postby xuz » Thu Jul 28, 2016 2:24 am

Hi all,

Problems occur when I try to extend the basic NK model from one agent to two agents model. Codes are attached.

It's a basic NK model with positive inflation target. The price rigidity is governed by Calvo, and it's indexed to the target inflation. The only shock is the discount factor shock "e_m". I can run the mod file "NK1" successfully.

However, when I try to extend it to two agents model, it doesn't work.
The two agents model is extended by assuming only a fraction of households will be affected by discount factor shock. Thus in equilibrium both types of agents consume the same and supply the same amount of labor.

The mod file is "NK_type". The warning is "There are 5 eigenvalue(s) larger than 1 in modulus for 6 forward-looking variable(s). The rank condition ISN'T verified!"

Here're some clues:
1. I use "check" and found there's one unit root. The one-agent model doesn't have an unit root. But I cannot find which one variable in the two agents model has an unit root. Moreover, I don't know why there's a unit root.
2. I use "model_diagnostics(M_,options_,oo_);" The result is:
model_diagnostic: the Jacobian of the static model is singular, there is 1 colinear relationships between the variables and the equations
Colinear variables:
L_u
C_u
L_r
C_r
Colinear equations
1 2 19

The presence of a singularity problem typically indicates that there is one
redundant equation entered in the model block, while another non-redundant equation
is missing. The problem often derives from Walras Law."

However, I don't think there's collinearity problem here. And if there is, I don't know which "non-redundant equation" I've omitted.

3. Maybe there're some fundamental problems with the two agents model setup? The equations are wrong? I have found any yet.

Thanks for your help!
Attachments
NK_type.mod
(2.24 KiB) Downloaded 91 times
NK1.mod
(1.82 KiB) Downloaded 76 times
xuz
 
Posts: 29
Joined: Thu May 14, 2015 10:59 pm

Re: from one type to two types of agents

Postby jpfeifer » Thu Jul 28, 2016 7:04 am

Hard to tell. There are two issues that come to my mind:
1. Are you sure aggregation is correct? Usually aggregate consumption is a weighted sum, not a product.
2. Your Taylor rule is "wrong", because the Y_ss you define is not equal to actual steady state output, making the steady state interest rate unequal to the time preference rate.
------------
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: from one type to two types of agents

Postby xuz » Thu Jul 28, 2016 6:27 pm

jpfeifer wrote:Hard to tell. There are two issues that come to my mind:
1. Are you sure aggregation is correct? Usually aggregate consumption is a weighted sum, not a product.
2. Your Taylor rule is "wrong", because the Y_ss you define is not equal to actual steady state output, making the steady state interest rate unequal to the time preference rate.

Thanks for your reply!
I have changed the expression from using exp() to using level. Right now the consumption is a weighted sum. I've calculated the correct steady state output. But the problem remains. I write down the model I use. The new mod files and model description are attached.

An update: The unit root variable is C_r. If i replace the second equation "1 = b2*exp(i-pi(+1))*(C_r(+1)/C_r)^(-1)" with C_r=Y_ss, there's no unit root. But I still don't know why it's an unit root. Another way is to replace the second equation "1 = b2*exp(i-pi(+1))*(C_r(+1)/C_r)^(-1)" with "C_r= fixed ratio of C_u". It seems that I need to make a division of the consumption ratio between these two types.

Right now, NK_type2.mod has only one type hit by a shock. However, if in the model each type of agents is hit by one discount factor shock (2 shocks in total), then I either specify C_r=Y_ss or C_u=Y_ss to get stationary solution; otherwise, there's one unit root.

In the model I assume there's no wage markup and I assume the wage is the same across labors and across firms. Maybe this is the problem?
Could you help me have a look at them? Thanks!
Attachments
example.pdf
(101.79 KiB) Downloaded 93 times
NK_type1.mod
(1.69 KiB) Downloaded 64 times
NK_type2.mod
(2.06 KiB) Downloaded 65 times
xuz
 
Posts: 29
Joined: Thu May 14, 2015 10:59 pm

Re: from one type to two types of agents

Postby xuz » Fri Jul 29, 2016 6:37 pm

I tried some other versions, like the one attached,

1st type: hit by preference shock

2nd type: not hit by preference shock, but cannot buy bonds. Thus budget constraint is C_r=w*L_r.

The model works.

I think the problem is the intertemproal euler equation. It's not the division between C_r and C_u, nor is the wage set up.

But I STILL not know why the two-type model where both type have access to bonds doesn't work.
Attachments
NK_type2_v2.mod
(2.18 KiB) Downloaded 76 times
xuz
 
Posts: 29
Joined: Thu May 14, 2015 10:59 pm

Re: from one type to two types of agents

Postby jpfeifer » Mon Aug 01, 2016 7:26 am

Are you sure that your model setup has a solution? The unit root seems like the type of problem that occurs in open economy setup models. Essentially, after a shock that affects debt, the permanent income hypothesis kicks in and the household just consumes the annuity out of its assets forever, never decumulating debt. It could now be that if you provide access to the bond market for the second household, it is set on a trajectory of permanently accumulating/decumulating assets, because the interest rate does not react. In open economy models there is usually a debt-elastic interest rate premium or something similar (or alternatively a borrowing constraint that kicks in via a Lagrange multiplier in the Euler equation)
------------
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: from one type to two types of agents

Postby xuz » Sat Aug 06, 2016 10:39 pm

jpfeifer wrote:Are you sure that your model setup has a solution? The unit root seems like the type of problem that occurs in open economy setup models. Essentially, after a shock that affects debt, the permanent income hypothesis kicks in and the household just consumes the annuity out of its assets forever, never decumulating debt. It could now be that if you provide access to the bond market for the second household, it is set on a trajectory of permanently accumulating/decumulating assets, because the interest rate does not react. In open economy models there is usually a debt-elastic interest rate premium or something similar (or alternatively a borrowing constraint that kicks in via a Lagrange multiplier in the Euler equation)


Thanks professor Pfeiffer. I think that it is the model's feature to have an unit root. And it should be combined with something like debt-elastic interest rate premium.

I've looked at some similar models, like the one developed by Chen, Curdia and Ferrero (2012), "The Macroeconomic Effects of Large-Scale Asset Purchase Programs". There're some other people's codes available on this forum about this paper, e.g. viewtopic.php?f=1&t=6650
and also viewtopic.php?f=1&t=8316&p=24503&hilit=chen#p24503

The code attached could successfully replicate the paper's calibration. One unit root appears, and that one corresponds to one type's consumption. There's no BK or rank conditions problem.

But I got a new problem when I try to replicate Chen et al.'s model,

the steady state value of RL should be RL = (exp(gamma)*exp(lnPi))/beta_r, according to the equation (C.1) in the online appendix.

However, I must use RL = (1+exp(gamma)*lnPi)/beta_r to get the code work. This problem also appears in the codes listed in the above posts.

If I use the steady state value of RL as (exp(gamma)*exp(lnPi))/beta_r, I still get an error about the BK condition no matter how large the parameter phi_T is.

Thanks!
Attachments
Appendix.pdf
(463.57 KiB) Downloaded 85 times
Chen_et_al-2012-The_Economic_Journal.pdf
(378.13 KiB) Downloaded 113 times
ccf_rep.mod
(6.57 KiB) Downloaded 82 times
xuz
 
Posts: 29
Joined: Thu May 14, 2015 10:59 pm

Re: from one type to two types of agents

Postby jpfeifer » Fri Aug 12, 2016 7:33 am

They have a linearized model and the cofficients belonging to the steady states of the original model are important for driving the determinacy properties. What you describe indicates that i) either there is a problem with what is stated in the paper (e.g. a typo) or ii) there is problem with the model. Case i) is more likely according to my experience. I don't have the time to check their computations, but you might need to do this if you want to find out what is going on.
------------
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: from one type to two types of agents

Postby xuz » Mon Aug 15, 2016 7:42 am

jpfeifer wrote:They have a linearized model and the cofficients belonging to the steady states of the original model are important for driving the determinacy properties. What you describe indicates that i) either there is a problem with what is stated in the paper (e.g. a typo) or ii) there is problem with the model. Case i) is more likely according to my experience. I don't have the time to check their computations, but you might need to do this if you want to find out what is going on.


Sure, thanks!
xuz
 
Posts: 29
Joined: Thu May 14, 2015 10:59 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 7 guests