%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%Some Observations in the High Frequency Versions of a Standard New-Keynesian Model%%%%
%%%%%%by Reiner Franke & Stephen Sacht (Bulletin of Economic Research, forthcoming)%%%%%%%
%%%%%%%%%%%%%%%%%Matlab/Dynare Source Code (c) by Stephen Sacht (2008)%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Impulse Response Functions%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
var pip y i v piphd yhd ihd vh;
varexo a;
parameters beta rho sigma eta theta omega chi phi_p phi_y alpha_v rf x h gammaf gammab lambda ah bh gammafhd gammabhd;
beta=0.99; // Intertemporal discount rate
rho=(1-beta)/beta; // Natural real rate of interest (households' preference rate)
sigma=1; // Intertemporal elasticity of substitution in consumption
eta=1; // Intertemporal elasticity of substitution of labour
theta=2/3; // Calvo degree of price stickiness (Price flexibility: 0.0000000000001)
omega=0.3; // [SET] value of the rule-of-thumb parameter in price setting
chi=0.6; // [SET] value of the habit-formation parameter in consumption
phi_p=1.5; // Weight on inflation in the Taylor rule
phi_y=0.125; // Weight on the output gap in the Taylor rule
alpha_v=0.5; // Persistence in the shock process
rf=3000; // [SET] length of the impulse response functions (must be equal to the value for 'irf' in stoch_simul)
x=90; // [SET] frequency of decision making (e.g. three times within a quarter := monthly frequency)
h=1/x; // Length of the period (relative to a quarter, where h=1)
gammaf=(beta*theta)/(theta+omega*(1-theta*(1-beta)));
gammab=omega/(theta+omega*(1-theta*(1-beta)));
lambda=((1-omega)*(sigma+eta)*(1-theta)*(1-beta*theta))/(theta+omega*(1-theta*(1-beta)));
ah=omega+((1+h*(1-omega)*rho)*(1-h*(1-theta)))/(1+h*rho);
bh=((1-omega)*(sigma+eta)*(1-theta)*(1+rho-theta))/ah;
gammafhd=(1-h*(1-theta))/((1+h*rho)*ah);
gammabhd=omega/ah;
model(linear);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%//Baseline Economy (h=1)
pip=gammaf*pip(+1)+gammab*pip(-1)+lambda*y;
y=(1/(1+chi))*y(+1)+(chi/(1+chi))*y(-1)-((1-chi)/(sigma*(1+chi)))*(i-pip(+1)-rho);
i=rho+phi_p*pip+phi_y*y+v;
v=alpha_v*v(-1)+a;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%//h-Economy (0