# New Keynesian Model tradables and nontradables

**URL:** https://forum.dynare.org/t/new-keynesian-model-tradables-and-nontradables/13080
**Category:** General DSGE Modeling
**Created:** [11 January 2019 20:43 UTC](https://forum.dynare.org/t/new-keynesian-model-tradables-and-nontradables/13080 "2019-01-11T20:43:21Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![SicongM](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@SicongM](https://forum.dynare.org/u/SicongM)
#### Post date: [11 January 2019 20:43 UTC](https://forum.dynare.org/t/new-keynesian-model-tradables-and-nontradables/13080/1 "2019-01-11T20:43:21Z")

</div>

I first tried to build a new Keynesian model in a closed economy with two-sector goods (tradables and nontradables). The endogenous variables are deviations from the steady state. Labour is the only production factor. Calvo price setting. The model is driven by technology shock.

But there is a problem with the closed one in Dynare that I cannot find anything wrong.

After that, I will expand the closed one to be a small open economy.

Thank you so much  
Sicong  
[logdfss\_closed\_nktnt\_n.mod](https://forum.dynare.org/uploads/default/original/2X/2/21b56f88b07c97e6686814f48c40ab620be062aa.mod) (2.2 KB)

---

<div class="post-metadata">

### Author: ![Max1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/e99b99/32.png) [@Max1](https://forum.dynare.org/u/Max1)
#### Post date: [12 January 2019 19:27 UTC](https://forum.dynare.org/t/new-keynesian-model-tradables-and-nontradables/13080/2 "2019-01-12T19:27:27Z")

</div>

Dear SicongM,

you are using a linearized model, I think it is not necessary to use the `initval` block since steady states will be known as zero (due to `model(linear)`) .

When you invoke `stoch_simul` you can also skip the option `order=1` (due to `model(linear)`).  
**Why do you make use of the option `hp_filter=100`?**

Your problem is that one of the eigenvalues is close to 0/0, so you might solve it by using a different calibration.

---

<div class="post-metadata">

### Author: ![SicongM](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@SicongM](https://forum.dynare.org/u/SicongM)
#### Post date: [14 January 2019 20:47 UTC](https://forum.dynare.org/t/new-keynesian-model-tradables-and-nontradables/13080/3 "2019-01-14T20:47:22Z")

</div>

Dear Max1,

Thank you for your response.  
**`hp_filter=100`** means annually. I can change it to **`hp_filter=1600`** that means quarterly.

The one-sector closed NK model works well. So I applied the same parameters to this two-sector closed NK model.

I modified the blocks of the model but there is the same problem that one of the eigenvalues is close to 0/0.

I simply borrowed calibration from the textbook by Jordi Gali (second edition).

I assume that a fraction of tradable consumption (phi) is 0.75,  
so the fraction of nontradable consumption (1-phi) is 0.25.

Please find out the new mod-file.

[logdfss\_closed\_nktnt\_n.mod](https://forum.dynare.org/uploads/default/original/2X/9/99f50664500b024ff1aac9117a34d276945d1267.mod) (1.8 KB)

---

<div class="post-metadata">

### Author: ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)
#### Post date: [18 January 2019 06:05 UTC](https://forum.dynare.org/t/new-keynesian-model-tradables-and-nontradables/13080/4 "2019-01-18T06:05:18Z")

</div>

You have one redundant equation that says

```auto
cnthat = cnthat;

```

That means your equation system is missing one piece of information to compute the variables endogenously.

---

<div class="post-metadata">

### Author: ![SicongM](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@SicongM](https://forum.dynare.org/u/SicongM)
#### Post date: [18 January 2019 15:05 UTC](https://forum.dynare.org/t/new-keynesian-model-tradables-and-nontradables/13080/5 "2019-01-18T15:05:33Z")

</div>

Dear Prof. Pfeifer,

Thank you for pointing out my typo. I have changed it to:  
“cnthat = ynthat;”.

Also, I made a mistake to define the standard deviation: sigma\_at.

Now, all good.

---

<div class="post-metadata">

### Author: ![SicongM](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@SicongM](https://forum.dynare.org/u/SicongM)
#### Post date: [22 January 2019 20:59 UTC](https://forum.dynare.org/t/new-keynesian-model-tradables-and-nontradables/13080/6 "2019-01-22T20:59:39Z")

</div>

Now, I have extended the previous model to a small-open-economy New Keynesian model with Tradables and Non-Tradables. Government spending is financed by the lump-sum tax.

When I run the mod-file, the problem is:  
"There are 5 eigenvalue(s) larger than 1 in modulus  
for 4 forward-looking variable(s)

The rank condition ISN’T verified!"

[logdfss\_soe\_nktnt\_ng.mod](https://forum.dynare.org/uploads/default/original/2X/0/080924ebef325be261d52bcbd90d58570445e009.mod) (2.2 KB)

---

<div class="post-metadata">

### Author: ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)
#### Post date: [23 January 2019 19:02 UTC](https://forum.dynare.org/t/new-keynesian-model-tradables-and-nontradables/13080/7 "2019-01-23T19:02:04Z")

</div>

That is hard to tell. Focus on what you changed. I find your demand functions strange. Usually, only relative prices and inflation rates appear. But in your model, there is a price level `p` showing up.
