New-keynesian model whit oil price

Dear all,

I am trying to replicate in a simple way the model of Tarek Ghazouani, Energy Price Shocks and Financial Market Integration: Evidence from New Keynesian Model, 2020: (Energy Price Shocks and Financial Market Integration: Evidence from New Keynesian Model | SpringerLink)
It consists in a 4-equation model with the oil price, but i can’t understand them well.
I found the paper and the appendix referred by the authors regarding the model part and then I tried to build some code, but it doesn’t run, Vasconez, V. A., Giraud, G., Isaac, F. M., & Pham, N.-S. (2015). The effects of oil price shocks in a new-Keynesian framework with capital accumulation. Energy Policy, 86, 844–854.

Does anyone have an idea how i could proceed?

Many thanks in advance!
here the code

close all;
%list of variables
var x y pi i rn a c n rr w m f delta_m e k s_e s_k;
varexo as;
%list of parameters
parameters sigma phi beta psi phi_pigreco phi_x rhoa Ass alpha;
% calibrate parameters
sigma = 1;
phi = 1;
beta = 0.99;
psi = 2/3;
Ass =1;
phi_x = (0.5)/4;
phi_pigreco = 0.5;
rhoa = 0.9;
alpha=1;
model(linear);
%Steady state rations ??
%Eq.1 IS curve
x=x(+1)-1/sig*(i-pi(+1)-rn);
%Eq.2 output gap
x=y-((1+phin)/(phin+sig))a; %per lo shock tecnologico
%Eq.3 NKPC
pi=betapi(+1)+kappax;
%Eq.4 Natural interest rate
rn=-sig((1+phin)/(phin+sig))(1-rhoa)a;
%Eq.5 technology shock
a=rhoaa(-1)+as;
%Eq.6 domanda di moneta
m=x-epsii+delta_m+a;
%Eq.7 shock al tassO di crescita della moneta
delta_m=rhom*(delta_m(-1))+gm;
%Eq.8 saldi reali di cassa
m=m(-1)+delta_m-pi;
%Eq.9 consumo
y=c;
%Eq.10 hours
n=y-a;
%Eq.11 real interest rate
rr=1-pi(+1);
%Eq.12 real wege
w=phinn+sigc;
%Eq.13 Energy cost
f=-1/alpha(a-alphas_e-alphaw-alpha*(rr+s_k))
%Eq.14
sigmai=k(+1)-(1-sigma)k;
%Eq.15
e=rr+s_k+k;
%Eq.16
s_e=rhoas_e(-1)+e;
%Eq.17
s_k=rhoas_k(-1)+e;
end;
steady;
check;
shocks;
var eta=0.01^2;
stderr 0.01;
end;
stoch_simul(irf=40);

You had various syntax issues. Now you need to fix the variable and parameter declarations
test23.mod (1.2 KB)

thank you so much for such a quick reply, I’ll check now, have a nice evening! :slight_smile: