clc; clear all; close all

%% This code computes the steady state of a NK model with capital

% Date: 2025.7.19


%% Structural Parameters (quarterly calibration)
beta=0.99;                    % discount factor
alpha=1/3;                    % elasticity of production wrt capital
epsilon=8;                    % elasticity of substitution btw differentiated goods
delta=0.025;                  % depreciation rate
sigma=2;                      % relative risk aversion
phi=0.5;                        % inverse of Frisch elasticity
g=0.8;                          % public spending in ss
z=0.2;                        % incentive compatibility constraint parameter for banker 
gamma=0.925;                    % survive probability for banker
a=1;                          % normalise TFP to be 1
kappaL=4;                   % importance of leisure
%% Steady State
pi=1;                        % inflation targeting 
mc=(epsilon-1)/epsilon;      % real marginal costs


%% Steady-state values
gss=g;
ass=a;
piss=pi;
iss=1/beta-1;
%% Parameters not affecting the steady state
phipi=1.5;                  % mp response to inflation
phiy=0.15;               % mp response to output
kappaI=3;                 % investment adjustment cost (as in CEE). If 0, q is constant
rhoa=0.8;                 % tfp persistence
rhog=0.9;                 % public spending persistence
rhom=0.9;                 % monetary policy inertia
calvo=0.66;               % price rigidity in calvo framework
kappaP=0.6;               % Rotemberg price setting parameter

%% Save parameters
save par beta alpha delta sigma phi gss ass kappaL piss epsilon...
         phipi phiy kappaI rhoa rhog rhom kappaP z gamma iss
%% %% run mod
dynare dissertation.mod
