Add lecture on commodity price model#172
Merged
HengchengZhang merged 5 commits intomainfrom Apr 28, 2023
Merged
Conversation
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Contributor
Author
|
@HengchengZhang could you please fix the merge conflict? You will need to expand the bib file to include all new references from the open PRs. |
Member
|
Hi @jstac, fixed by merging changes from |
Contributor
Author
|
@shlff could you please review? Thanks. |
shlff
reviewed
Apr 26, 2023
lectures/commod_price.md
Outdated
| 1. can be traded by speculators and | ||
| 1. have intrinsic value to consumers. | ||
|
|
||
| Total demand is the sum of consumer demand and demand by spectulators. |
lectures/commod_price.md
Outdated
|
|
||
| Regarding quantities, | ||
|
|
||
| * supply is the sum of of carryover by speculators and the current harvest |
|
|
||
| ## The Model | ||
|
|
||
| Consider a market for a single commodity, whose price is given at $t$ by |
Member
There was a problem hiding this comment.
is given at $t$ -> is given at time $t$?
lectures/commod_price.md
Outdated
| We now know that an equilibrium can be obtained by finding a function $p^*$ | ||
| that satisfies [](eq:dopf). | ||
|
|
||
| It can be shown that, under mild conditions there is exactly on function on |
Member
There was a problem hiding this comment.
exactly on function on -> exactly one function on
| ax.plot(grid, price, 'k-', alpha=0.5, lw=2, label=r'$p^*$') | ||
| ax.legend() | ||
|
|
||
| plt.show() |
Member
There was a problem hiding this comment.
Shall we add x and y labels for the plot above?
| error = max(np.abs(new_price - price)) | ||
| price = new_price | ||
|
|
||
| ax.plot(grid, price, 'k-', alpha=0.5, lw=2, label=r'$p^*$') |
Member
There was a problem hiding this comment.
Shall we say label=r'approximation of $p^*$' instead?
Contributor
Author
|
Thanks @shlff , nice work, much appeciated. |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #145
Could someone please do a first review. I'm sure there will be typos.
Then I want to discuss adding an exercise. In the exercise, we might change harvests to a Markov process.
It would be good to add in the interest rate and we could make it stochastic.
Still need to add a reference to https://johnstachurski.net/edtc, where a more formal treatment with proofs can be found (in Ch 6).