-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGrid_plotter_KL2.m
More file actions
44 lines (29 loc) · 958 Bytes
/
Copy pathGrid_plotter_KL2.m
File metadata and controls
44 lines (29 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
%Grid plotter_KL2 (April 2026)
clear, clc
x = linspace(4,6,5); %Risk aversion coefficient
y = linspace(6/5,3,16); %Elasticity of intertemporal substitution
tic
for jj = 1:length(x)
par = x(jj);
for mm = 1:length(y)
par1 = 1 - 1/y(mm);
par0 = 1;
dynare NGDP_2024_KL2_lump_sum_ROBUST_LOOP.mod
Ind(mm,jj) = Index_stoch;
b_IT_star(mm,jj) = Stack_b(Index_stoch);
par0 = 0;
dynare NGDP_2024_KL2_lump_sum_ROBUST_LOOP.mod
Z(mm,jj) = Lambda_NGDP;
Ind1(mm,jj) = Index_stoch;
b_NIT_star(mm,jj) = Stack_b(Index_stoch);
end
end
toc
max(max(Ind)), min(min(Ind))
max(max(Ind1)), min(min(Ind1))
[X,Y] = meshgrid(x,y);
figure(1)
contourf(X,Y,Z), colormap(gray); %shading interp;
figure(2)
subplot(1,2,1), contourf(X,Y,b_IT_star), colormap(gray), hold on,
subplot(1,2,2), contourf(X,Y,b_NIT_star), colormap(gray),