You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lectures/inflation_history.md
+84-6
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ import matplotlib.pyplot as plt
61
61
import matplotlib.dates as mdates
62
62
```
63
63
64
-
Let us bring the data into Pandas from a spreadsheet.
64
+
Let us bring the data into pandas from a spreadsheet.
65
65
66
66
```{code-cell} ipython3
67
67
# import data and clean up the index
@@ -78,6 +78,12 @@ We first plot price levels over the period 1600-1914.
78
78
During most years in this time interval, the countries were on a gold or silver standard.
79
79
80
80
```{code-cell} ipython3
81
+
---
82
+
mystnb:
83
+
figure:
84
+
caption: "Long run time series of the price level"
85
+
name: lrpl
86
+
---
81
87
df_fig5_bef1914 = df_fig5[df_fig5.index <= 1915]
82
88
83
89
# create plot
@@ -144,6 +150,12 @@ Although we didn't have to use logarithms in our earlier graphs that had stopped
144
150
After the outbreak of the Great War in 1914, the four countries left the gold standard and in so doing acquired the ability to print money to finance government expenditures.
145
151
146
152
```{code-cell} ipython3
153
+
---
154
+
mystnb:
155
+
figure:
156
+
caption: "Long run time series of the price level (log)"
157
+
name: lrpl_lg
158
+
---
147
159
fig, ax = plt.subplots(figsize=[8, 5], dpi=200)
148
160
149
161
for col in cols:
@@ -193,7 +205,9 @@ We have added logarithms of the exchange rates vis a vis the US dollar to each o
193
205
from chapter 3 of {cite}`sargent2013rational`.
194
206
195
207
Data underlying our graphs appear in tables in an appendix to chapter 3 of {cite}`sargent2013rational`.
196
-
We have transcribed all of these data into a spreadsheet `chapter_3.xls` that we read into Pandas.
208
+
We have transcribed all of these data into a spreadsheet `chapter_3.xls` that we read into pandas.
209
+
210
+
In the code cell below we clean this data build a `pandas.dataframe`.
197
211
198
212
```{code-cell} ipython3
199
213
:tags: [hide-input]
@@ -252,6 +266,13 @@ def process_df(df):
252
266
df = df.loc[mask]
253
267
254
268
return df
269
+
```
270
+
271
+
Now we write plotting functions so we can make plots of the price level and exchange rates,
272
+
in addition to a plot of inflation rates, for each country of interest.
@@ -419,6 +454,12 @@ The source of our data for Hungary is:
419
454
* Table 3.10, price level $\exp p$ and exchange rate
420
455
421
456
```{code-cell} ipython3
457
+
---
458
+
mystnb:
459
+
figure:
460
+
caption: "Price index and exchange rate (Hungary)"
461
+
name: pi_xrate_hungary
462
+
---
422
463
m_seq = df_Hung['Notes in circulation']
423
464
p_seq = df_Hung['Hungarian index of prices']
424
465
e_seq = 1 / df_Hung['Cents per crown in New York']
@@ -437,6 +478,12 @@ plt.show()
437
478
```
438
479
439
480
```{code-cell} ipython3
481
+
---
482
+
mystnb:
483
+
figure:
484
+
caption: "Monthly inflation rate (Hungary)"
485
+
name: inflationrate_hungary
486
+
---
440
487
# plot moving average
441
488
fig, ax = plt.subplots(figsize=[10,7], dpi=200)
442
489
_ = pr_plot(p_seq, df_Hung.index, ax)
@@ -460,6 +507,12 @@ We dropped the exchange rate after June 1924, when the zloty was adopted. We did
460
507
````
461
508
462
509
```{code-cell} ipython3
510
+
---
511
+
mystnb:
512
+
figure:
513
+
caption: "Price index and exchange rate (Poland)"
514
+
name: pi_xrate_poland
515
+
---
463
516
# splice three price series in different units
464
517
p_seq1 = df_Pol['Wholesale price index'].copy()
465
518
p_seq2 = df_Pol['Wholesale Price Index: '
@@ -500,6 +553,12 @@ plt.show()
500
553
```
501
554
502
555
```{code-cell} ipython3
556
+
---
557
+
mystnb:
558
+
figure:
559
+
caption: "Monthly inflation rate (Poland)"
560
+
name: inflationrate_poland
561
+
---
503
562
# plot moving average
504
563
fig, ax = plt.subplots(figsize=[10,7], dpi=200)
505
564
_ = pr_plot(p_seq, df_Pol.index, ax)
@@ -518,6 +577,12 @@ The sources of our data for Germany are the following tables from chapter 3 of {
518
577
* Table 3.19, exchange rate
519
578
520
579
```{code-cell} ipython3
580
+
---
581
+
mystnb:
582
+
figure:
583
+
caption: "Price index and exchange rate (Germany)"
584
+
name: pi_xrate_germany
585
+
---
521
586
p_seq = df_Germ['Price index (on basis of marks before July 1924,'
522
587
' reichsmarks after)'].copy()
523
588
e_seq = 1/df_Germ['Cents per mark']
@@ -536,6 +601,12 @@ plt.show()
536
601
```
537
602
538
603
```{code-cell} ipython3
604
+
---
605
+
mystnb:
606
+
figure:
607
+
caption: "Price index (adjusted) and exchange rate (Germany)"
608
+
name: piadj_xrate_germany
609
+
---
539
610
p_seq = df_Germ['Price index (on basis of marks before July 1924,'
540
611
' reichsmarks after)'].copy()
541
612
e_seq = 1/df_Germ['Cents per mark'].copy()
@@ -560,6 +631,12 @@ plt.show()
560
631
```
561
632
562
633
```{code-cell} ipython3
634
+
---
635
+
mystnb:
636
+
figure:
637
+
caption: "Monthly inflation rate (Germany)"
638
+
name: inflationrate_germany
639
+
---
563
640
# plot moving average
564
641
fig, ax = plt.subplots(figsize=[10,7], dpi=200)
565
642
_ = pr_plot(p_seq, df_Germ.index, ax)
@@ -578,7 +655,7 @@ These "sudden stops" are also revealed by the permanent drops in three-month mov
578
655
579
656
In addition, the US dollar exchange rates for each of the four countries shadowed their price levels.
580
657
581
-
* This pattern is an instance of a force featured in the **purchasing power parity** theory of exchange rates (see [this wikipedia article](https://en.wikipedia.org/wiki/Purchasing_power_parity)).
658
+
* This pattern is an instance of a force featured in the [purchasing power parity](https://en.wikipedia.org/wiki/Purchasing_power_parity) theory of exchange rates.
582
659
583
660
Each of these big inflations seemed to have "stopped on a dime".
584
661
@@ -611,3 +688,4 @@ Each government stopped printing money to pay for goods and services once again
611
688
The story told in {cite}`sargent2002big` is grounded in a "monetarist theory of the price level" described in {doc}`this lecture <cagan_ree>` and {doc}`this lecture <cagan_adaptive>`.
612
689
613
690
Those lectures discuss theories about what owners of those rapidly depreciating currencies were thinking and how their beliefs shaped responses of inflation to government monetary and fiscal policies.
0 commit comments