From one type to two types of agents

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.

  1. 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!
NK_type.mod (2.24 KB)
NK1.mod (1.82 KB)

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.

[quote=“jpfeifer”]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.[/quote]

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 = b2exp(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 = b2exp(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!
example.pdf (102 KB)
NK_type1.mod (1.69 KB)
NK_type2.mod (2.06 KB)

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.
NK_type2_v2.mod (2.18 KB)

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. Deterministic Linear Model
and also Problem with Steady-state and Estimation

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!
Appendix.pdf (464 KB)
Chen_et_al-2012-The_Economic_Journal.pdf (378 KB)
ccf_rep.mod (6.57 KB)

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!