Blanchard Kahn conditions are not satisfied

Dear Mr Pfeifer,
I use a model with a production function that contains capital, labor and intermediate input. When I shut down parameter related to intermediate input (phic=0.0001) the model works. When I put phi=0.62 (with intermediate input) I get this error message. I verified the timing but I think all is ok. Is there anything to do?

Error using print_info (line 42)
Blanchard Kahn conditions are not satisfied: no stable equilibrium
Error in stoch_simul (line 98)
print_info(info, options_.noprint, options_);
Error in model_furlanetto_changed (line 492)
info = stoch_simul(var_list_);
Error in dynare (line 180)
evalin(‘base’,fname) ;

Thank you !


Also, when I put model_diagnostics(M_,options_,oo_) after running the model, I have no message, what does this means? Is my problem related to the structure of the model?

Thank you!


That means model_diagnostics did not find anything suspicious.

Given that your model works for still considerable values for phic like 0.3, I would guess there is an economic mechanism at work that prevents a stable solution for high value of phic.

Thank you a lot Mr pfeifer! I took this model from a paper, change it, and use his posteriors values to run the model. Now I want to estimate it, I don’t have a good idea about estimation, but I want to know If the previous problem (high value of phic ) will cause me other problems while doing estimation?
(In litterature, The parameter phic is the product of the steady-state price markup and the averaged ratios of material costs over sales which is 0.51 according to
the dataset assembled by the NBER and the U.S. Census Bureau’s Center for Economic Studies)


That is hard to judge. It could happen that your estimation will end up straight at the border of the stability region (which per se is not a problem). You should try to understand what gives rise to the instability at parameter values that, given your answer, seem rather plausible.

Dear Mr Pfeifer,

I have a question about estimation (bayesian), I looked at the example fs2000.mod. The difference between an estimated and a calibrated model is to add this part:
alp, beta_pdf, 0.356, 0.02;
bet, beta_pdf, 0.993, 0.002;
gam, normal_pdf, 0.0085, 0.003;


varobs gp_obs gy_obs;

estimation(order=1, datafile=fsdat_simul, nobs=192, loglinear, mh_replic=2000, mh_nblocks=2, mh_jscale=0.8);

Now I want to know why we have to give values to parameters before the estimation block , and these values are taken from literature (calibration)? (I’m talking about this part in the fs2000.mod example)

alp = 0.33;
bet = 0.99;
gam = 0.003;

I replicated an estimated model of Groshenny (2013) and I have used the prior presented in this paper to give values to parameters ( the calibrated version works). Now If I want to estimate it, I have to keep the same simulated model and just add the estimation block or change parameters declared before with calibrated values taken from literature and not (prior values)?

Thank you a lot


That depends. All parameters that are not estimated are fixed/“calibrated”. Whether you can just keep them at a given value depends on the calibration strategy. Sometimes people set e.g. the discount factor to match a particular interest rate in the data, but estimate the mean growth rate. In this case, as the interest rate depends on both the growth rate and the discount factor, you would need to adjust the discount factor for every estimated value of the mean growth rate to still match the calibration target. This can e.g. be done in a steady state file. You can see an example for this at

Dear Mr Pfeifer,

I have three questions about estimation:

  1. I tried to replicate this paper, in the empirical method the author says : We use the random walk Metropolis-Hasting algorithm to generate 250,000 draws from the
    posterior distribution. The algorithm is tuned to achieve an acceptance ratio between 25 and 30 percent. We discard the
    rst 125,000 draws.
    Is that correspond to what I put in the following line about estimation option? or I have to put mh_replic=250000?
    estimation(order=1,datafile=data_furlanetto, mh_jscale=0.2,mh_drop=0.5, mode_compute=0,mode_file=test_estimation_furlanetto_mode,mh_replic=20000,conf_sig=.95);
  2. I want to compare the estimation result I found with what it was reported in the paper (page37 .table3). First, I can’t find the posterior 5% intervals in my results.
    Second, I found that the posterior median corrresponds to post.mean and both are not what I see in the paper. Note that to caculate the steady state I set estimated parameters equal to their prior. Is that a problem?


