Skip to content

Commit 6e8a3ef

Browse files
Team's edits of demand-supply work
1 parent 24bee48 commit 6e8a3ef

File tree

1 file changed

+43
-11
lines changed

1 file changed

+43
-11
lines changed

in-work/quantecon_undergrad_notes_tom_3.md

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ $$
6565
**Producer surplus** equals $p q$ minus the area under an inverse supply curve:
6666

6767
$$
68-
p q - \int_0^q (s_0 + s_1 x) dx
68+
p q - \int_0^q (s_0 + s_1 x) dx = pq - s_0 q - .5 s_1 q^2
6969
$$
7070

7171
Intimately associated with a competitive equilibrium is the following:
@@ -82,7 +82,9 @@ $$
8282
\textrm{Welf} = (d_0 - s_0) q - .5 (d_1 + s_1) q^2
8383
$$
8484

85-
The quantity that maximizes welfare criterion $\textrm{Welf}$ is
85+
To compute the quantity that maximizes welfare criterion $\textrm{Welf}$, we differentiate $\textrm{Welf}$ with respect to $q$ and set the derivative to zero.
86+
87+
Solving that equation for $q$ gives
8688

8789
$$
8890
q = \frac{ d_0 - s_0}{s_1 + d_1}
@@ -108,7 +110,7 @@ It also brings us a convenient **competitive equilibrium computation strategy:**
108110
Soon we'll derive generalizations of the above demand and supply
109111
curves from other objects.
110112
111-
We'll derive the **demand** curve from a **utility maximization problem**.
113+
We'll derive the **demand curve** from a problem that maximizes a **utility function** subject to a **budget constraint**.
112114
113115
We'll derive the **supply curve** from a **cost function**.
114116
@@ -135,9 +137,15 @@ $$
135137
136138
## From utility function to demand curve
137139
138-
Let $\Pi$ be an $n\times n$ matrix, $c$ be $n \times 1$ vector of consumptions of various goods, $b$ be $n \times 1$ vector of bliss points, $e$ an $n \times 1$ vector of endowments, and $p$ be an $n\times 1$ vector of prices
140+
Let
141+
142+
* $\Pi$ be an $n\times n$ matrix of XXXX,
143+
* $c$ be an $n \times 1$ vector of consumptions of various goods,
144+
* $b$ be an $n \times 1$ vector of bliss points,
145+
* $e$ be an $n \times 1$ vector of endowments, and
146+
* $p$ be an $n\times 1$ vector of prices
139147
140-
A consumer faces $p$ as a price taker and chooses $c$ to maximize
148+
A consumer faces $p$ as a price taker and chooses $c$ to maximize the utility function
141149
142150
$$
143151
-.5 (\Pi c -b) ^\top (\Pi c -b )
@@ -212,7 +220,7 @@ $$ (eq:old4)
212220
213221
Equation {eq}`eq:old4` tells how marginal utility of wealth depends on the endowment vector $e$ and the price vector $p$.
214222
215-
**Remark:** Equation {eq}`eq:old4` is a consequence of imposing that $p (c - e) = 0$. We could instead take $\mu$ as a parameter and use {eq}`eq:old3` and the budget constraint {eq}`eq:old2p` to solve for $W.$ Which way we proceed determines whether we are constructing a **Marshallian** or **Hicksian** demand curve.
223+
**Remark:** Equation {eq}`eq:old4` is a consequence of imposing that $p^\top (c - e) = 0$. We could instead take $\mu$ as a parameter and use {eq}`eq:old3` and the budget constraint {eq}`eq:old2p` to solve for $W.$ Which way we proceed determines whether we are constructing a **Marshallian** or **Hicksian** demand curve.
216224
217225
## Endowment economy, I
218226
@@ -277,7 +285,7 @@ $$ (eq:old6)
277285
We can normalize prices by setting $\mu_1 + \mu_2 =1$ and then deducing
278286
279287
$$
280-
\mu_i(p,e) = \frac{p^\top (\Pi^{-1} bi - e_i)}{p^\top (\Pi^\top \Pi )^{-1} p}
288+
\mu_i(p,e) = \frac{p^\top (\Pi^{-1} b_i - e_i)}{p^\top (\Pi^\top \Pi )^{-1} p}
281289
$$ (eq:old7)
282290
283291
for $\mu_i, i = 1,2$.
@@ -325,7 +333,7 @@ To capture this with our quadratic utility function {eq}`eq:old0`, set
325333
326334
$$
327335
\Pi = \begin{bmatrix} 1 & 0 \cr
328-
1 & \sqrt{\beta} \end{bmatrix}
336+
0 & \sqrt{\beta} \end{bmatrix}
329337
$$
330338
331339
and
@@ -335,7 +343,7 @@ b = \begin{bmatrix} b_1 \cr \sqrt{\beta} b_2
335343
\end{bmatrix}
336344
$$
337345
338-
The budget constraint becomes
346+
The budget constraint {eq}`eq:old2` becomes
339347
340348
$$
341349
p_1 c_1 + p_2 c_2 = p_1 e_1 + p_2 e_2
@@ -375,8 +383,8 @@ where
375383
To capture these preferences we set
376384
377385
$$
378-
\Pi = \begin{bmatrix} \lambda & 0 \cr
379-
0 & (1-\lambda) \end{bmatrix}
386+
\Pi = \begin{bmatrix} \sqrt{\lambda} & 0 \cr
387+
0 & \sqrt{1-\lambda} \end{bmatrix}
380388
$$
381389
382390
$$
@@ -401,8 +409,12 @@ $$
401409
402410
where $p_i$ is the price of one unit of consumption in state $i$.
403411
412+
The state commodities being traded are often called **Arrow securities**.
413+
404414
Before the random state of the world $i$ is realized, the consumer sells his/her state-contingent endowment bundle and purchases a state-contingent consumption bundle.
405415
416+
Trading such securities is a way economists often model **insurance**.
417+
406418
## Possible Exercises
407419
408420
To illustrate consequences of demand and supply shifts, we have lots of parameters to shift in the above models
@@ -519,3 +531,23 @@ Thus, in the multiple case as for the single-good case, a competitive equilibri
519531
520532
We can read the competitive equilbrium price vector off the inverse demand curve or the inverse supply curve.
521533
534+
535+
536+
## To do
537+
538+
Tom has multi consumer version of pure exchange economy
539+
540+
Two types of represenative agent
541+
542+
* Gorman (everyone has some $\Pi$)
543+
544+
* mongrel (heterogeneous $\Pi$)
545+
546+
```python
547+
import numpy as np
548+
x =np.random.rand(100,1)
549+
```
550+
551+
```python
552+
553+
```

0 commit comments

Comments
 (0)