Skip to content

Commit 41e91e4

Browse files
committed
updates
1 parent 78855b7 commit 41e91e4

20 files changed

Lines changed: 75 additions & 63 deletions

lectures/ar1_processes.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,7 @@ In this equation, we can use observed data to evaluate the left hand side of {eq
356356

357357
And we can use a theoretical AR(1) model to calculate the right hand side.
358358

359-
If $\frac{1}{m} \sum_{t = 1}^m X_t$ is not close to $\psi^*(x)$, even for many
360-
observations, then our theory seems to be incorrect and we will need to revise
361-
it.
359+
If $\frac{1}{m} \sum_{t = 1}^m h(X_t)$ is not close to $\int h(x)\psi^*(x) dx$, even for many observations, then our theory seems to be incorrect and we will need to revise it.
362360

363361

364362
## Exercises
@@ -427,8 +425,8 @@ def true_moments_ar1(k):
427425
return 0
428426
429427
k_vals = np.arange(6) + 1
430-
sample_moments = np.empty_like(k_vals)
431-
true_moments = np.empty_like(k_vals)
428+
sample_moments = np.empty(len(k_vals), dtype=float)
429+
true_moments = np.empty(len(k_vals), dtype=float)
432430
433431
for k_idx, k in enumerate(k_vals):
434432
sample_moments[k_idx] = sample_moments_ar1(k)

lectures/cagan_adaptive.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,11 +505,13 @@ for λ in λ_vals:
505505
print(f'{λ:>6.2f} | {ρ:>10.4f} | {str(abs(ρ) < 1):>8} | {peak:>20.4f}')
506506
```
507507
508-
All four values satisfy the stability condition $|\rho| < 1$ for the default $\alpha = 5$.
508+
All four values satisfy the stability condition $|\rho| < 1$ for the default $\alpha = 5$ and have $\rho > 0$.
509509
510-
The case $\lambda = 0.86$ is closest to the stability boundary and therefore displays the largest oscillatory response.
510+
The case $\lambda = 0.86$ has the largest initial overshoot among these four values and then converges the fastest.
511511
512-
As $\lambda$ moves closer to one, expectations become more inertial and the post-stabilization response decays more slowly but starts from a smaller jump.
512+
As $\lambda$ moves closer to one, expectations become more inertial, so the post-stabilization response decays more slowly but starts from a smaller jump.
513+
514+
For $\alpha = 5$, an oscillatory stable response would require $0.8 < \lambda < 5/6$.
513515
514516
```{solution-end}
515517
```

lectures/cagan_ree.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ The government prints money to finance expenditure with the "velocity dividend"
580580
581581
The next code generates a multi-panel graph that includes outcomes of both experiments 1 and 2.
582582
583-
That allows us to assess how important it is to understand whether the sudden permanent drop in $\mu_t$ at $t=T_1$ is fully unanticipated, as in experiment 1, or completely
583+
That allows us to assess how important it is to understand whether the sudden permanent drop in $\mu_t$ at $t=T_1$ is fully anticipated, as in experiment 1, or completely
584584
unanticipated, as in experiment 2.
585585
586586
```{code-cell} ipython3

lectures/cobweb.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ ts_plot_supply(m, 5, 15)
530530

531531
Backward looking average expectations refers to the case where producers form
532532
expectations for the next period price as a linear combination of their last
533-
guess and the second last guess.
533+
observed price and the price observed one period before that.
534534

535535
That is,
536536

@@ -587,9 +587,9 @@ def ts_plot_price_blae(model, p0, p1, alphas, ts_length=15):
587587
```{code-cell} ipython3
588588
m = Market()
589589
ts_plot_price_blae(m,
590-
p0=5,
591-
p1=6,
592-
alphas=[0.1, 0.3, 0.5, 0.8],
590+
p0=1,
591+
p1=2.5,
592+
alphas=[0.1, 0.3, 0.5, 0.8],
593593
ts_length=20)
594594
```
595595

lectures/cons_smooth.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ $$
522522
which implies that
523523
524524
$$
525-
\xi_1 \sum_{t=0}^T \phi_t R^{-t} - \xi_0 \sum_{t=0}^T R^{-t} = 0
525+
\xi_1 \sum_{t=0}^T \phi^t R^{-t} - \xi_0 \sum_{t=0}^T R^{-t} = 0
526526
$$
527527
528528
which implies that

lectures/eigen_I.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,8 +1093,8 @@ Try to compute the trajectory of $v$ after being transformed by $A$ for $n=4$ it
10931093
```{code-cell} ipython3
10941094
A = np.array([[1, 2],
10951095
[1, 1]])
1096-
v = (0.4, -0.4)
1097-
n = 11
1096+
v = (2, -2)
1097+
n = 4
10981098
10991099
# Compute eigenvectors and eigenvalues
11001100
eigenvalues, eigenvectors = np.linalg.eig(A)
@@ -1105,7 +1105,7 @@ print(f'eigenvectors:\n {eigenvectors}')
11051105
plot_series(A, v, n)
11061106
```
11071107

1108-
The result seems to converge to the eigenvector of $A$ with the largest eigenvalue.
1108+
The trajectory begins to turn toward the eigenvector of $A$ with the largest eigenvalue.
11091109

11101110
Let's use a [vector field](https://en.wikipedia.org/wiki/Vector_field) to visualize the transformation brought by A.
11111111

lectures/eigen_II.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Left eigenvectors will play important roles in what follows, including that of s
117117

118118
A vector $w$ is called a left eigenvector of $A$ if $w$ is a right eigenvector of $A^\top$.
119119

120-
In other words, if $w$ is a left eigenvector of matrix $A$, then $A^\top w = \lambda w$, where $\lambda$ is the eigenvalue associated with the left eigenvector $v$.
120+
In other words, if $w$ is a left eigenvector of matrix $A$, then $A^\top w = \lambda w$, where $\lambda$ is the eigenvalue associated with the left eigenvector $w$.
121121

122122
This hints at how to compute left eigenvectors
123123

@@ -257,7 +257,7 @@ We can see that if a matrix is primitive, then it implies the matrix is irreduci
257257

258258
Now let's step back to the primitive matrices part of the Perron-Frobenius theorem
259259

260-
```{prf:Theorem} Continous of Perron-Frobenius Theorem
260+
```{prf:Theorem} Continuity of Perron-Frobenius Theorem
261261
:label: con-perron-frobenius
262262
263263
If $A$ is primitive then,

lectures/input_output.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,13 +560,13 @@ Another way to rank sectors in input-output networks is via output multipliers.
560560
The **output multiplier** of sector $j$ denoted by $\mu_j$ is usually defined as the
561561
total sector-wide impact of a unit change of demand in sector $j$.
562562
563-
Earlier when disussing demand shocks we concluded that for $L = (l_{ij})$ the element
563+
Earlier when discussing demand shocks we concluded that for $L = (l_{ij})$ the element
564564
$l_{ij}$ represents the impact on sector $i$ of a unit change in demand in sector $j$.
565565
566566
Thus,
567567
568568
$$
569-
\mu_j = \sum_{j=1}^n l_{ij}
569+
\mu_j = \sum_{i=1}^n l_{ij}
570570
$$
571571
572572
This can be written as $\mu^\top = \mathbb{1}^\top L$ or

lectures/intro_supply_demand.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -789,8 +789,7 @@ $$
789789
790790
Here $p$ is set to $i_s(q)$.
791791
792-
Social welfare is the sum of consumer and producer surplus under the
793-
assumption that the price is the same for buyers and sellers:
792+
Planner welfare is the area between inverse demand and inverse supply:
794793
795794
$$
796795
W(q)
@@ -801,6 +800,8 @@ Solve the integrals and write a function to compute this quantity numerically
801800
at given $q$.
802801
803802
Plot welfare as a function of $q$.
803+
804+
At the competitive equilibrium, the common price lets this same area be interpreted as consumer surplus plus producer surplus.
804805
```
805806
806807
@@ -883,8 +884,7 @@ print(f"{maximizing_q: .5f}")
883884
````{exercise}
884885
:label: isd_ex4
885886
886-
Now compute the equilibrium quantity by finding the price that equates supply
887-
and demand.
887+
Now compute the equilibrium quantity by finding the quantity that equates supply and demand.
888888
889889
You can do this numerically by finding the root of the excess demand function
890890
@@ -904,8 +904,7 @@ Initialize `newton` with a starting guess somewhere close to 1.0.
904904
905905
(Similar initial conditions will give the same result.)
906906
907-
You should find that the equilibrium price agrees with the welfare maximizing
908-
price, in line with the first fundamental welfare theorem.
907+
You should find that the equilibrium quantity agrees with the welfare maximizing quantity, in line with the first fundamental welfare theorem.
909908
910909
````
911910

lectures/lake_model.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -541,24 +541,37 @@ Eq. {eq}`steady_x` implies that the long-run unemployment rate will increase, an
541541
if $\alpha$ increases or $\lambda$ decreases.
542542

543543
Suppose first that $\alpha=0.01, \lambda=0.1, d=0.02, b=0.025$.
544-
Assume that $\alpha$ increases to $0.04$.
545544

546-
The below graph illustrates that the line $D$ shifts clockwise downward, which indicates that
547-
the fraction of unemployment rises as the separation rate increases.
545+
Assume that $\alpha$ increases to $0.04$.
548546

549-
```{code-cell} ipython3
550-
fig, ax = plt.subplots(figsize=(10, 8))
547+
Then compare this with a decrease in $\lambda$ from $0.1$ to $0.04$.
551548

552-
lm = LakeModel(α=0.01, λ=0.1, d=0.02, b=0.025)
553-
plot_time_paths(lm, ax=ax)
554-
s=10
555-
ax.plot([0, s * lm.u_bar], [0, s * lm.e_bar], "k--", lw=1, label='set $D$, α=0.01')
549+
The graphs show that both changes rotate the line $D$ clockwise downward, which indicates that the long-run unemployment rate rises.
556550

557-
lm = LakeModel(α=0.04, λ=0.1, d=0.02, b=0.025)
558-
plot_time_paths(lm, ax=ax)
559-
ax.plot([0, s * lm.u_bar], [0, s * lm.e_bar], "r--", lw=1, label='set $D$, α=0.04')
551+
```{code-cell} ipython3
552+
fig, axes = plt.subplots(1, 2, figsize=(12, 5))
553+
s = 10
554+
555+
def add_D_line(ax, lm, label, color):
556+
ax.plot([0, s * lm.u_bar], [0, s * lm.e_bar],
557+
color=color, linestyle='--', lw=2, label=label)
558+
559+
lm_base = LakeModel(α=0.01, λ=0.1, d=0.02, b=0.025)
560+
lm_high_α = LakeModel(α=0.04, λ=0.1, d=0.02, b=0.025)
561+
plot_time_paths(lm_base, ax=axes[0])
562+
add_D_line(axes[0], lm_base, r'set $D$, $\alpha=0.01$', 'black')
563+
plot_time_paths(lm_high_α, ax=axes[0])
564+
add_D_line(axes[0], lm_high_α, r'set $D$, $\alpha=0.04$', 'red')
565+
axes[0].legend(loc='best')
566+
567+
lm_low_λ = LakeModel(α=0.01, λ=0.04, d=0.02, b=0.025)
568+
plot_time_paths(lm_base, ax=axes[1])
569+
add_D_line(axes[1], lm_base, r'set $D$, $\lambda=0.1$', 'black')
570+
plot_time_paths(lm_low_λ, ax=axes[1])
571+
add_D_line(axes[1], lm_low_λ, r'set $D$, $\lambda=0.04$', 'red')
572+
axes[1].legend(loc='best')
560573
561-
ax.legend(loc='best')
574+
plt.tight_layout()
562575
plt.show()
563576
```
564577

0 commit comments

Comments
 (0)