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: in-work/quantecon_undergrad_notes_tom_3.md
+119-9Lines changed: 119 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,4 @@
1
+
<!-- #region -->
1
2
2
3
## Elements of Supply and Demand
3
4
@@ -123,6 +124,7 @@ We study a setting with $n$ goods and $n$ corresponding prices.
123
124
We apply formulas from linear algebra for
124
125
125
126
* differentiating an inner product
127
+
* differentiating a product of a matrix and a vector
126
128
* differentiating a quadratic form
127
129
128
130
Where $a$ is an $n \times 1$ vector, $A$ is an $n \times n$ matrix, and $x$ is an $n \times 1$ vector:
@@ -131,6 +133,10 @@ $$
131
133
\frac{\partial a^\top x }{\partial x} = a
132
134
$$
133
135
136
+
$$
137
+
\frac{\partial A x} {\partial x} = A
138
+
$$
139
+
134
140
$$
135
141
\frac{\partial x^\top A x}{\partial x} = (A + A^\top)x
136
142
$$
@@ -147,9 +153,18 @@ Let
147
153
148
154
We assume that $\Pi$ has an inverse $\Pi^{-1}$ and that $\Pi^\top \Pi$ is a positive definite matrix.
149
155
156
+
It follows that $\Pi^\top \Pi$ has an inverse.
157
+
158
+
150
159
The matrix $\Pi$ describes a consumer's willingness to substitute one good for another, for each pair of
151
160
good in the $n \times 1$ vector $c$.
152
161
162
+
In particular, we shall see below that $(\Pi^T \Pi)^{-1}$ is a matrix of slopes of (compensated) demand curves for $c$ with respect to a vector of prices:
163
+
164
+
$$
165
+
{\partial c } {\partial p} = (\Pi^T \Pi)^{-1}
166
+
$$
167
+
153
168
A consumer faces $p$ as a price taker and chooses $c$ to maximize the utility function
154
169
155
170
$$
@@ -165,12 +180,12 @@ $$ (eq:old2)
165
180
We shall specify examples in which $\Pi$ and $b$ are such that it typically happens that
166
181
167
182
$$
168
-
\Pi b > > c
183
+
\Pi c < < b
169
184
$$ (eq:bversusc)
170
185
171
-
so that utility function {eq}`eq:old2` tells us that the consumer has consumes of each good that he wants.
186
+
so that utility function {eq}`eq:old2` tells us that the consumer has much less of each good than he wants.
172
187
173
-
Condition {eq}`eq:bversusc` will ultimately assure us that competitive equilibrium prices are all positive.
188
+
Condition {eq}`eq:bversusc` will ultimately assure us that competitive equilibrium prices are all positive.
174
189
175
190
## Digression: Marshallian and Hicksian Demand Curves
176
191
@@ -548,20 +563,115 @@ $$
548
563
549
564
which implies {eq}`eq:old5p`.
550
565
551
-
Thus, in the multiple case as for the single-good case, a competitive equilibrium quantity solves a planning problem.
566
+
Thus, as for the single-good case, with multiple goods a competitive equilibrium quantity vector solves a planning problem.
552
567
553
568
(This is another version of the first welfare theorem.)
554
569
555
570
We can read the competitive equilbrium price vector off the inverse demand curve or the inverse supply curve.
556
571
572
+
<!-- #endregion -->
573
+
574
+
<!-- #region -->
575
+
## Notes to Jiacheng for coding
576
+
577
+
Hi Jiacheng.
557
578
579
+
These are just some suggestions about how to begin writing code.
558
580
559
-
## To do
581
+
I sketch some things that are "not even pseudo code". Here goes.
560
582
561
-
Tom has multi consumer version of pure exchange economy
583
+
I recommend that we start "general" and write a Python class that will do "everything".
562
584
563
-
Two types of represenative agent
585
+
Once we get that working with a bunch of fun examples, we can then "work backwards" and make some very simple "baby code" that starts with simple cases (e.g., a scalar case) and graduallly builds up to the class.
564
586
565
-
* Gorman (everyone has some $\Pi$)
587
+
The fun thing will be to make some revealing examples.
588
+
589
+
I recommend making a Python class with the following attributes:
0 commit comments