Skip to content

Promote lectures to the intro series and update related files #405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Humphrey's 20 Mar updates on math aligned syntax
  • Loading branch information
HumphreyYang committed Mar 19, 2024
commit 0a437231b705f49bed0c35e22bad706af01c9e8a
36 changes: 18 additions & 18 deletions lectures/ak2.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ $$
To maximize profits a firm equates marginal products to rental rates:

$$
\begin{align}
\begin{aligned}
W_t & = (1-\alpha) K_t^\alpha L_t^{-\alpha} \\
r_t & = \alpha K_t^\alpha L_t^{1-\alpha}
\end{align}
\end{aligned}
$$ (eq:firmfonc)

Output can either be consumed by old or young households, sold to young households who use it to augment the capital stock, or sold to the government for uses that do not generate utility for the people in the model (e.g., ``thrown into the ocean'').
Expand Down Expand Up @@ -275,10 +275,10 @@ $$ (eq:utilfn)
subject to the following budget constraints at times $t$ and $t+1$:

$$
\begin{align}
\begin{aligned}
C_{yt} + A_{t+1} & = W_t (1 - \tau_t) - \delta_{yt} \\
C_{ot+1} & = (1+ r_{t+1} (1 - \tau_{t+1}))A_{t+1} - \delta_{ot}
\end{align}
\end{aligned}
$$ (eq:twobudgetc)


Expand All @@ -291,9 +291,9 @@ $$ (eq:onebudgetc)
To solve the young household's choice problem, form a Lagrangian

$$
\begin{align}
\begin{aligned}
{\mathcal L} & = C_{yt}^\beta C_{o,t+1}^{1-\beta} \\ & + \lambda \Bigl[ C_{yt} + \frac{C_{ot+1}}{1 + r_{t+1}(1 - \tau_{t+1})} - W_t (1 - \tau_t) + \delta_{yt} + \frac{\delta_{ot}}{1 + r_{t+1}(1 - \tau_{t+1})}\Bigr],
\end{align}
\end{aligned}
$$ (eq:lagC)

