-
-
Notifications
You must be signed in to change notification settings - Fork 26
Update lecture supply_demand_multiple_goods #219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@@ -171,6 +191,57 @@ Verify that setting $\mu=2$ in {eq}`eq:old3` also implies that formula | |||
|
|||
``` | |||
|
|||
```{code-cell} ipython3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class ExchangeEconomy
and its examples are shifted from lecture supply_demand_heterogeneity
and simplified under the current setup (TODO need to be verified again).
+++ | ||
|
||
Here is an instance of the risk economy: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example and exercise are followed from Tom's advice on exercises in the text.
Here we define a class ``ProductionEconomy``. | ||
|
||
```{code-cell} ipython3 | ||
class ProductionEconomy: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class ProductionEconomy
and its examples are moved directly from the lecture supply_demand_heterogeneity
.
I suggest we delete this class in the lecture supply_demand_heterogeneity
in the following PR:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree @shlff
plt.show() | ||
``` | ||
|
||
#### Example: Single Agent with One Good and with Production |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These examples, which are for single agent and single good, could be linked back to supply_demand_intro
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, only if you have time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change capitalization of section titles: https://manual.quantecon.org/styleguide/writing.html#titles-and-headings
Thanks @jstac . Done.
|
||
Then define a function that plots demand and supply curves and labels surpluses and equilibrium. | ||
|
||
```{code-cell} ipython3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we hide the code cell here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea @shlff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Here is a function that plots the demand, marginal cost and marginal revenue curves with surpluses and equilibrium labelled. | ||
|
||
```{code-cell} ipython3 | ||
def plot_monopoly(PE): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could hide the code cell here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!
Change capitalization of section titles: https://manual.quantecon.org/styleguide/writing.html#titles-and-headings |
In code, change Pi to |
Before the code cell that starts "class ExchangeEconomy:", please add "Here is a class that computes competitive equilibria for our economy." |
Great job @shlff ! Please see my minor comments above. |
Done. Also I changed Same applied to:
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jstac . I've made the changes as you suggested as well as some additional improvements.
This PR is ready for review. Here is a preview:
Looking forward to your further comments.
In a single good case, this equilibrium is associated with a higher price of the good. | ||
|
||
```{code-cell} ipython3 | ||
class Monopoly(ProductionEconomy): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your advice today @jstac .
Here I define an inheritance class called Monopoly
from the class ProductionEconomy
.
Very good work @shlff , many thanks. This is looking good. |
Hi @jstac this PR updates code and context in lecture
supply_demand_multiple_goods
.The code and example are partially shifted and simplified from the lecture supply_demand_heterogeneity.
Looking forward to your comments.