# Optimal policy with commitment

**URL:** <https://forum.dynare.org/t/optimal-policy-with-commitment/5193>\
**Category:** Dynare help (legacy posts)\
**Created:** [24 December 2015 01:41 UTC](https://forum.dynare.org/t/optimal-policy-with-commitment/5193 "2015-12-24T01:41:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jameszhow1985](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/8baadc/32.png) [@jameszhow1985](https://forum.dynare.org/u/jameszhow1985)\
**Post date:** [24 December 2015 01:41 UTC](https://forum.dynare.org/t/optimal-policy-with-commitment/5193/1 "2015-12-24T01:41:14Z")

</div>

Hi Professor Pfeifer

```
  I build a two-country dsge model with simple feedback rules. The steady state values are provided in the steady state model block, and the dynare code can run. After I comment out  

```

the feedback rules and turn to ramsey optimal policy, dynare reports the steady state value contains NaN or inf. I have checked the variables and parameters,they are all defined and evaluated, so I don’t know which part of the model get wrong. By the way, does dynare have the debug function ?

James  
[paper.mod](https://forum.dynare.org/uploads/default/original/2X/a/adf422c7f052673086d69e497d75ef7d822b186c.mod) (9.99 KB)  
[find\_ws.m](https://forum.dynare.org/uploads/default/original/2X/8/83c61153a609db75ee8cccefbadc822c03e329b4.m) (15.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:** [27 December 2015 19:10 UTC](https://forum.dynare.org/t/optimal-policy-with-commitment/5193/2 "2015-12-27T19:10:28Z")

</div>

The unstable version says

[quote]POLICY AND TRANSITION FUNCTIONS  
V de  
Constant 1.005000 1.002494  
bg(-1) -1.330337 0.533541  
bgs(-1) -0.007358 -0.019916  
fr(-1) 5.502187 0.766531  
bc(-1) 0.571921 -0.038824  
k(-1) -1.370886 0.112155  
k\_s(-1) -0.213025 0.019345  
PI\_H(-1) 1.345373 -0.611676  
PI\_F(-1) 0.515744 -0.373010  
MULT\_22(-1) -1.973379 0.300496  
MULT\_29(-1) 197.690235 -40.842518  
c(-1) 0.890554 -0.348794  
c\_s(-1) 0.044540 0.123680  
R(-1) 30.165820 -2.047788  
R\_s(-1) -0.976821 -0.573657  
ph(-1) 0.000508 -2.490408  
pfs(-1) -0.196266 -0.847491  
m(-1) 0.520963 -0.038554  
rer(-1) 0 -1.092264  
taul(-1) 2.600815 -0.457738  
tauls(-1) 1.035225 -0.232173  
eps\_Rs(-1) 0.122245 -0.342608  
eps\_H(-1) -6.827140 1.201562  
eps\_F(-1) -2.846870 0.638476  
MULT\_9(-1) -2429.018649 132.737927  
MULT\_10(-1) -2966.117463 201.433460  
MULT\_12(-1) 8871.107173 -1834.241503  
MULT\_13(-1) 5183.164060 -1073.463212  
MULT\_25(-1) -1030.877458 213.096110  
eta\_l 1.924603 -0.338726  
eta\_ls 0.476204 -0.106800  
eta\_Rs -0.244490 0.685216  
eta\_H -13.654280 2.403125  
eta\_F 5.693740 -1.276953

All endogenous are constant or non stationary, not displaying correlations and auto-correlations

STEADY-STATE RESULTS:

V 1.005  
de 1.00249  
c 0.77206  
c\_s 0.863804  
i 0.523022  
i\_s 0.301329  
R 1.00701  
R\_s 1.00451  
b 53.3652  
b\_s 0.771631  
bg 0.250512  
bgs 0.771631  
fr 0  
bc 53.1147  
w 2.15786  
w\_s 2.5785  
l 0.4  
l\_s 0.3  
tr -0.0644489  
tr\_s 0.155876  
q 1  
q\_s 1  
r 0.022004  
r\_s 0.022004  
k 26.1511  
k\_s 15.0664  
PI 1.005  
PI\_s 1.0025  
PI\_H 1.005  
PI\_F 1.0025  
y\_H 2.12928  
y\_F 0.971377  
ph 0.788245  
pfs 1.32725  
phd 22.8814  
phn 28.9549  
pfd 13.9169  
pfn 10.4724  
m 21.3949  
m\_s 41.5568  
rer 0.917813  
mc\_h 0.675616  
mc\_f 1.13763  
g 0.38331  
g\_s 0.124127  
y 1.67839  
y\_s 1.28926  
gdp 1.67839  
gdp\_s 1.28926  
ca 0  
ca\_s 0  
tb 0  
tb\_s 0  
taul 0.37  
tauls 0.23  
eps\_v 1  
eps\_Rs 1  
eps\_H 1  
eps\_F 1[/quote]

---

<div class="post-metadata">

**Author:** ![jameszhow1985](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/8baadc/32.png) [@jameszhow1985](https://forum.dynare.org/u/jameszhow1985)\
**Post date:** [28 December 2015 13:57 UTC](https://forum.dynare.org/t/optimal-policy-with-commitment/5193/3 "2015-12-28T13:57:07Z")

</div>

Hi, professor Pfeifer

```
   I have a new question. Before I turn to ramsey optimal policy, I run the code with simple rules, the model diagnostics does not report any colinear relationship. But as I turn to ramsey policy,the dynare reports the following messages: Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 3.060307e-021. So I run the model diagnostics after it, the feedback message said that there are two collinear equtions. It this possible ? Should I worry about this problem ?
```

---

<div class="post-metadata">

**Author:** ![jameszhow1985](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/8baadc/32.png) [@jameszhow1985](https://forum.dynare.org/u/jameszhow1985)\
**Post date:** [30 December 2015 02:54 UTC](https://forum.dynare.org/t/optimal-policy-with-commitment/5193/4 "2015-12-30T02:54:22Z")

</div>

[quote=“jameszhow1985”]Hi, professor Pfeifer

```
   I have a new question. Before I turn to ramsey optimal policy, I run the code with simple rules, the model diagnostics does not report any colinear relationship. But as I turn to ramsey policy,the dynare reports the following messages: Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 3.060307e-021. So I run the model diagnostics after it, the feedback message said that there are two collinear equtions. It this possible ? Should I worry about this problem ?[/quote]

```

Can someone tell me how to fix the collinearity problem I mentioned above ? Any suggestion is appreciated.

---

<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:** [30 December 2015 10:49 UTC](https://forum.dynare.org/t/optimal-policy-with-commitment/5193/5 "2015-12-30T10:49:22Z")

</div>

Try to understand the solution you find. Maybe there is an economic reason why the computed Ramsey policy looks like this.
