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/cobweb.md
+28-30Lines changed: 28 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ because it shows the fundamental importance of *expectations*.
24
24
25
25
To give some idea of how the model operates, and why expectations matter, imagine the following scenario.
26
26
27
-
There is a market for soy beans, say, where prices and traded quantities
27
+
There is a market for soybeans, say, where prices and traded quantities
28
28
depend on the choices of buyers and sellers.
29
29
30
30
The buyers are represented by a demand curve --- they buy more at low prices
@@ -38,11 +38,11 @@ However, the sellers (who are farmers) need time to grow their crops.
38
38
Suppose now that the price is currently high.
39
39
40
40
Seeing this high price, and perhaps expecting that the high price will remain
41
-
for some time, the farmers plant many fields with soy beans.
41
+
for some time, the farmers plant many fields with soybeans.
42
42
43
43
Next period the resulting high supply floods the market, causing the price to drop.
44
44
45
-
Seeing this low price, the farmers now shift out of soy beans, restricting
45
+
Seeing this low price, the farmers now shift out of soybeans, restricting
46
46
supply and causing the price to climb again.
47
47
48
48
You can imagine how these dynamics could cause cycles in prices and quantities
@@ -52,7 +52,7 @@ The cobweb model puts these ideas into equations so we can try to quantify
52
52
them, and to study conditions under which cycles persist (or disappear).
53
53
54
54
In this lecture, we investigate and simulate the basic model under different
55
-
assumptions regarding the way that produces form expectations.
55
+
assumptions regarding the way that producers form expectations.
56
56
57
57
Our discussion and simulations draw on [high quality lectures](https://comp-econ.org/CEF_2013/downloads/Complex%20Econ%20Systems%20Lecture%20II.pdf) by [Cars Hommes](https://www.uva.nl/en/profile/h/o/c.h.hommes/c.h.hommes.html).
58
58
@@ -70,7 +70,7 @@ import matplotlib.pyplot as plt
70
70
71
71
Early papers on the cobweb cycle include {cite}`cobweb_model` and {cite}`hog_cycle`.
72
72
73
-
The paper {cite}`hog_cycle` uses the cobweb theorem to explain the prices of hog in the US over 1920--1950
73
+
The paper {cite}`hog_cycle` uses the cobweb theorem to explain the prices of hog in the US over 1920--1950.
74
74
75
75
The next plot replicates part of Figure 2 from that paper, which plots the price of hogs at yearly frequency.
76
76
@@ -94,9 +94,9 @@ plt.show()
94
94
95
95
## The model
96
96
97
-
Let's return to our discussion of a hypothetical soy bean market, where price is determined by supply and demand.
97
+
Let's return to our discussion of a hypothetical soybean market, where price is determined by supply and demand.
98
98
99
-
We suppose that demand for soy beans is given by
99
+
We suppose that demand for soybeans is given by
100
100
101
101
$$
102
102
D(p_t) = a - b p_t
@@ -106,15 +106,15 @@ where $a, b$ are nonnegative constants and $p_t$ is the spot (i.e, current marke
106
106
107
107
($D(p_t)$ is the quantity demanded in some fixed unit, such as thousands of tons.)
108
108
109
-
Because the crop of soy beans for time $t$ is planted at $t-1$, supply of soy beans at time $t$ depends on *expected* prices at time $t$, which we denote $p^e_{t-1}$.
109
+
Because the crop of soybeans for time $t$ is planted at $t-1$, supply of soybeans at time $t$ depends on *expected* prices at time $t$, which we denote $p^t_{t-1}$.
110
110
111
111
We suppose that supply is nonlinear in expected prices, and takes the form
112
112
113
113
$$
114
-
S(p^e_{t-1}) = \tanh(\lambda(p^e_{t-1} - c)) + d
114
+
S(p^t_{t-1}) = \tanh(\lambda(p^t_{t-1} - c)) + d
115
115
$$
116
116
117
-
where $\lambda$ is a positive constant and $c, d \geq 0$.
117
+
where $\lambda$ is a positive constant, $c, d$ are nonnegative constants and $\tanh$ is a type of [hyperbolic function](https://en.wikipedia.org/wiki/Hyperbolic_functions).
118
118
119
119
Let's make a plot of supply and demand for particular choices of the parameter values.
120
120
@@ -149,7 +149,7 @@ m = Market()
149
149
fig, ax = plt.subplots()
150
150
151
151
ax.plot(p_grid, m.demand(p_grid), label="$D$")
152
-
ax.plot(p_grid, m.supply(p_grid), label="S")
152
+
ax.plot(p_grid, m.supply(p_grid), label="$S$")
153
153
ax.set_xlabel("price")
154
154
ax.set_ylabel("quantity")
155
155
ax.legend()
@@ -160,13 +160,13 @@ plt.show()
160
160
Market equilibrium requires that supply equals demand, or
161
161
162
162
$$
163
-
a - b p_t = S(p^e_{t-1})
163
+
a - b p_t = S(p^t_{t-1})
164
164
$$
165
165
166
166
Rewriting in terms of $p_t$ gives
167
167
168
168
$$
169
-
p_t = - \frac{1}{b} [S(p^e_{t-1}) - a]
169
+
p_t = - \frac{1}{b} [S(p^t_{t-1}) - a]
170
170
$$
171
171
172
172
Finally, to complete the model, we need to describe how price expectations are formed.
@@ -177,7 +177,7 @@ In particular, we suppose that
177
177
178
178
```{math}
179
179
:label: p_et
180
-
p^e_{t-1} = f(p_{t-1}, p_{t-2})
180
+
p^t_{t-1} = f(p_{t-1}, p_{t-2})
181
181
```
182
182
183
183
where $f$ is some function.
@@ -204,7 +204,7 @@ Let's start with naive expectations, which refers to the case where producers ex
204
204
205
205
In other words,
206
206
207
-
$$ p_{t-1}^e = p_{t-1} $$
207
+
$$ p_{t-1}^t = p_{t-1} $$
208
208
209
209
Using {eq}`price_t`, we then have
210
210
@@ -239,9 +239,9 @@ def g(model, current_price):
239
239
return next_price
240
240
```
241
241
242
-
Let's try to understand how prices will evolve using a 45degree diagram, which is a tool for studying one-dimensional dynamics.
242
+
Let's try to understand how prices will evolve using a 45-degree diagram, which is a tool for studying one-dimensional dynamics.
243
243
244
-
The function `plot45` defined below helps us draw the 45degree diagram.
244
+
The function `plot45` defined below helps us draw the 45-degree diagram.
0 commit comments