Hi! test.mod (744 Bytes)
While playing around with Dynare, I have stumbled across an issue that I cannot seem to resolve: My model consists of a perfectly competitive firm producing with a cobb-douglas production function and two households supplying labour and capital. I have the following equations:
Labour-leisure tradeoff household 1
Labour-leisure tradeoff household 2
Euler eq h1
Euler eq h2
production function
Wage = Marginal product of labour
r = Marginal product of capital
budget constraints h1
budget constraint h2
AR(1) process for tfp

The steady-state computes just fine. However, when modelling a tfp-shock, there are NaN’s in the theoretical moments, and running diagnostics tells me that there is a unit root:

MODEL_DIAGNOSTICS: The Jacobian of the static model is singular
MODEL_DIAGNOSTICS: there is 1 colinear relationships between the variables and the equations
Colinear variables:
c
c_m
k
k_m
l
l_m
Colinear equations
3 4

MODEL_DIAGNOSTICS: The singularity seems to be (partly) caused by the presence of a unit root
MODEL_DIAGNOSTICS: as the absolute value of one eigenvalue is in the range of ±1e-6 to 1.
MODEL_DIAGNOSTICS: If the model is actually supposed to feature unit root behavior, such a warning is expected,
MODEL_DIAGNOSTICS: but you should nevertheless check whether there is an additional singularity problem.
MODEL_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one
MODEL_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation
MODEL_DIAGNOSTICS: is missing. The problem often derives from Walras Law.

What am I missing? Is there a redundancy that I do not see? How to I handle this?
Thanks a lot!

Thanks for the prompt answer!
I am aware that my model has a unit root, but I have no idea what to do about it. It seems to me that the asset distribution is indeterminate because the two euler-equations are identical in the steady state.
Is there anything wrong with forcing the two households to behave identically via [static]k=k_m (and [dynamic] euler equation)? I discovered that this gets rid of the unit root, however, it feels a bit fishy.
I am quite new to Dynare (as might be obvious). How are such indeterminacies usually handled? Do economists just introduce assumptions that prevent them?

I’d like to model the effect of migration. I thought about doing it in the following way, even though I have to admit that I am unsure if this makes any sense: There is a non-migrant and a migrant household. Both of them are identical in their behaviour. The number of migrants is an exogenous variable that is 0 in the steady state. To model the effect of migrations, I have two shocks occur simultaneously: 1. The number of migrant households will be a positive constant for some number of periods. 2. The capital of the migrant household(s) will be set to zero initially.
I need two agents because I am assuming that the migrant household arrives without any capital.
I am now running into problems due to the indeterminacy: when I introduce the capital-less migrant household, it starts accumulating debt. Shouldn’t this be excluded by the transversality condition?

I have also tried modelling the transition of one steady state to the other using the perfect foresight solver: Starting at the steady state of the model without a migrant household and then simulating the path to the steady state of the model with a certain number of migrant households.

Most variables converge to the new steady state, but the capital stocks of the non-migrant and the migrant households do not. Rather, k grows without limits and k_m decreases without limits (I take it that k+k_m converges to its new steady state, though). I would have interpreted this as the migrant household accumulating ever more debt.

What could be the reason for this? This should be ruled out by the TVC/no-ponzi-condition, right?

Does my approach sound sensible or is there some other way to model such a migration shock? I would gladly work through papers if I could find any.

I am not sure there is actually a TVC embedded in your setup. The only thing restricted in practice seems to be aggregate capital, not its split (thus the unit root). This allows one household to arbitrarily borrow from the other one.

I understand how that would help, but I do not understand why it is necessary. Why doesn’t dynare apply a TVC? Why don’t the jump variables jump on the path that converges to the new steady state?

Your setup is like a small open economy. The interest rate at which agents can borrow/lend does only depend on the aggregate capital stock. It’s division does not matter. That prevents meaningful feedback from the individual choices.

This explains why there are infinitely many steady states, but I am afraid I still do not see how it allows for the violation of the TVC.
Thanks for your help so far, I do have two last questions:

A risk premium would not change the fact that there are infinitely many steady states, for there would still be infinitely many steady states in which neither of the households borrows, right?

In the presence of infinitely many steady states, the steady state that dynare computes for given initial values is not necessarily the steady state to which the economy would converge, starting from those initial values, is it?

No, a risk premium would increase the interest rate and reduce consumption if you borrow too much. In small open economy models that leads to well-defined steady states.

Again, think harder about your setup. You are starting the model from a given value for capital and consumption is governed by the Euler equation. But the interest rate in the Euler equation depends on the aggregate capital stock. Thus, there is no immediate feedback from the individual consumption decisions to the interest rate. As a consequence, the households will simply consume given that aggregate interest rates without paying attention to the asset position. You can observe that this position never converges. Put differently, you are imposing a steady state for the forward-looking consumption but this is inconsistent with the individual asset positions the agents are starting with…

How would I implement a debt elastic risk premium? The premium would have to be zero as long as capital is nonnegative, but increasing for negative capital. How does one do that in dynare?

I implemented a debt elastic risk premium. There are still infinitely many steady states - even if I set the risk premium so high that no household takes up debt, there is still an infinite number of steady states in which neither of the two households borrows from the other one. I do not see how there would be no feedback from the individual consumption on r; there are two households who both supply capital, and if household 1 consumes less and invests more, aggregate capital increases and r thus decreases.
How does one do deterministic simulations with a model featuring a unit root? I do now realize that it was not particularly smart to choose a particular steady state for endval, not knowing whether this is the steady state to which my initval would converge in the first place. How do I find the true endval? Supposedly, differentiate_forward_vars should be able to help, but I could not find out how.

I am not simulating a shock, but rather the path from initvals to a steady state, not knowing which of the infinitely many steady states my initvals converge to. Is differentiate_forward_vars a substitute for the endval block or do I still have to specify endvals?

I don’t have much experience with that option. But in the mod-file in question, no terminal steady state is set. Rather, the simulation is pretty much conducted until there is no meaningful change in the variables anymore.