Log data density is 3547.192747.
posterior_moments: There are not enough draws computes to compute HPD Intervals. Skipping their computation.
posterior_moments: There are not enough draws computes to compute deciles. Skipping their computation.

prior mean post. mean 90% HPD interval prior pstdev

phiv 0.500 0.4325 0.4322 0.4327 beta 0.2500
h 0.700 0.7074 0.7072 0.7077 beta 0.1000
phiI 5.000 4.5530 4.5524 4.5538 gamma 1.0000
phiu2 0.500 0.4830 0.4829 0.4831 gamma 0.1000
phiP 50.000 47.2112 47.1624 47.2630 gamma 20.0000
phiw 50.000 53.3296 53.3011 53.4005 gamma 20.0000
e 0.500 0.7686 0.7678 0.7697 beta 0.2000
rhor 0.700 0.6992 0.6990 0.6993 beta 0.1000
rhopi 1.500 1.4956 1.4951 1.4958 gamma 0.1000
rhoy 0.500 0.5646 0.5645 0.5647 gamma 0.1000
rhoz 0.300 0.4041 0.4040 0.4043 beta 0.1000
rhomp 0.500 0.7023 0.7018 0.7029 beta 0.2000
rhomu 0.500 0.5192 0.5190 0.5196 beta 0.2000
rhoeb 0.500 0.7252 0.7251 0.7254 beta 0.2000
rhozeta 0.500 0.3362 0.3359 0.3364 beta 0.2000
rhothetastar 0.500 0.4358 0.4357 0.4360 beta 0.2000
rhoetastar 0.500 0.4201 0.4198 0.4205 beta 0.2000
rhog 0.700 0.6708 0.6707 0.6709 beta 0.1000

standard deviation of shocks
prior mean post. mean 90% HPD interval prior pstdev

ez 0.100 0.0145 0.0137 0.0154 invg 3.0000
emp 0.100 0.0119 0.0118 0.0120 invg 3.0000
emu 0.100 0.3585 0.3527 0.3676 invg 3.0000
eb 0.100 0.0149 0.0132 0.0154 invg 3.0000
ezeta 0.100 0.0581 0.0567 0.0595 invg 3.0000
ethetastar 0.100 0.0118 0.0118 0.0118 invg 3.0000
eetastar 0.100 0.3974 0.3933 0.4055 invg 3.0000
eg 0.100 0.0123 0.0122 0.0123 invg 3.0000

  1. when running the calibrated version of the model I found that output decreases following a positive technological shock and in my knowledge, it have to increase. I’m sure that there is no error in equations because for other shocks I have got the good impulse response. It’s related to the values that I assigned to parameters in initval?

Thank you for your help !!

Norges_Bank_Working_Paper_2013_16.pdf (1.1 MB)

First of all, look at the published version at

  1. You have to put
  1. They are stored in the HPDIsup and HPDIinf fields (see the manual). What do you mean with

Note that to caculate the steady state I set estimated parameters equal to their prior?
If there are calibration targets, you need to make sure they are satisfied for every parameter draw. When looking at your results, the HPDIs are very narraw. You should check convergence.
3. That is hard to tell. You should check all equations again. What do you mean with

? The initval-block only takes variables not parameters.

Dear Mr Pfeifer,

I update my file with parameters values taken from the publisehed version. The model cannot turn to do estimation, and my impulse response with the calibration version seems not plausible . The error message I got is : Error in computing likelihood for initial parameter values. I know my problem is connected to // estimated parameters initialisation part in code. For each parameter I give value that I found in prior , for example in the paper the habit in consumption Beta (0.7,0.1), so in // estimated parameters initialisation block I set h=0.7… Is that right?

Thank you!

test_3.mod (6.82 KB)

Please provide a data file. In general, you should use the posterior mean/mode values as the starting values.

Sorry, the data file is attached. In the paper the authors provide only the posterior median. Can I use this as starting values?

Thank you!
Clara (8.38 KB)