フィルターのクリア

Hybrid New Keynesian Model

5 ビュー (過去 30 日間)
Farah Shahpoor
Farah Shahpoor 2018 年 12 月 14 日
Hello, I have a problem with the timepath of the variables, when I program the Hybrid NKM under commitment. Iam using the Schur decomposition as usual in the hybrid model.
The code I used :
%Parameters
gam_f = 0.5
gam_b =0.5
beta= 1
gam_x = 0.2
lambda = 0.5
AR_par = 0.8
% System is: (w;v)(+1) = A*[w;v] + [ 1;0;0;0;0]*eps
A11= [AR_par 0 0;0 0 0; 0 0 0];
A12= [ 0 0; 1 0; 0 1];
A21 =[ 0 -gam_f/beta^2*gam_b 0; -1/beta*gam_f 0 -gam_b/gam_f];
A22 =[ 1/beta^2*gam_f gam_x/beta^2*lambda*gam_b; -gam_x/beta*gam_f 1/beta*gam_f];
A = [ [A11 A12] ; [A21 A22] ]
% Solve the System
disp('Schur decomposition')
[Z, T] = schur(A, 'complex')
disp ('reorder eigenvalues in increasing order along the principal diagonal')
[Z, T] = ordschur(Z,T, 1:5)
if abs(sum(sum(Z*T*Z'-A))) > 0.0001 && sum(sum(Z'*Z-eye(lenght(Z)))) > 0.0001
disp('Error in Schur decomposition')
end
disp('check Blanchard-Kahn')
abs_diag_T = abs(diag(T))'
%%Calculating the solution time path
% z(+1) = E[z(+1)] + Z_11^-1 * [1;0;0] * eps
T_11 = T(1:1,1:1);
Z_11 = Z(1:1,1:1);
Z_21 = Z(4:5,1:1);
T=30;
z_solution= NaN(3,T);
w_solution= NaN(3,T);
w_solution(:,1)=[ 1; 0; 0];
z_solution(:,1)=inv(Z_11)* w_solution(: ,1);
v_solution= NaN(2,T);
for t=2:T
z_solution(:,t)= T_11* z_solution(: ,t-1 );
w_solution(:,t)= Z_11 * z_solution(:,t);
v_solution(:,t)= Z_21 *inv(Z_11)* w_solution(:,t);
end
Funktion ohne Link?
Specially the initial jump of output and inflation looks completly different as it should be. Does anybody have a hint?

回答 (0 件)

カテゴリ

Help Center および File ExchangeDiscrete Math についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by