Skip to content

Commit 27db155

Browse files
committed
small updates to the formula
1 parent becf49a commit 27db155

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lectures/cass_fiscal.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ $$ (eq:diff_second_steady)
303303
*Price:*
304304
305305
$$
306-
q_t = \beta^t \frac{u'(c_t)}{1 + \tau_{ct}}
306+
q_t = \frac{\beta^t u'(c_t)}{u'(c_0)}
307307
$$ (eq:equil_q)
308308
309309
```{code-cell} ipython3
@@ -434,7 +434,7 @@ def compute_rts_path(q_path, S, t):
434434
In our model, the representative household has the following CRRA preferences over consumption:
435435
436436
$$
437-
U(c) = \frac{c^{1 - \gamma}}{1 - \gamma}
437+
u(c) = \frac{c^{1 - \gamma}}{1 - \gamma}
438438
$$
439439
440440
```{code-cell} ipython3
@@ -701,6 +701,7 @@ plt.show()
701701
Let's write the procedures above into a function that runs the solver and draw the plots for a given model
702702
703703
```{code-cell} ipython3
704+
:tags: [hide-input]
704705
def experiment_model(shocks, S, model, solver, plot_func, policy_shock, T=40):
705706
"""
706707
Run the shooting algorithm given a model and plot the results.
@@ -769,6 +770,8 @@ plt.show()
769770
Let's write another function that runs the solver and draw the plots for two models as we did above
770771
771772
```{code-cell} ipython3
773+
:tags: [hide-input]
774+
772775
def experiment_two_models(shocks, S, model_1, model_2, solver, plot_func,
773776
policy_shock, legend_label_fun=None, T=40):
774777
"""
@@ -953,7 +956,7 @@ The algorithm is described as follows:
953956
$$
954957
l_{k_0} = 1 - \beta \left[ (1 - \tau_{k0}) \left(f'(k_0) - \delta \right) + 1 \right]
955958
$$
956-
- Compute the residual for the *terminal condition for $t = S* using {eq}`eq:diff_second` under the assumptions $c_t = c_{t+1} = c_S$, $k_t = k_{t+1} = k_S$, $\tau_{ct} = \tau_{ct+1} = \tau_{cS}$, and $\tau_{kt} = \tau_{kt+1} = \tau_{kS}$:
959+
- Compute the residual for the *terminal condition* for $t = S$ using {eq}`eq:diff_second` under the assumptions $c_t = c_{t+1} = c_S$, $k_t = k_{t+1} = k_S$, $\tau_{ct} = \tau_{ct+1} = \tau_{cS}$, and $\tau_{kt} = \tau_{kt+1} = \tau_{kS}$:
957960
$$
958961
l_{k_S} = \beta u'(c_S) \frac{(1 + \tau_{cS})}{(1 + \tau_{cS})} \left[(1 - \tau_{kS})(f'(k_S) - \delta) + 1 \right] - 1
959962
$$
@@ -979,7 +982,7 @@ def feasi_residual(k_t, k_tm1, c_tm1, g_t, model):
979982
α, A, δ = model.α, model.A, model.δ
980983
return k_t - (A * k_tm1 ** α + (1 - δ) * k_tm1 - c_tm1 - g_t)
981984
982-
# Computing Residuals
985+
# Computing residuals as objective function to minimize
983986
def compute_residuals(vars_flat, k_init, S, shocks, model):
984987
"""
985988
Compute a vector of residuals under Euler's equation, feasibility condition,

0 commit comments

Comments
 (0)