-
Notifications
You must be signed in to change notification settings - Fork 0
/
integration_B.yaml
147 lines (117 loc) · 3.92 KB
/
integration_B.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Partial Integration
description: capital
model_type: dtcc
### "declarations"
symbols:
exogenous: [A_1, A_2]
states: [k_1, k_2, b_f]
controls: [db_f, p_f, i_1, i_2, ew_1, ew_2, w_1, w_2]
# values: [roc_1, roc_2, p_S_1, p_S_2, r_S_1, r_S_2]
parameters: [beta, theta, gamma, psi, delta, rho_A, rho_E, min_b, max_b, E,
a1, a2, xi, sigma_A_1, sigma_A_2, sigma_E, kmin, kmax, min_bb, max_bb,
S_1, S_2, country, zeta, hom, N_k, N_b]
### "declarations_ended"
### "definitions"
definitions: |
y_1[t] = k_1[t]**theta*exp(A_1[t])
y_2[t] = k_2[t]**theta*exp(A_2[t])
c_1[t] = y_1[t] - i_1[t] + b_f[t] - p_f[t]*db_f[t]
c_2[t] = y_2[t] - i_2[t] - (b_f[t] - p_f[t]*db_f[t])/S_2*S_1
Phi_1[t] = a1 + a2/(1-xi)*(i_1[t]/k_1[t])^(1-xi)
Phi_2[t] = a1 + a2/(1-xi)*(i_2[t]/k_2[t])^(1-xi)
Phi_1__p[t] = a2*(i_1[t]/k_1[t])^(-xi)
Phi_2__p[t] = a2*(i_2[t]/k_2[t])^(-xi)
lam[t] = ( db_f[t] - min_b) / (max_b - min_b)
equations:
transition:
k_1[t] = ( (1-delta) + Phi_1[t-1] )*k_1[t-1] / exp(E)
k_2[t] = ( (1-delta) + Phi_2[t-1] )*k_2[t-1] / exp(E)
b_f[t] = db_f[t-1] / exp(E)
arbitrage: |
-(beta*( exp(E)*w_1[t+1]/ew_1[t] )**(psi-gamma) * (exp(E)*c_1[t+1]/c_1[t])**(-psi) - beta*( exp(E)*w_2[t+1]/ew_2[t] )**(psi-gamma) * (exp(E)*c_2[t+1]/c_2[t])**(-psi) ) | min_bb <= db_f[t] <= max_bb
p_f[t] = lam*beta*( exp(E)*w_1[t+1]/ew_1 )**(psi-gamma) * (exp(E)*c_1[t+1]/c_1)**(-psi) + (1-lam)*beta*( exp(E)*w_2[t+1]/ew_2[t] )**(psi-gamma) * (exp(E)*c_2[t+1]/c_2[t])**(-psi)
-(beta*( exp(E)*w_1[t+1]/ew_1[t] )**(psi-gamma) * (exp(E)*c_1[t+1]/c_1[t])**(-psi) * (theta*(y_1[t+1]/k_1[t+1])*Phi_1__p + Phi_1__p/Phi_1__p[t+1]*( (1-delta) + Phi_1[t+1]-i_1[t+1]/k_1[t+1]*Phi_1__p[t+1])) - 1 ) | 0.00 <= i_1[t] <= inf
-(beta*( exp(E)*w_2[t+1]/ew_2[t] )**(psi-gamma) * (exp(E)*c_2[t+1]/c_2[t])**(-psi) * (theta*(y_2[t+1]/k_2[t+1])*Phi_2__p + Phi_2__p/Phi_2__p[t+1]*( (1-delta) + Phi_2[t+1]-i_2[t+1]/k_2[t+1]*Phi_2__p[t+1])) - 1 ) | 0.00 <= i_2[t] <= inf
1 = ( w_1[t+1]/ew_1[t]*exp(E) )**(1-gamma)
1 = ( w_2[t+1]/ew_2[t]*exp(E) )**(1-gamma)
beta - (w_1[t]/ew_1[t])**(1-psi) + (1-beta)*(c_1[t]/ew_1[t])**(1-psi)
beta - (w_2[t]/ew_2[t])**(1-psi) + (1-beta)*(c_2[t]/ew_2[t])**(1-psi)
############################
calibration:
# exogenous
# controls
db_f: 0
p_f: beta
i_1: ((1/beta-(1-delta))/theta)**(1/(theta-1)) * delta
i_2: ((1/beta-(1-delta))/theta)**(1/(theta-1)) * delta
w_1: c_1
w_2: c_2
ew_1: c_1
ew_2: c_2
# values
p_1: beta
p_2: beta
p_S_1: beta/(1-beta)*(theta*y_1-i_1)
p_S_2: beta/(1-beta)*(theta*y_2-i_2)
E_p_S_1: (p_S_1 + theta*y_1-i_1)
E_p_S_2: (p_S_2 + theta*y_2-i_2)
roc_1: 1/beta
roc_2: 1/beta
# markov states
A_1: 0
A_2: 0
# states
k_1: i_1/delta
k_2: i_2/delta
b_f: 0
#auxiliaries
y_1: k_1**theta
y_2: k_2**theta
c_1: (y_1 - delta*k_1)
c_2: (y_2 - delta*k_2)
Phi_1: a1 + a2/(1-xi)*(i_1/k_1)^(1-xi)
Phi_2: a1 + a2/(1-xi)*(i_2/k_2)^(1-xi)
Phi_1__p: a2*(i_1/k_1)^(-xi)
Phi_2__p: a2*(i_2/k_2)^(-xi)
E: 0
r_S_1: 1/beta
r_S_2: 1/beta
beta: 0.96
theta: 0.3
delta: 0.08
gamma: 4.0
psi: 4.0
rho_A: 0.9
rho_E: 0.999
zeta: 0.0
tpb: 1
xi: 0.2
a2: delta^(xi)
a1: delta - a2/(1-xi)*delta^(1-xi)
sigma_A_1: 0.025
sigma_A_2: 0.05
sigma_E: 0.0
kmin: 1.5
kmax: 10
country: 1
S_1: 1
S_2: 1
hom: 1
min_b: -5.0
max_b: 5.0
min_bb: min_b
max_bb: max_b
n_a: 3
n_e: 1
N_k: 20
N_b: 20
N_s: 7
exogenous:
A_1, A_2: !VAR1
rho: rho_A
Sigma:
[ [sigma_A_1^2, zeta*sigma_A_1*sigma_A_2], [zeta*sigma_A_1*sigma_A_2, sigma_A_2^2] ]
domain:
k_1: [kmin, kmax]
k_2: [kmin, kmax]
b_f: [min_b, max_b]