Skip to content

Commit cc7358e

Browse files
committed
update cagan ree
1 parent a2989a4 commit cc7358e

File tree

1 file changed

+72
-85
lines changed

1 file changed

+72
-85
lines changed

lectures/cagan_ree.md

+72-85
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.14.5
7+
jupytext_version: 1.16.1
88
kernelspec:
99
display_name: Python 3 (ipykernel)
1010
language: python
@@ -18,13 +18,10 @@ kernelspec:
1818

1919
We'll use linear algebra first to explain and then do some experiments with a "monetarist theory of price levels".
2020

21+
Economists call it a "monetary" or "monetarist" theory of price levels because effects on price levels occur via a central banks's decisions to print money supply.
2122

22-
23-
24-
Economist call it a "monetary" or "monetarist" theory of price levels because effects on price levels occur via a central banks's decisions to print money supply.
25-
26-
* a goverment's fiscal policies determine whether it **expenditures** exceed its **tax collections**
27-
* if its expenditures exceeds it tax collections, the government can instruct the central bank to cover the difference by **printing money**
23+
* a goverment's fiscal policies determine whether its *expenditures* exceed its *tax collections*
24+
* if its expenditures exceed its tax collections, the government can instruct the central bank to cover the difference by *printing money*
2825
* that leads to effects on the price level as price level path adjusts to equate the supply of money to the demand for money
2926

3027
Such a theory of price levels was described by Thomas Sargent and Neil Wallace in chapter 5 of
@@ -42,11 +39,11 @@ Elemental forces at work in the fiscal theory of the price level help to underst
4239
According to this theory, when the government persistently spends more than it collects in taxes and prints money to finance the shortfall (the "shortfall" is called the "government deficit"), it puts upward pressure on the price level and generates
4340
persistent inflation.
4441

45-
The ''monetarist'' or ''fiscal theory of price levels" asserts that
42+
The "monetarist" or "fiscal theory of price levels" asserts that
4643

47-
* to **start** a persistent inflation the government beings persistently to run a money-financed government deficit
44+
* to *start* a persistent inflation the government beings persistently to run a money-financed government deficit
4845

49-
* to **stop** a persistent inflation the government stops persistently running a money-financed government deficit
46+
* to *stop* a persistent inflation the government stops persistently running a money-financed government deficit
5047

5148
The model in this lecture is a "rational expectations" (or "perfect foresight") version of a model that Philip Cagan {cite}`Cagan` used to study the monetary dynamics of hyperinflations.
5249

@@ -60,7 +57,7 @@ While Cagan didn't use that "rational expectations" version of the model, Thoma
6057

6158
Some of our quantitative experiments with the rational expectations version of the model are designed to illustrate how the fiscal theory explains the abrupt end of those big inflations.
6259

63-
In those experiments, we'll encounter an instance of a ''velocity dividend'' that has sometimes accompanied successful inflation stabilization programs.
60+
In those experiments, we'll encounter an instance of a "velocity dividend" that has sometimes accompanied successful inflation stabilization programs.
6461

6562
To facilitate using linear matrix algebra as our main mathematical tool, we'll use a finite horizon version of the model.
6663

@@ -90,7 +87,7 @@ To represent the model formally, let
9087
* $T$ the horizon -- i.e., the last period for which the model will determine $p_t$
9188
* $\pi_{T+1}^*$ the terminal rate of inflation between times $T$ and $T+1$.
9289

93-
The demand for real balances $\exp\left(\frac{m_t^d}{p_t}\right)$ is governed by the following version of the Cagan demand function
90+
The demand for real balances $\exp\left(m_t^d - p_t\right)$ is governed by the following version of the Cagan demand function
9491

