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 (9.99 KB)

find_ws.m (15.2 KB)

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]

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=“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.

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