# Rotemberg pricing model_Calibration issue

Greetings everyone,
I have a question concerning the Rotemberg pricing model. My issue lies in calibrating the “gamma” parameter, which represents the Rotemberg adjustment cost. I followed Professor Pfeifer’s guidance from a previous post (How to do a calbiration?) for calibrating gamma. After equalizing the slope of the PC, the resulting value for gamma is 49. However, the model fails to run when gamma exceeds a value of 1.2.
To provide some context, I will explain the steps I followed. I replaced the Calvo equations with the Rotemberg equation, as shown below:

``````Calvo equations:
%Y     = Z/Delta*L^(1-alpha)*(K(-1)*Omega(-1))^alpha;
%1     = theta*(1+pi)^(epsilon-1) + (1-theta)*pstar^(1-epsilon);
%pstar = Xi1/Xi2;
%Xi1   = epsilon/(epsilon-1)*mu*Y   + theta*SDF*(1+pi(+1))^epsilon    *Xi1(+1);
%Xi2   = Y   + theta*SDF*(1+pi(+1))^(epsilon-1)*Xi2(+1);
%Delta = (1-theta)*pstar^(-epsilon) + theta*(1+pi)^epsilon*Delta(-1);

Rotemberg equation:
1-epsilon+epsilon*mu=gamma*(pi-1)*pi-gamma*SDF*(pi(+1)-1)*pi(+1)*(Y(+1)/Y);
``````

The initial values for the other parameters are as follows:
epsilon = 4.167;
theta = 0.779; % Calvo
beta = 0.995;

Any insight into the potential causes of this problem would be greatly appreciated!
Thank you.

What is the error message you are getting? But my impression is you got the signs wrong in your NKPC.

I reviewed the signs carefully, and they seem correct.
I can run the model with gamma <= 1.2.

Here is the error message:

Largest absolute residual at iteration 71: 525.633

WARNING: NaN or Inf detected in the residuals or endogenous variables.
.
.
.

Largest absolute residual at iteration 99: 0.000

Largest absolute residual at iteration 100: 0.000

25 | 0.67854 | failed | 2.214748e-05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Failed to solve perfect foresight model

Total computing time : 0h00m27s
Note: warning(s) encountered in MATLAB/Octave code

But that’s just a problem with finding a perfect foresight solution if the NKPC becomes very nonlinear. Have you tried a smaller shock size?

Now it works.
Thank you so much, Professor Pfeifer.