9592
$$
9693
m_t^d - p_t = -\alpha \pi_t^* \: , \: \alpha > 0 ; \quad t = 0, 1, \ldots, T .
@@ -113,7 +110,7 @@ while equating demand for money to supply lets us set $m_t^d = m_t$ for all $t \
113110
The preceding equations then imply
114111
115112
$$
116-
m_t - p_t = -\alpha(p_{t+1} - p_t) \: , \: \alpha > 0
113+
m_t - p_t = -\alpha(p_{t+1} - p_t)
117114
$$ (eq:cagan)
118115
119116
To fill in details about what it means for private agents
@@ -132,7 +129,7 @@ $$
132129
133130
where $ 0< \frac{\alpha}{1+\alpha} <1 $.
134131
135-
Setting $\delta =\frac{\alpha}{1+\alpha}$ let's us represent the preceding equation as
132+
Setting $\delta =\frac{\alpha}{1+\alpha}$, let's us represent the preceding equation as
136133
137134
$$
138135
\pi_t = \delta \pi_{t+1} + (1-\delta) \mu_t , \quad t =0, 1, \ldots, T
@@ -246,41 +243,33 @@ First, we store parameters in a `namedtuple`:
246243
```{code-cell} ipython3
247244
# Create the rational expectation version of Cagan model in finite time
248245
CaganREE = namedtuple("CaganREE",
249-
["m0", "T", "μ_seq", "α", "δ", "π_end"])
246+
["m0", "μ_seq", "α", "δ", "π_end"])
250247
251-
def create_cagan_model(m0, α, T, μ_seq):
248+
def create_cagan_model(m0=1, # Initial money supply
249+
α=5, # Sensitivity parameter
250+
μ_seq=None # Rate of growth
251+
):
252252
δ = α/(1 + α)
253253
π_end = μ_seq[-1] # compute terminal expected inflation
254-
return CaganREE(m0, T, μ_seq, α, δ, π_end)
255-
```
256-
257-
Here we use the following parameter values:
258-
259-
```{code-cell} ipython3
260-
# parameters
261-
T = 80
262-
T1 = 60
263-
α = 5
264-
m0 = 1
265-
266-
μ0 = 0.5
267-
μ_star = 0
254+
return CaganREE(m0, μ_seq, α, δ, π_end)
268255
```
269256
270257
Now we can solve the model to compute $\pi_t$, $m_t$ and $p_t$ for $t =1, \ldots, T+1$ using the matrix equation above
271258
272259
```{code-cell} ipython3
273-
def solve(model):
274-
model_params = model.m0, model.T, model.π_end, model.μ_seq, model.α, model.δ
275-
m0, T, π_end, μ_seq, α, δ = model_params
260+
def solve(model, T):
261+
m0, π_end, μ_seq, α, δ = (model.m0, model.π_end,
262+
model.μ_seq, model.α, model.δ)
263+
264+
# Create matrix representation above
276265
A1 = np.eye(T+1, T+1) - δ * np.eye(T+1, T+1, k=1)
277266
A2 = np.eye(T+1, T+1) - np.eye(T+1, T+1, k=-1)
278267
279268
b1 = (1-δ) * μ_seq + np.concatenate([np.zeros(T), [δ * π_end]])
280269
b2 = μ_seq + np.concatenate([[m0], np.zeros(T)])
281270
282-
π_seq = np.linalg.inv(A1) @ b1
283-
m_seq = np.linalg.inv(A2) @ b2
271+
π_seq = np.linalg.solve(A1, b1)
272+
m_seq = np.linalg.solve(A2, b2)
284273
285274
π_seq = np.append(π_seq, π_end)
286275
m_seq = np.append(m0, m_seq)
@@ -325,46 +314,41 @@ $$
325314
\end{cases}
326315
$$
327316
328-
We'll start by executing a version of our "experiment 1" in which the government implements a **foreseen** sudden permanent reduction in the rate of money creation at time $T_1$.
317+
We'll start by executing a version of our "experiment 1" in which the government implements a *foreseen* sudden permanent reduction in the rate of money creation at time $T_1$.
329318
330-
The following code performs the experiment and plots outcomes.
319+
+++
320+
321+
Let's experiment with the following parameters
331322
332323
```{code-cell} ipython3
333-
def solve_and_plot(m0, α, T, μ_seq):
334-
model_params = create_cagan_model(m0=m0, α=α, T=T, μ_seq=μ_seq)
335-
π_seq, m_seq, p_seq = solve(model_params)
336-
T_seq = range(T + 2)
337-
338-
fig, ax = plt.subplots(5, figsize=[5, 12], dpi=200)
339-
340-
ax[0].plot(T_seq[:-1], μ_seq)
341-
ax[0].set_ylabel(r'$\mu$')
324+
T1 = 60
325+
μ0 = 0.5
326+
μ_star = 0
327+
T = 80
342328
343-
ax[1].plot(T_seq, π_seq)
344-
ax[1].set_ylabel(r'$\pi$')
329+
μ_seq_1 = np.append(μ0*np.ones(T1+1), μ_star*np.ones(T-T1))
345330
346-
ax[2].plot(T_seq, m_seq - p_seq)
347-
ax[2].set_ylabel(r'$m - p$')
331+
cm = create_cagan_model(μ_seq=μ_seq_1)
348332
349-
ax[3].plot(T_seq, m_seq)
350-
ax[3].set_ylabel(r'$m$')
333+
# solve the model
334+
π_seq_1, m_seq_1, p_seq_1 = solve(cm, T)
335+
```
351336
352-
ax[4].plot(T_seq, p_seq)
353-
ax[4].set_ylabel(r'$p$')
354-
355-
for i in range(5):
356-
ax[i].set_xlabel(r'$t$')
357-
337+
Now we use the following function to plot the result
338+
339+
```{code-cell} ipython3
340+
def plot_sequences(sequences, labels):
341+
fig, axs = plt.subplots(len(sequences), 1, figsize=[5, 12], dpi=200)
342+
for ax, seq, label in zip(axs, sequences, labels):
343+
ax.plot(range(len(seq)), seq, label=label)
344+
ax.set_ylabel(label)
345+
ax.set_xlabel('$t$')
346+
ax.legend()
358347
plt.tight_layout()
359348
plt.show()
360-
361-
return π_seq, m_seq, p_seq
362-
363-
μ_seq_1 = np.append(μ0*np.ones(T1+1), μ_star*np.ones(T-T1))
364349
365-
# solve and plot
366-
π_seq_1, m_seq_1, p_seq_1 = solve_and_plot(m0=m0, α=α,
367-
T=T, μ_seq=μ_seq_1)
350+
sequences = [μ_seq_1, π_seq_1, m_seq_1 - p_seq_1, m_seq_1, p_seq_1]
351+
plot_sequences(sequences, [r'$\mu$', r'$\pi$', r'$m - p$', r'$m$', r'$p$'])
368352
```
369353
370354
+++ {"user_expressions": []}
@@ -406,7 +390,7 @@ was completely unanticipated.
406390
407391
At time $T_1$ when the "surprise" money growth rate change occurs, to satisfy
408392
equation {eq}`eq:pformula2`, the log of real balances jumps
409-
**upward** as $\pi_t$ jumps **downward**.
393+
*upward* as $\pi_t$ jumps *downward*.
410394
411395
But in order for $m_t - p_t$ to jump, which variable jumps, $m_{T_1}$ or $p_{T_1}$?
412396
@@ -428,7 +412,7 @@ $$
428412
m_{T_1}^2 - m_{T_1}^1 = \alpha (\pi^1 - \pi^2)
429413
$$ (eq:eqnmoneyjump)
430414
431-
By letting money jump according to equation {eq}`eq:eqnmoneyjump` the monetary authority prevents the price level from **falling** at the moment that the unanticipated stabilization arrives.
415+
By letting money jump according to equation {eq}`eq:eqnmoneyjump` the monetary authority prevents the price level from *falling* at the moment that the unanticipated stabilization arrives.
432416
433417
In various research papers about stabilizations of high inflations, the jump in the money supply described by equation {eq}`eq:eqnmoneyjump` has been called
434418
"the velocity dividend" that a government reaps from implementing a regime change that sustains a permanently lower inflation rate.
@@ -503,16 +487,15 @@ The following code does the calculations and plots outcomes.
503487
# path 1
504488
μ_seq_2_path1 = μ0 * np.ones(T+1)
505489
506-
mc1 = create_cagan_model(m0=m0, α=α,
507-
T=T, μ_seq=μ_seq_2_path1)
508-
π_seq_2_path1, m_seq_2_path1, p_seq_2_path1 = solve(mc1)
490+
cm1 = create_cagan_model(μ_seq=μ_seq_2_path1)
491+
π_seq_2_path1, m_seq_2_path1, p_seq_2_path1 = solve(cm1, T)
509492
510493
# continuation path
511494
μ_seq_2_cont = μ_star * np.ones(T-T1)
512495
513-
mc2 = create_cagan_model(m0=m_seq_2_path1[T1+1],
514-
α=α, T=T-1-T1, μ_seq=μ_seq_2_cont)
515-
π_seq_2_cont, m_seq_2_cont1, p_seq_2_cont1 = solve(mc2)
496+
cm2 = create_cagan_model(m0=m_seq_2_path1[T1+1],
497+
μ_seq=μ_seq_2_cont)
498+
π_seq_2_cont, m_seq_2_cont1, p_seq_2_cont1 = solve(cm2, T-1-T1)
516499
517500
518501
# regime 1 - simply glue π_seq, μ_seq
@@ -526,11 +509,10 @@ p_seq_2_regime1 = np.concatenate([p_seq_2_path1[:T1+1],
526509
p_seq_2_cont1])
527510
528511
# regime 2 - reset m_T1
529-
m_T1 = (m_seq_2_path1[T1] + μ0) + α*(μ0 - μ_star)
512+
m_T1 = (m_seq_2_path1[T1] + μ0) + cm2.α*(μ0 - μ_star)
530513
531-
mc = create_cagan_model(m0=m_T1, α=α,
532-
T=T-1-T1, μ_seq=μ_seq_2_cont)
533-
π_seq_2_cont2, m_seq_2_cont2, p_seq_2_cont2 = solve(mc)
514+
cm3 = create_cagan_model(m0=m_T1, μ_seq=μ_seq_2_cont)
515+
π_seq_2_cont2, m_seq_2_cont2, p_seq_2_cont2 = solve(cm3, T-1-T1)
534516
535517
m_seq_2_regime2 = np.concatenate([m_seq_2_path1[:T1+1],
536518
m_seq_2_cont2])
@@ -541,7 +523,7 @@ T_seq = range(T+2)
541523
542524
# plot both regimes
543525
fig, ax = plt.subplots(5, 1, figsize=[5, 12], dpi=200)
544-
526+
545527
ax[0].plot(T_seq[:-1], μ_seq_2)
546528
ax[0].set_ylabel(r'$\mu$')
547529
@@ -640,7 +622,6 @@ plt.tight_layout()
640622
plt.show()
641623
```
642624
643-
644625
It is instructive to compare the preceding graphs with graphs of log price levels and inflation rates for data from four big inflations described in
645626
{doc}`this lecture <inflation_history>`.
646627
@@ -665,24 +646,30 @@ $$
665646
\mu_t = \phi^t \mu_0 + (1 - \phi^t) \mu^* .
666647
$$
667648
668-
Next we perform an experiment in which there is a perfectly foreseen **gradual** decrease in the rate of growth of the money supply.
649+
Next we perform an experiment in which there is a perfectly foreseen *gradual* decrease in the rate of growth of the money supply.
669650
670651
The following code does the calculations and plots the results.
671652
672653
```{code-cell} ipython3
673654
# parameters
674655
ϕ = 0.9
675-
μ_seq = np.array([ϕ**t * μ0 + (1-ϕ**t)*μ_star for t in range(T)])
676-
μ_seq = np.append(μ_seq, μ_star)
656+
μ_seq_stab = np.array([ϕ**t * μ0 + (1-ϕ**t)*μ_star for t in range(T)])
657+
μ_seq_stab = np.append(μ_seq_stab, μ_star)
677658
659+
cm4 = create_cagan_model(μ_seq=μ_seq_stab)
678660
679-
# solve and plot
680-
π_seq, m_seq, p_seq = solve_and_plot(m0=m0, α=α, T=T, μ_seq=μ_seq)
661+
π_seq_4, m_seq_4, p_seq_4 = solve(cm4, T)
662+
663+
sequences = [μ_seq_stab, π_seq_4,
664+
m_seq_4 - p_seq_4, m_seq_4, p_seq_4]
665+
plot_sequences(sequences, [r'$\mu$', r'$\pi$',
666+
r'$m - p$', r'$m$', r'$p$'])
681667
```
668+
682669
## Sequel
683670
684671
Another lecture {doc}`monetarist theory of price levels with adaptive expectations <cagan_adaptive>` describes an "adaptive expectations" version of Cagan's model.
685672
686673
The dynamics become more complicated and so does the algebra.
687674
688-
Nowadays, the "rational expectations" version of the model is more popular among central bankers and economists advising them.
675+
Nowadays, the "rational expectations" version of the model is more popular among central bankers and economists advising them.

0 commit comments

Comments
 (0)