where $\lambda$ is a Lagrange multiplier on the intertemporal budget constraint {eq}`eq:onebudgetc`.
Expand All @@ -303,10 +303,10 @@ After several lines of algebra, the intertemporal budget constraint {eq}`eq:oneb
imply that an optimal consumption plan satisfies

$$
\begin{align}
\begin{aligned}
C_{yt} & = \beta \Bigl[ W_t (1 - \tau_t) - \delta_{yt} - \frac{\delta_{ot}}{1 + r_{t+1}(1 - \tau_{t+1})}\Bigr] \\
\frac{C_{0t+1}}{1 + r_{t+1}(1-\tau_{t+1}) } & = (1-\beta) \Bigl[ W_t (1 - \tau_t) - \delta_{yt} - \frac{\delta_{ot}}{1 + r_{t+1}(1 - \tau_{t+1})}\Bigr]
\end{align}
\end{aligned}
$$ (eq:optconsplan)

The first-order condition for minimizing Lagrangian {eq}`eq:lagC` with respect to the Lagrange multipler $\lambda$ recovers the budget constraint {eq}`eq:onebudgetc`,
Expand Down Expand Up @@ -352,10 +352,10 @@ As our special case of {eq}`eq:optconsplan`, we compute the following consumptio


$$
\begin{align}
\begin{aligned}
C_{yt} & = \beta (1 - \tau_t) W_t \\
A_{t+1} &= (1-\beta) (1- \tau_t) W_t
\end{align}
\end{aligned}
$$

Using {eq}`eq:firmfonc` and $A_t = K_t + D_t$, we obtain the following closed form transition law for capital:
Expand All @@ -369,20 +369,20 @@ $$ (eq:Klawclosed)
From {eq}`eq:Klawclosed` and the government budget constraint {eq}`eq:govbudgetsequence`, we compute **time-invariant** or **steady state values** $\hat K, \hat D, \hat T$:

$$
\begin{align}
\begin{aligned}
\hat{K} &=\hat{K}\left(1-\hat{\tau}\right)\left(1-\alpha\right)\left(1-\beta\right) - \hat{D} \\
\hat{D} &= (1 + \hat{r}) \hat{D} + \hat{G} - \hat{T} \\
\hat{T} &= \hat{\tau} \hat{Y} + \hat{\tau} \hat{r} \hat{D} .
\end{align}
\end{aligned}
$$ (eq:steadystates)

These imply

$$
\begin{align}
\begin{aligned}
\hat{K} &= \left[\left(1-\hat{\tau}\right)\left(1-\alpha\right)\left(1-\beta\right)\right]^{\frac{1}{1-\alpha}} \\
\hat{\tau} &= \frac{\hat{G} + \hat{r} \hat{D}}{\hat{Y} + \hat{r} \hat{D}}
\end{align}
\end{aligned}
$$

Let's take an example in which
Expand All @@ -393,11 +393,11 @@ Let's take an example in which
Our formulas for steady-state values tell us that

$$
\begin{align}
\begin{aligned}
\hat{D} &= 0 \\
\hat{G} &= 0.15 \hat{Y} \\
\hat{\tau} &= 0.15 \\
\end{align}
\end{aligned}
$$


Expand Down Expand Up @@ -699,12 +699,12 @@ To illustrate the power of `ClosedFormTrans`, let's first experiment with the fo
The following equations completely characterize the equilibrium transition path originating from the initial steady state

$$
\begin{align}
\begin{aligned}
K_{t+1} &= K_{t}^{\alpha}\left(1-\tau_{t}\right)\left(1-\alpha\right)\left(1-\beta\right) - \bar{D} \\
\tau_{0} &= (1-\frac{1}{3}) \hat{\tau} \\
\bar{D} &= \hat{G} - \tau_0\hat{Y} \\
\quad\tau_{t} & =\frac{\hat{G}+r_{t} \bar{D}}{\hat{Y}+r_{t} \bar{D}}
\end{align}
\end{aligned}
$$

We can simulate the transition of the economy for $20$ periods, after which the economy will be fairly close to the new steady state.
Expand Down
24 changes: 12 additions & 12 deletions lectures/money_inflation.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,21 +192,21 @@ This is true in the present model.

In a **steady state** equilibrium of the model we are studying,

\begin{align}
\begin{aligned}
R_t & = \bar R \cr
b_t & = \bar b
\end{align}
\end{aligned}

for $t \geq 0$.

Notice that both $R_t = \frac{p_t}{p_{t+1}}$ and $b_t = \frac{m_{t+1}}{p_t} $ are **ratios**.

To compute a steady state, we seek gross rates of return on currency $\bar R, \bar b$ that satisfy steady-state versions of both the government budget constraint and the demand function for real balances:

\begin{align}
\begin{aligned}
g & = \bar b ( 1 - \bar R) \cr
\bar b & = \gamma_1- \gamma_2 \bar R^{-1}
\end{align}
\end{aligned}

Together these equations imply

Expand Down Expand Up @@ -379,10 +379,10 @@ We shall deploy two distinct computation strategies.
* set $R_0 \in [\frac{\gamma_2}{\gamma_1}, R_u]$ and compute $b_0 = \gamma_1 - \gamma_2/R_0$.

* compute sequences $\{R_t, b_t\}_{t=1}^\infty$ of rates of return and real balances that are associated with an equilibrium by solving equation {eq}`eq:bmotion` and {eq}`eq:bdemand` sequentially for $t \geq 1$:
\begin{align}
\begin{aligned}
b_t & = b_{t-1} R_{t-1} + g \cr
R_t^{-1} & = \frac{\gamma_1}{\gamma_2} - \gamma_2^{-1} b_t
\end{align}
\end{aligned}

* Construct the associated equilibrium $p_0$ from

Expand All @@ -393,10 +393,10 @@ R_t^{-1} & = \frac{\gamma_1}{\gamma_2} - \gamma_2^{-1} b_t
* compute $\{p_t, m_t\}_{t=1}^\infty$ by solving the following equations sequentially

$$
\begin{align}
\begin{aligned}
p_t & = R_t p_{t-1} \cr
m_t & = b_{t-1} p_t
\end{align}
\end{aligned}
$$ (eq:method1)

**Remark 1:** method 1 uses an indirect approach to computing an equilibrium by first computing an equilibrium $\{R_t, b_t\}_{t=0}^\infty$ sequence and then using it to back out an equilibrium $\{p_t, m_t\}_{t=0}^\infty$ sequence.
Expand Down Expand Up @@ -458,10 +458,10 @@ Start at $t=0$

Then for $t \geq 1$ construct $(b_t, R_t)$ by
iterating on the system
\begin{align}
\begin{aligned}
b_t & = b_{t-1} R_{t-1} + g \cr
R_t^{-1} & = \frac{\gamma_1}{\gamma_2} - \gamma_2^{-1} b_t
\end{align}
\end{aligned}


When we implement this part of method 1, we shall discover the following striking
Expand Down Expand Up @@ -605,11 +605,11 @@ $$

where

\begin{align} H_1 & = \begin{bmatrix} 1 & \gamma_2 \cr
\begin{aligned} H_1 & = \begin{bmatrix} 1 & \gamma_2 \cr
1 & 0 \end{bmatrix} \cr
H_2 & = \begin{bmatrix} 0 & \gamma_1 \cr
1 & g \end{bmatrix}
\end{align}
\end{aligned}

```{code-cell} ipython3
H1 = np.array([[1, msm.γ2],
Expand Down
24 changes: 12 additions & 12 deletions lectures/unpleasant.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,19 @@ Just before time $0$, the government chooses $(m_0, B_{-1})$ subject to constra
For $t =0, 1, \ldots, T-1$,

$$
\begin{align}
\begin{aligned}
B_t & = \widetilde R B_{t-1} + g \cr
m_{t+1} & = m_0
\end{align}
\end{aligned}
$$

while for $t \geq T$,

$$
\begin{align}
\begin{aligned}
B_t & = B_{T-1} \cr
m_{t+1} & = m_t + p_t \overline g
\end{align}
\end{aligned}
$$

where
Expand Down Expand Up @@ -188,21 +188,21 @@ For reasons described at the end of **this lecture**, we select the larger root
Next, we compute

$$
\begin{align}
\begin{aligned}
R_T & = R_u \cr
b_T & = \gamma_1 - \gamma_2 R_u^{-1} \cr
p_T & = \frac{m_0}{\gamma_1 - \overline g - \gamma_2 R_u^{-1}}
\end{align}
\end{aligned}
$$ (eq:LafferTstationary)


We can compute continuation sequences $\{R_t, b_t\}_{t=T+1}^\infty$ of rates of return and real balances that are associated with an equilibrium by solving equation {eq}`eq:up_bmotion` and {eq}`eq:up_bdemand` sequentially for $t \geq 1$:
\begin{align}
\begin{aligned}
b_t & = b_{t-1} R_{t-1} + \overline g \cr
R_t^{-1} & = \frac{\gamma_1}{\gamma_2} - \gamma_2^{-1} b_t \cr
p_t & = R_t p_{t-1} \cr
m_t & = b_{t-1} p_t
\end{align}
\end{aligned}



Expand All @@ -219,22 +219,22 @@ Our restrictions that $\gamma_1 > \gamma_2 > 0$ imply that $\lambda \in [0,1)$.
We want to compute

$$
\begin{align}
\begin{aligned}
p_0 & = \gamma_1^{-1} \left[ \sum_{j=0}^\infty \lambda^j m_{1+j} \right] \cr
& = \gamma_1^{-1} \left[ \sum_{j=0}^{T-1} \lambda^j m_{0} + \sum_{j=T}^\infty \lambda^j m_{1+j} \right]
\end{align}
\end{aligned}
$$

Thus,

$$
\begin{align}
\begin{aligned}
p_0 & = \gamma_1^{-1} m_0 \left\{ \frac{1 - \lambda^T}{1-\lambda} + \frac{\lambda^T}{R_u-\lambda} \right\} \cr
p_1 & = \gamma_1^{-1} m_0 \left\{ \frac{1 - \lambda^{T-1}}{1-\lambda} + \frac{\lambda^{T-1}}{R_u-\lambda} \right\} \cr
\quad \vdots & \quad \quad \vdots \cr
p_{T-1} & = \gamma_1^{-1} m_0 \left\{ \frac{1 - \lambda}{1-\lambda} + \frac{\lambda}{R_u-\lambda} \right\} \cr
p_T & = \gamma_1^{-1} m_0 \left\{\frac{1}{R_u-\lambda} \right\}
\end{align}
\end{aligned}
$$ (eq:allts)

We can implement the preceding formulas by iterating on
Expand Down