-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
[cagan_adaptive] Update the code suggestions #400
Conversation
Update coding suggestion in issue #392, more specifically, this pull request is related to - Set the default values in `create_cagan_adaptive_model` instead of global parameters. (Some parameters are still global and move to the Experiment 1 section as they are not part of the `create_cagan_adaptive_model`) - change `inv` to `solve` (I also modified the name of `solve` function to `solve_cagan_adaptive` to avoid confusion with the `solve` function in `np`) - remove extra print when checking the stability of dynamics. - in the section of 14.6. Technical condition for stability and add a new section that focuses on experiments. - give names to matrices and equations so that they can be referred in the code comment (I add comment in code to suggest matrix D is the coefficient matrix of equation (14.8)) - Add comments in this function and give titles to subplots. - Change subtitle "Forcast error" -> "Forcast error and model computation" - Change the time notations for equations in the section "Experiment 1"
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
lectures/cagan_adaptive.md
Outdated
@@ -16,13 +16,13 @@ kernelspec: | |||
## Introduction | |||
|
|||
|
|||
This lecture is a sequel or prequel to another lecture {doc}`monetarist theory of price levels <cagan_ree>`. | |||
This lecture is a sequel or prequel to another lecture {doc}`A monetarist theory of price levels <cagan_ree>`. |
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.
@longye-tian , would you mind to change this to "...prequel to {doc}`cagan_ree`." That way the title of the lecture will appear naturally, and it's not necessary to repeat it here (CC @HumphreyYang @mmcky). That approach is more robust, since it will update automatically if the title changes.
There are several similar instances below.
lectures/cagan_adaptive.md
Outdated
|
||
Like the model in this lecture {doc}`monetarist theory of price levels <cagan_ree>`, the model asserts that when a government persistently spends more than it collects in taxes and prints money to finance the shortfall, it puts upward pressure on the price level and generates persistent inflation. | ||
Like the model in this lecture {doc}`A monetarist theory of price levels <cagan_ree>`, the model asserts that when a government persistently spends more than it collects in taxes and prints money to finance the shortfall, it puts upward pressure on the price level and generates persistent inflation. |
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.
Like the model in {doc}`cagan_ree`, ...
lectures/cagan_adaptive.md
Outdated
|
||
Instead of the "perfect foresight" or "rational expectations" version of the model in this lecture {doc}`monetarist theory of price levels <cagan_ree>`, our model in the present lecture is an "adaptive expectations" version of a model that Philip Cagan {cite}`Cagan` used to study the monetary dynamics of hyperinflations. | ||
Instead of the "perfect foresight" or "rational expectations" version of the model in this lecture {doc}`A monetarist theory of price levels <cagan_ree>`, our model in the present lecture is an "adaptive expectations" version of a model that Philip Cagan {cite}`Cagan` used to study the monetary dynamics of hyperinflations. |
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.
...model in {doc}`cagan_ree`, our...
lectures/cagan_adaptive.md
Outdated
@@ -278,7 +278,7 @@ $$ (eq:notre) | |||
This outcome is typical in models in which adaptive expectations hypothesis like equation {eq}`eq:adaptexpn` appear as a | |||
component. | |||
|
|||
In this lecture {doc}`monetarist theory of the price level <cagan_ree>`, we studied a version of the model that replaces hypothesis {eq}`eq:adaptexpn` with | |||
In this lecture {doc}`A monetarist theory of the price level <cagan_ree>`, we studied a version of the model that replaces hypothesis {eq}`eq:adaptexpn` with |
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.
In {doc}`cagan_ree`,
lectures/cagan_adaptive.md
Outdated
|
||
# solve and plot | ||
π_seq_1, Eπ_seq_1, m_seq_1, p_seq_1 = solve_and_plot(md, μ_seq_1) | ||
``` | ||
|
||
We invite the reader to compare outcomes with those under rational expectations studied in another lecture {doc}`monetarist theory of price levels <cagan_ree>`. | ||
We invite the reader to compare outcomes with those under rational expectations studied in another lecture {doc}`A monetarist theory of price levels <cagan_ree>`. |
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.
...studied in {doc}`cagan_ree`.
Many thanks @longye-tian ! I added some small additional requests. Would you mind to make these improvements as well? |
This pull request updates the title reference.
Dear John ( @jstac ), I have updated the title to the more robust version. Best ❤️ |
lectures/cagan_adaptive.md
Outdated
@@ -16,13 +16,13 @@ kernelspec: | |||
## Introduction | |||
|
|||
|
|||
This lecture is a sequel or prequel to another lecture {doc}`monetarist theory of price levels <cagan_ree>`. | |||
This lecture is a sequel or prequel to another lecture {doc}`cagan_ree`. |
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.
cut "another lecture"
lectures/cagan_adaptive.md
Outdated
|
||
Like the model in this lecture {doc}`monetarist theory of price levels <cagan_ree>`, the model asserts that when a government persistently spends more than it collects in taxes and prints money to finance the shortfall, it puts upward pressure on the price level and generates persistent inflation. | ||
Like the model in this lecture {doc}`cagan_ree`, the model asserts that when a government persistently spends more than it collects in taxes and prints money to finance the shortfall, it puts upward pressure on the price level and generates persistent inflation. |
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.
cut "this lecture"
lectures/cagan_adaptive.md
Outdated
|
||
Instead of the "perfect foresight" or "rational expectations" version of the model in this lecture {doc}`monetarist theory of price levels <cagan_ree>`, our model in the present lecture is an "adaptive expectations" version of a model that Philip Cagan {cite}`Cagan` used to study the monetary dynamics of hyperinflations. | ||
Instead of the "perfect foresight" or "rational expectations" version of the model in this lecture {doc}`cagan_ree`, our model in the present lecture is an "adaptive expectations" version of a model that Philip Cagan {cite}`Cagan` used to study the monetary dynamics of hyperinflations. |
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.
cut "this lecture"
lectures/cagan_adaptive.md
Outdated
@@ -36,7 +36,7 @@ It combines these components: | |||
|
|||
Our model stays quite close to Cagan's original specification. | |||
|
|||
As in the {doc}`present values <pv>` and {doc}`consumption smoothing<cons_smooth>` lectures, the only linear algebra operations that we'll be using are matrix multiplication and matrix inversion. | |||
As in the {doc}`pv` and {doc}`cons_smooth` lectures, the only linear algebra operations that we'll be using are matrix multiplication and matrix inversion. |
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.
cut "the" and "lectures" in the first part of the sentence.
lectures/cagan_adaptive.md
Outdated
@@ -278,7 +278,7 @@ $$ (eq:notre) | |||
This outcome is typical in models in which adaptive expectations hypothesis like equation {eq}`eq:adaptexpn` appear as a | |||
component. | |||
|
|||
In this lecture {doc}`monetarist theory of the price level <cagan_ree>`, we studied a version of the model that replaces hypothesis {eq}`eq:adaptexpn` with | |||
In this lecture {doc}`cagan_ree`, we studied a version of the model that replaces hypothesis {eq}`eq:adaptexpn` with |
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.
cut "this lecture"
lectures/cagan_adaptive.md
Outdated
\mu_0 , & t = 0, \ldots, T_1 -1 \\ | ||
\mu^* , & t \geq T_1 | ||
\end{cases} | ||
$$ | ||
|
||
Notice that we studied exactly this experiment in a rational expectations version of the model in this lecture {doc}`monetarist theory of the price level <cagan_ree>`. | ||
Notice that we studied exactly this experiment in a rational expectations version of the model in this lecture {doc}`cagan_ree`. |
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.
cut "this lecture"
lectures/cagan_adaptive.md
Outdated
|
||
# solve and plot | ||
π_seq_1, Eπ_seq_1, m_seq_1, p_seq_1 = solve_and_plot(md, μ_seq_1) | ||
``` | ||
|
||
We invite the reader to compare outcomes with those under rational expectations studied in another lecture {doc}`monetarist theory of price levels <cagan_ree>`. | ||
We invite the reader to compare outcomes with those under rational expectations studied in another lecture {doc}`cagan_ree`. |
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.
cut "another lecture"
Many thanks @longye-tian . Much appreciated. @mmcky will finish this off. @mmcky can you please make the final changes I requested, fix the conflicts and merge this? No rush. |
thanks @jstac the changes you suggest have been incorporated and the merge conflict resolved. @longye-tian can you do a final check to make sure the merge conflict was resolved as you would expect. Please ping me once you have reviewed the diff. |
Many thanks @longye-tian , and thanks @mmcky for the review. Merging. |
Update coding suggestion in issue #392, more specifically, this pull request is related to
create_cagan_adaptive_model
instead of global parameters. (Some parameters are still global and move to the Experiment 1 section as they are not part of thecreate_cagan_adaptive_model
)inv
tosolve
(I also modified the name ofsolve
function tosolve_cagan_adaptive
to avoid confusion with thesolve
function innp
)