Skip to content

Commit bc9f017

Browse files
[lqramsey] Fix calculation of H (#288)
* Fix calculation of H in lqramsey.md * Fix variable in risk-free rate and summation notation Typo fixes. --------- Co-authored-by: Humphrey Yang <[email protected]>
1 parent 65a6db8 commit bc9f017

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lectures/lqramsey.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ Define
510510
```{math}
511511
:label: lq_rfr
512512
513-
R^{-1}_{t} := \mathbb E_t \beta^j p^t_{t+1}
513+
R^{-1}_{t} := \mathbb E_t \beta p^t_{t+1}
514514
```
515515

516516
$R_{t}$ is the gross $1$-period risk-free rate for loans
@@ -527,7 +527,7 @@ $$
527527
and the cumulation of $\pi_t$
528528

529529
$$
530-
\Pi_t := \sum_{s=0}^t \pi_t
530+
\Pi_t := \sum_{s=0}^t \pi_s
531531
$$
532532

533533
The term $\pi_{t+1}$ is the difference between two quantities:
@@ -693,7 +693,7 @@ def compute_paths(T, econ):
693693
ns = P.shape[0]
694694
F = scipy.linalg.inv(eye(ns) - β * P)
695695
a0 = 0.5 * (F @ (x_vals.T @ Sm.T)**2)[0]
696-
H = ((Sb - Sd + Sg) @ x_vals) * ((Sg - Ss) @ x_vals)
696+
H = ((Sb - Sd + Sg) @ x_vals) * ((Sg + Ss) @ x_vals)
697697
b0 = 0.5 * (F @ H.T)[0]
698698
a0, b0 = float(a0[0]), float(b0[0])
699699
else:

0 commit comments

Comments
 (0)