Skip to content

Commit 4642271

Browse files
committed
update expected price notation
1 parent 08dc983 commit 4642271

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

lectures/cobweb.md

Lines changed: 11 additions & 16 deletions
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.1
7+
jupytext_version: 1.16.2
88
kernelspec:
99
display_name: Python 3 (ipykernel)
1010
language: python
@@ -56,7 +56,6 @@ assumptions regarding the way that producers form expectations.
5656

5757
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).
5858

59-
6059
+++
6160

6261
We will use the following imports.
@@ -90,8 +89,6 @@ ax.grid()
9089
plt.show()
9190
```
9291

93-
94-
9592
## The model
9693

9794
Let's return to our discussion of a hypothetical soybean market, where price is determined by supply and demand.
@@ -106,12 +103,12 @@ where $a, b$ are nonnegative constants and $p_t$ is the spot (i.e, current marke
106103

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

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}$.
106+
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^e_t$.
110107

111108
We suppose that supply is nonlinear in expected prices, and takes the form
112109

113110
$$
114-
S(p^t_{t-1}) = \tanh(\lambda(p^t_{t-1} - c)) + d
111+
S(p^e_t) = \tanh(\lambda(p^e_t - c)) + d
115112
$$
116113

117114
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).
@@ -160,13 +157,13 @@ plt.show()
160157
Market equilibrium requires that supply equals demand, or
161158

162159
$$
163-
a - b p_t = S(p^t_{t-1})
160+
a - b p_t = S(p^e_t)
164161
$$
165162

166163
Rewriting in terms of $p_t$ gives
167164

168165
$$
169-
p_t = - \frac{1}{b} [S(p^t_{t-1}) - a]
166+
p_t = - \frac{1}{b} [S(p^e_t) - a]
170167
$$
171168

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

178175
```{math}
179176
:label: p_et
180-
p^t_{t-1} = f(p_{t-1}, p_{t-2})
177+
p^e_t = f(p_{t-1}, p_{t-2})
181178
```
182179

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

205202
In other words,
206203

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

209206
Using {eq}`price_t`, we then have
210207

@@ -408,15 +405,15 @@ That is,
408405

409406
```{math}
410407
:label: pe_adaptive
411-
p_{t-1}^t = \alpha p_{t-1} + (1-\alpha) p^t_{t-2}
408+
p_t^e = \alpha p_{t-1} + (1-\alpha) p^e_{t-1}
412409
\qquad (0 \leq \alpha \leq 1)
413410
```
414411

415412
Another way to write this is
416413

417414
```{math}
418415
:label: pe_adaptive_2
419-
p_{t-1}^t = p^t_{t-2} + \alpha (p_{t-1} - p_{t-2}^t)
416+
p_t^e = p^e_{t-1} + \alpha (p_{t-1} - p_{t-1}^e)
420417
```
421418

422419
This equation helps to show that expectations shift
@@ -427,7 +424,7 @@ This equation helps to show that expectations shift
427424
Using {eq}`pe_adaptive`, we obtain the dynamics
428425

429426
$$
430-
p_t = - \frac{1}{b} [ S(\alpha p_{t-1} + (1-\alpha) p^t_{t-2}) - a]
427+
p_t = - \frac{1}{b} [ S(\alpha p_{t-1} + (1-\alpha) p^e_{t-1}) - a]
431428
$$
432429

433430

@@ -464,7 +461,6 @@ def ts_price_plot_adaptive(model, p0, ts_length=10, α=[1.0, 0.9, 0.75]):
464461

465462
Let's call the function with prices starting at $p_0 = 5$.
466463

467-
468464
```{code-cell} ipython3
469465
ts_price_plot_adaptive(m, 5, ts_length=30)
470466
```
@@ -545,7 +541,7 @@ That is,
545541

546542
```{math}
547543
:label: pe_blae
548-
p_{t-1}^t = \alpha p_{t-1} + (1-\alpha) p_{t-2}
544+
p_t^e = \alpha p_{t-1} + (1-\alpha) p_{t-2}
549545
```
550546

551547

@@ -608,4 +604,3 @@ ts_plot_price_blae(m,
608604
```{code-cell} ipython3
609605
610606
```
611-

0 commit comments

Comments
 (0)