Skip to content

Commit 6698508

Browse files
authored
Merge pull request #155 from QuantEcon/fix_cobweb
Fix cobweb notation
2 parents 8cc0d43 + d68b728 commit 6698508

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

lectures/cobweb.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ where $a, b$ are nonnegative constants and $p_t$ is the spot (i.e, current marke
106106

107107
($D(p_t)$ is the quantity demanded in some fixed unit, such as thousands of tons.)
108108

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$.
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}$.
110110

111111
We suppose that supply is nonlinear in expected prices, and takes the form
112112

113113
$$
114-
S(p^e_t) = \tanh(\lambda(p^e_t - c)) + d
114+
S(p^e_{t-1}) = \tanh(\lambda(p^e_{t-1} - c)) + d
115115
$$
116116

117117
where $\lambda$ is a positive constant and $c, d \geq 0$.
@@ -160,13 +160,13 @@ plt.show()
160160
Market equilibrium requires that supply equals demand, or
161161

162162
$$
163-
a - b p_t = S(p^e_t)
163+
a - b p_t = S(p^e_{t-1})
164164
$$
165165

166166
Rewriting in terms of $p_t$ gives
167167

168168
$$
169-
p_t = - \frac{1}{b} [S(p^e_t) - a]
169+
p_t = - \frac{1}{b} [S(p^e_{t-1}) - a]
170170
$$
171171

172172
Finally, to complete the model, we need to describe how price expectations are formed.
@@ -177,7 +177,7 @@ In particular, we suppose that
177177

178178
```{math}
179179
:label: p_et
180-
p^e_t = f(p_{t-1}, p_{t-2})
180+
p^e_{t-1} = f(p_{t-1}, p_{t-2})
181181
```
182182

183183
where $f$ is some function.
@@ -204,7 +204,7 @@ Let's start with naive expectations, which refers to the case where producers ex
204204

205205
In other words,
206206

207-
$$ p_t^e = p_{t-1} $$
207+
$$ p_{t-1}^e = p_{t-1} $$
208208

209209
Using {eq}`price_t`, we then have
210210

@@ -276,7 +276,7 @@ def plot45(model, pmin, pmax, p0, num_arrows=5):
276276
alpha=0.6, head_length=hl)
277277
278278
ax.plot(pgrid, g(model, pgrid), 'b-',
279-
lw=2, alpha=0.6, label='p')
279+
lw=2, alpha=0.6, label='g')
280280
ax.plot(pgrid, pgrid, lw=1, alpha=0.7, label='45')
281281
282282
x = p0
@@ -408,15 +408,15 @@ That is,
408408

409409
```{math}
410410
:label: pe_adaptive
411-
p_t^e = \alpha p_{t-1} + (1-\alpha) p^e_{t-1}
411+
p_{t-1}^e = \alpha p_{t-1} + (1-\alpha) p^e_{t-2}
412412
\qquad (0 \leq \alpha \leq 1)
413413
```
414414

415415
Another way to write this is
416416

417417
```{math}
418418
:label: pe_adaptive_2
419-
p_t^e = p^e_{t-1} + \alpha (p_{t-1} - p_{t-1}^e)
419+
p_{t-1}^e = p^e_{t-2} + \alpha (p_{t-1} - p_{t-2}^e)
420420
```
421421

422422
This equation helps to show that expectations shift
@@ -427,7 +427,7 @@ This equation helps to show that expectations shift
427427
Using {eq}`pe_adaptive`, we obtain the dynamics
428428

429429
$$
430-
p_t = - \frac{1}{b} [ S(\alpha p_{t-1} + (1-\alpha) p^e_{t-1}) - a]
430+
p_t = - \frac{1}{b} [ S(\alpha p_{t-1} + (1-\alpha) p^e_{t-2}) - a]
431431
$$
432432

433433

@@ -547,7 +547,7 @@ That is,
547547

548548
```{math}
549549
:label: pe_blae
550-
p_t^e = \alpha p_{t-1} + (1-\alpha) p_{t-2}
550+
p_{t-1}^e = \alpha p_{t-1} + (1-\alpha) p_{t-2}
551551
```
552552

553553

@@ -610,3 +610,4 @@ ts_plot_price_blae(m,
610610
```{code-cell} ipython3
611611
612612
```
613+

0 commit comments

Comments
 (0)