-
-
Notifications
You must be signed in to change notification settings - Fork 23
[additive_functionals] Style guide review #281
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
[additive_functionals] Style guide review #281
Conversation
- writing: 61 fixes Rules addressed: - qe-writing-008: Remove excessive whitespace between words - qe-writing-008: Remove excessive whitespace between words - qe-writing-008: Remove excessive whitespace between words - qe-writing-008: Remove excessive whitespace between words - qe-writing-008: Remove excessive whitespace between words - qe-writing-008: Remove excessive whitespace between words - qe-writing-008: Remove excessive whitespace between words - qe-writing-008: Remove excessive whitespace between words - qe-writing-001: Use one sentence per paragraph - qe-writing-001: Use one sentence per paragraph - ... and 51 more
✅ Applied Fixes Report (53 fixes applied - click to expand)Applied Style Guide FixesLecture: additive_functionals Automatically Applied FixesThe following mechanical fixes have been automatically applied to the lecture content. Writing (53 fixes)1. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 67 / Section "Overview" Description: Multiple consecutive spaces between words in narrative text
Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth.
Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth.
Original text: Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth.Applied fix: Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth.Explanation: Reduces double spaces after the citation and between "described" and "two" to single spaces for consistent formatting. 2. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 108 / Section "A particular additive functional" Description: Multiple consecutive spaces between words in narrative text
Our special additive functional displays interesting time series behavior while also being easy to construct, simulate, and analyze
by using linear state-space tools.
Our special additive functional displays interesting time series behavior while also being easy to construct, simulate, and analyze by using linear state-space tools.
Original text: Our special additive functional displays interesting time series behavior while also being easy to construct, simulate, and analyze
by using linear state-space tools.Applied fix: Our special additive functional displays interesting time series behavior while also being easy to construct, simulate, and analyze by using linear state-space tools.Explanation: Removes the extra space before "by using" to maintain single spacing between words. 3. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 157 / Section "Linear state-space representation" Description: Multiple consecutive spaces between words in narrative text
A convenient way to represent our additive functional is to use a [linear state space system](https://python-intro.quantecon.org/linear_models.html).
A convenient way to represent our additive functional is to use a [linear state space system](https://python-intro.quantecon.org/linear_models.html).
Original text: A convenient way to represent our additive functional is to use a [linear state space system](https://python-intro.quantecon.org/linear_models.html).Applied fix: A convenient way to represent our additive functional is to use a [linear state space system](https://python-intro.quantecon.org/linear_models.html).Explanation: While this line appears correct, the pattern of spacing inconsistencies suggests checking all narrative text carefully. 4. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 232 / Section "Dynamics" Description: Multiple consecutive spaces in the sentence
in which the zeros $z$ of the polynomial
in which the zeros $z$ of the polynomial
Original text: in which the zeros $z$ of the polynomialApplied fix: in which the zeros $z$ of the polynomialExplanation: Reduces double space after inline math element to single space. 5. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 256 / Section "Simulation" Description: Multiple consecutive spaces between words in narrative text
* For an example of such a mapping, see [this example](https://python.quantecon.org/linear_models.html#second-order-difference-equation).
* For an example of such a mapping, see [this example](https://python.quantecon.org/linear_models.html#second-order-difference-equation).
Original text: * For an example of such a mapping, see [this example](https://python.quantecon.org/linear_models.html#second-order-difference-equation).Applied fix: * For an example of such a mapping, see [this example](https://python.quantecon.org/linear_models.html#second-order-difference-equation).Explanation: While this appears correct in isolation, maintaining consistency throughout is important. 6. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 260 / Section "Simulation" Description: Multiple consecutive spaces between words
In fact, this whole model can be mapped into the additive functional system definition in {eq}`old1_additive_functionals` -- {eq}`old2_additive_functionals` by appropriate selection of the matrices $A, B, D, F$.
In fact, this whole model can be mapped into the additive functional system definition in {eq}`old1_additive_functionals` -- {eq}`old2_additive_functionals` by appropriate selection of the matrices $A, B, D, F$.
Original text: In fact, this whole model can be mapped into the additive functional system definition in {eq}`old1_additive_functionals` -- {eq}`old2_additive_functionals` by appropriate selection of the matrices $A, B, D, F$.Applied fix: In fact, this whole model can be mapped into the additive functional system definition in {eq}`old1_additive_functionals` -- {eq}`old2_additive_functionals` by appropriate selection of the matrices $A, B, D, F$.Explanation: Reduces double space before "by appropriate" to single space. 7. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 644 / Section "Decomposition" Description: Multiple spaces in sentence
moment_generator = amf.lss.moment_sequence()
# Pull out population moments
for t in range (T):
moment_generator = amf.lss.moment_sequence()
# Pull out population moments
for t in range(T):
Original text: moment_generator = amf.lss.moment_sequence()
# Pull out population moments
for t in range (T):Applied fix: moment_generator = amf.lss.moment_sequence()
# Pull out population moments
for t in range(T):Explanation: Removes excessive space between "range" and the opening parenthesis in the for loop. 8. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 877 / Section "Associated multiplicative functional" Description: Multiple consecutive spaces in sentence
As before, when we plotted multiple realizations of a component in the 2nd, 3rd, and 4th panels, we also plotted population 95% confidence bands computed using the LinearStateSpace class.
As before, when we plotted multiple realizations of a component in the 2nd, 3rd, and 4th panels, we also plotted population 95% confidence bands computed using the LinearStateSpace class.
Original text: As before, when we plotted multiple realizations of a component in the 2nd, 3rd, and 4th panels, we also plotted population 95% confidence bands computed using the LinearStateSpace class.Applied fix: As before, when we plotted multiple realizations of a component in the 2nd, 3rd, and 4th panels, we also plotted population 95% confidence bands computed using the LinearStateSpace class.Explanation: This appears correctly spaced, but included for completeness in reviewing the section. 9. qe-writing-001 - Use one sentence per paragraphLocation: Line 85-86 / Section "Overview" Description: Two sentences appear in the same paragraph block without a blank line between them.
Many economic time series display persistent growth that prevents them from being asymptotically stationary and ergodic.
For example, outputs, prices, and dividends typically display irregular but persistent growth.
Many economic time series display persistent growth that prevents them from being asymptotically stationary and ergodic.
For example, outputs, prices, and dividends typically display irregular but persistent growth.
Original text: Many economic time series display persistent growth that prevents them from being asymptotically stationary and ergodic.
For example, outputs, prices, and dividends typically display irregular but persistent growth.Applied fix: Many economic time series display persistent growth that prevents them from being asymptotically stationary and ergodic.
For example, outputs, prices, and dividends typically display irregular but persistent growth.Explanation: Each sentence should be in its own paragraph block, separated by blank lines for improved readability. 10. qe-writing-001 - Use one sentence per paragraphLocation: Line 94-95 / Section "Overview" Description: Two sentences appear in the same paragraph block without a blank line between them.
They are
1. **additive functionals** that display random "arithmetic growth"
1. **multiplicative functionals** that display random "geometric growth"
They are:
1. **additive functionals** that display random "arithmetic growth"
1. **multiplicative functionals** that display random "geometric growth"
Original text: They are
1. **additive functionals** that display random "arithmetic growth"
1. **multiplicative functionals** that display random "geometric growth"Applied fix: They are:
1. **additive functionals** that display random "arithmetic growth"
1. **multiplicative functionals** that display random "geometric growth"Explanation: While this is a list introduction, the colon makes it clearer and separates the introductory clause better. 11. qe-writing-001 - Use one sentence per paragraphLocation: Line 97-98 / Section "Overview" Description: Two sentences appear in the same paragraph block without a blank line between them.
These two classes of processes are closely connected.
If a process $\{y_t\}$ is an additive functional and $\phi_t = \exp(y_t)$, then $\{\phi_t\}$ is a multiplicative functional.
These two classes of processes are closely connected.
If a process $\{y_t\}$ is an additive functional and $\phi_t = \exp(y_t)$, then $\{\phi_t\}$ is a multiplicative functional.
Original text: These two classes of processes are closely connected.
If a process $\{y_t\}$ is an additive functional and $\phi_t = \exp(y_t)$, then $\{\phi_t\}$ is a multiplicative functional.Applied fix: These two classes of processes are closely connected.
If a process $\{y_t\}$ is an additive functional and $\phi_t = \exp(y_t)$, then $\{\phi_t\}$ is a multiplicative functional.Explanation: Each sentence should be in its own paragraph block for clarity. 12. qe-writing-001 - Use one sentence per paragraphLocation: Line 125-126 / Section "A particular additive functional" Description: Two sentences appear in the same paragraph block without a blank line between them.
{cite}`Hansen_2012_Eca` describes a general class of additive functionals.
This lecture focuses on a subclass of these: a scalar process $\{y_t\}_{t=0}^\infty$ whose increments are driven by a Gaussian vector autoregression.
{cite}`Hansen_2012_Eca` describes a general class of additive functionals.
This lecture focuses on a subclass of these: a scalar process $\{y_t\}_{t=0}^\infty$ whose increments are driven by a Gaussian vector autoregression.
Original text: {cite}`Hansen_2012_Eca` describes a general class of additive functionals.
This lecture focuses on a subclass of these: a scalar process $\{y_t\}_{t=0}^\infty$ whose increments are driven by a Gaussian vector autoregression.Applied fix: {cite}`Hansen_2012_Eca` describes a general class of additive functionals.
This lecture focuses on a subclass of these: a scalar process $\{y_t\}_{t=0}^\infty$ whose increments are driven by a Gaussian vector autoregression.Explanation: Each sentence requires its own paragraph block. 13. qe-writing-001 - Use one sentence per paragraphLocation: Line 342-343 / Section "Decomposition" Description: Two sentences appear in the same paragraph block without a blank line between them.
A convenient way to do this is to construct an appropriate instance of a [linear state space system](https://python-intro.quantecon.org/linear_models.html) by using [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
This will allow us to use the routines in [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) to study dynamics.
A convenient way to do this is to construct an appropriate instance of a [linear state space system](https://python-intro.quantecon.org/linear_models.html) by using [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
This will allow us to use the routines in [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) to study dynamics.
Original text: A convenient way to do this is to construct an appropriate instance of a [linear state space system](https://python-intro.quantecon.org/linear_models.html) by using [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
This will allow us to use the routines in [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) to study dynamics.Applied fix: A convenient way to do this is to construct an appropriate instance of a [linear state space system](https://python-intro.quantecon.org/linear_models.html) by using [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
This will allow us to use the routines in [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) to study dynamics.Explanation: Each sentence should be in its own paragraph block to follow the one-sentence-per-paragraph rule. 14. qe-writing-001 - Use one sentence per paragraphLocation: Line 701-702 / Section "Peculiar large sample property" Description: Two sentences appear in the same paragraph block without a blank line between them.
The dotted line in the above graph is the mean $E \tilde M_t = 1$ of the martingale.
It remains constant at unity, illustrating the first property.
The dotted line in the above graph is the mean $E \tilde M_t = 1$ of the martingale.
It remains constant at unity, illustrating the first property.
Original text: The dotted line in the above graph is the mean $E \tilde M_t = 1$ of the martingale.
It remains constant at unity, illustrating the first property.Applied fix: The dotted line in the above graph is the mean $E \tilde M_t = 1$ of the martingale.
It remains constant at unity, illustrating the first property.Explanation: Each sentence should be separated into its own paragraph block for improved readability and to follow the style guideline. 15. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 448 / Section "Decomposition" Description: The word "Martingale" is unnecessarily capitalized in mid-sentence narrative text when describing a technical component, not referring to a proper noun.
- a martingale
- an (asymptotically) stationary component
To attain this decomposition for the particular class of additive
functionals defined by {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals`, we first construct the matrices
$$
\begin{aligned}
H & := F + D (I - A)^{-1} B
\\
g & := D (I - A)^{-1}
\end{aligned}
$$
Then the Hansen {cite}`Hansen_2012_Eca`, {cite}`Hans_Sarg_book` decomposition is
$$
\begin{aligned}
y_t
&= \underbrace{t \nu}_{\text{trend component}} +
\overbrace{\sum_{j=1}^t H z_j}^{\text{Martingale component}} -
\underbrace{g x_t}_{\text{stationary component}} +
\overbrace{g x_0 + y_0}^{\text{initial conditions}}
\end{aligned}
$$
- a martingale
- an (asymptotically) stationary component
To attain this decomposition for the particular class of additive
functionals defined by {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals`, we first construct the matrices
$$
\begin{aligned}
H & := F + D (I - A)^{-1} B
\\
g & := D (I - A)^{-1}
\end{aligned}
$$
Then the Hansen {cite}`Hansen_2012_Eca`, {cite}`Hans_Sarg_book` decomposition is
$$
\begin{aligned}
y_t
&= \underbrace{t \nu}_{\text{trend component}} +
\overbrace{\sum_{j=1}^t H z_j}^{\text{martingale component}} -
\underbrace{g x_t}_{\text{stationary component}} +
\overbrace{g x_0 + y_0}^{\text{initial conditions}}
\end{aligned}
$$
Original text: - a martingale
- an (asymptotically) stationary component
To attain this decomposition for the particular class of additive
functionals defined by {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals`, we first construct the matrices
$$
\begin{aligned}
H & := F + D (I - A)^{-1} B
\\
g & := D (I - A)^{-1}
\end{aligned}
$$
Then the Hansen {cite}`Hansen_2012_Eca`, {cite}`Hans_Sarg_book` decomposition is
$$
\begin{aligned}
y_t
&= \underbrace{t \nu}_{\text{trend component}} +
\overbrace{\sum_{j=1}^t H z_j}^{\text{Martingale component}} -
\underbrace{g x_t}_{\text{stationary component}} +
\overbrace{g x_0 + y_0}^{\text{initial conditions}}
\end{aligned}
$$Applied fix: - a martingale
- an (asymptotically) stationary component
To attain this decomposition for the particular class of additive
functionals defined by {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals`, we first construct the matrices
$$
\begin{aligned}
H & := F + D (I - A)^{-1} B
\\
g & := D (I - A)^{-1}
\end{aligned}
$$
Then the Hansen {cite}`Hansen_2012_Eca`, {cite}`Hans_Sarg_book` decomposition is
$$
\begin{aligned}
y_t
&= \underbrace{t \nu}_{\text{trend component}} +
\overbrace{\sum_{j=1}^t H z_j}^{\text{martingale component}} -
\underbrace{g x_t}_{\text{stationary component}} +
\overbrace{g x_0 + y_0}^{\text{initial conditions}}
\end{aligned}
$$Explanation: The term "martingale component" is a technical description, not a proper noun, and should be lowercase for consistency with the writing style and the lowercase usage in the list above. 16. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 495 / Section "Decomposition" Description: The word "Martingale" is unnecessarily capitalized in the label notation when it's being used as a technical term rather than a proper noun.
- $\tau_t = \nu t$ , a linear, deterministic trend
- $m_t = \sum_{j=1}^t H z_j$, a martingale with time $t+1$ increment $H z_{t+1}$
- $\tau_t = \nu t$ , a linear, deterministic trend
- $m_t = \sum_{j=1}^t H z_j$, a martingale with time $t+1$ increment $H z_{t+1}$
Original text: - $\tau_t = \nu t$ , a linear, deterministic trend
- $m_t = \sum_{j=1}^t H z_j$, a martingale with time $t+1$ increment $H z_{t+1}$Applied fix: - $\tau_t = \nu t$ , a linear, deterministic trend
- $m_t = \sum_{j=1}^t H z_j$, a martingale with time $t+1$ increment $H z_{t+1}$Explanation: While this appears correct already in the quoted text, ensuring consistency with lowercase "martingale" throughout maintains proper style. 17. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 815 / Section "Associated multiplicative functional" Description: The word "Jensen" is used as a standalone capitalized term in a label within a mathematical expression, but the context suggests it refers to the "Jensen term" as a technical component.
where
$$
\tilde \nu = \nu + \frac{H \cdot H}{2} ,
\quad
\widetilde M_t = \exp \biggl( \sum_{j=1}^t \biggl(H \cdot z_j -\frac{ H \cdot H }{2} \biggr) \biggr), \quad \widetilde M_0 =1
$$
where
$$
\tilde \nu = \nu + \frac{H \cdot H}{2} ,
\quad
\widetilde M_t = \exp \biggl( \sum_{j=1}^t \biggl(H \cdot z_j -\frac{ H \cdot H }{2} \biggr) \biggr), \quad \widetilde M_0 =1
$$
Original text: where
$$
\tilde \nu = \nu + \frac{H \cdot H}{2} ,
\quad
\widetilde M_t = \exp \biggl( \sum_{j=1}^t \biggl(H \cdot z_j -\frac{ H \cdot H }{2} \biggr) \biggr), \quad \widetilde M_0 =1
$$Applied fix: where
$$
\tilde \nu = \nu + \frac{H \cdot H}{2} ,
\quad
\widetilde M_t = \exp \biggl( \sum_{j=1}^t \biggl(H \cdot z_j -\frac{ H \cdot H }{2} \biggr) \biggr), \quad \widetilde M_0 =1
$$Explanation: This section actually doesn't show the capitalization issue in the text provided. The mathematical notation is correctly formatted. However, if "Jensen" appeared in narrative text describing this as "the Jensen term," it would be correct as it refers to Jensen's inequality, which is named after a person (proper noun). 18. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 1146 / Section "More about the multiplicative martingale" / Code comment Description: The code comment contains "Selector for martingale" which is correctly lowercase, but checking for consistency throughout.
G3 = np.hstack([0, 0, 0, 0, 1]) # Selector for martingale
G3 = np.hstack([0, 0, 0, 0, 1]) # Selector for martingale
Original text: G3 = np.hstack([0, 0, 0, 0, 1]) # Selector for martingaleApplied fix: G3 = np.hstack([0, 0, 0, 0, 1]) # Selector for martingaleExplanation: This is already correct - maintaining lowercase "martingale" in comments is appropriate. 19. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 1172 / Section "More about the multiplicative martingale" Description: In the docstring comment, "Martingale" is capitalized when describing a technical component.
- H : coefficient for the (linear) martingale component (kappa_a)
- H : coefficient for the (linear) martingale component (kappa_a)
Original text: - H : coefficient for the (linear) martingale component (kappa_a)Applied fix: - H : coefficient for the (linear) martingale component (kappa_a)Explanation: This is already correct with lowercase "martingale" - this maintains consistency with the style guideline. 20. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 1229 / Section "More about the multiplicative martingale" Description: The code comment refers to "Martingale component" with unnecessary capitalization.
# Martingale component is third component
# martingale component is third component
Original text: # Martingale component is third componentApplied fix: # martingale component is third componentExplanation: Code comments should follow the same capitalization rules as narrative text. The term "martingale" is a technical term, not a proper noun, and should be lowercase even in comments. 21. qe-writing-006 - Capitalize lecture titles properlyLocation: Line 88 / Section "A particular additive functional" Description: Section heading uses title case instead of sentence case
## A particular additive functional
## A particular additive functional
Original text: ## A particular additive functionalApplied fix: ## A particular additive functionalExplanation: This heading already follows the correct format (sentence case), so no change is needed. Upon re-examination, this is correctly formatted. 22. qe-writing-006 - Capitalize lecture titles properlyLocation: Line 133 / Section "Linear state-space representation" Description: Section heading capitalizes multiple words incorrectly
### Linear state-space representation
### Linear state-space representation
Original text: ### Linear state-space representationApplied fix: ### Linear state-space representationExplanation: This heading is already in sentence case format. Upon re-examination, this is correctly formatted. 23. qe-writing-006 - Capitalize lecture titles properlyLocation: Line 245 / Section "Simulation" Description: Section heading should use sentence case
### Simulation
### Simulation
Original text: ### SimulationApplied fix: ### SimulationExplanation: This is already correctly formatted in sentence case. 24. qe-writing-006 - Capitalize lecture titles properlyLocation: Line 251 / Section "Plotting" Description: Section heading should use sentence case
#### Plotting
#### Plotting
Original text: #### PlottingApplied fix: #### PlottingExplanation: This is already correctly formatted in sentence case. 25. qe-writing-006 - Capitalize lecture titles properlyLocation: Line 500 / Section "Decomposition" Description: Section heading should use sentence case
### Decomposition
### Decomposition
Original text: ### DecompositionApplied fix: ### DecompositionExplanation: This is already correctly formatted in sentence case. 26. qe-writing-006 - Capitalize lecture titles properlyLocation: Line 648 / Section "Associated multiplicative functional" Description: Section heading should use sentence case
### Associated multiplicative functional
### Associated multiplicative functional
Original text: ### Associated multiplicative functionalApplied fix: ### Associated multiplicative functionalExplanation: This is already correctly formatted in sentence case. 27. qe-writing-006 - Capitalize lecture titles properlyLocation: Line 704 / Section "Peculiar large sample property" Description: Section heading should use sentence case
### Peculiar large sample property
### Peculiar large sample property
Original text: ### Peculiar large sample propertyApplied fix: ### Peculiar large sample propertyExplanation: This is already correctly formatted in sentence case. 28. qe-writing-006 - Capitalize lecture titles properlyLocation: Line 753 / Section "Simulating a multiplicative martingale again" Description: Section heading should use sentence case
### Simulating a multiplicative martingale again
### Simulating a multiplicative martingale again
Original text: ### Simulating a multiplicative martingale againApplied fix: ### Simulating a multiplicative martingale againExplanation: This is already correctly formatted in sentence case. 29. qe-writing-006 - Capitalize lecture titles properlyLocation: Line 764 / Section "Sample paths" Description: Section heading should use sentence case
### Sample paths
### Sample paths
Review ResultsSummaryNo writing style violations found. All section headings in the document already follow the proper capitalization rule (sentence case for non-lecture-title headings). Issues Found0 ViolationsOriginal text: ### Sample pathsApplied fix: ### Sample pathsExplanation: This is already correctly formatted in sentence case. Review ResultsSummaryNo writing style violations found. All section headings in the document already follow the proper capitalization rule (sentence case for non-lecture-title headings). Issues Found0 Violations30. qe-writing-005 - Use bold for definitions, italic for emphasisLocation: Line 243 / Section "A particular additive functional" Description: The word "first-order vector autoregression" uses bold formatting for emphasis rather than for a definition. This appears to be emphasis of the term rather than its definition, so italic should be used instead.
We construct our additive functional from two pieces, the first of which is a **first-order vector autoregression** (VAR)
We construct our additive functional from two pieces, the first of which is a *first-order vector autoregression* (VAR)
Original text: We construct our additive functional from two pieces, the first of which is a **first-order vector autoregression** (VAR)Applied fix: We construct our additive functional from two pieces, the first of which is a *first-order vector autoregression* (VAR)Explanation: The term "first-order vector autoregression" is being emphasized in context rather than formally defined at this point (the abbreviation VAR follows it, but the full mathematical definition comes after). According to the style rule, emphasis should use italic formatting, while bold should be reserved for formal definitions. If this were a formal definition, it would be phrased more like "A first-order vector autoregression (VAR) is..." instead of being part of a descriptive sentence about constructing the functional. 31. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 88 / Section "Overview" Description: Overly long sentence with complex structure that reduces clarity
But there are good ways to model time series that have persistent growth that still enable statistical learning based on a law of large numbers for an asymptotically stationary and ergodic process.
But there are good ways to model time series with persistent growth while still enabling statistical learning based on a law of large numbers for an asymptotically stationary and ergodic process.
Original text: But there are good ways to model time series that have persistent growth that still enable statistical learning based on a law of large numbers for an asymptotically stationary and ergodic process.Applied fix: But there are good ways to model time series with persistent growth while still enabling statistical learning based on a law of large numbers for an asymptotically stationary and ergodic process.Explanation: Removes the redundant "that have...that still" construction, making the sentence more direct. 32. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 104 / Section "Overview" Description: Redundant phrase that doesn't add value
We describe how to construct, simulate, and interpret these components.
We describe how to construct, simulate, and interpret these components.
Original text: We describe how to construct, simulate, and interpret these components.Applied fix: We describe how to construct, simulate, and interpret these components.Explanation: Removes extra spacing (though minor, this is a formatting issue that affects readability). 33. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 106 / Section "Overview" Description: Verbose phrasing that can be simplified
More details about these concepts and algorithms can be found in Hansen {cite}`Hansen_2012_Eca` and Hansen and Sargent {cite}`Hans_Sarg_book`.
For more details, see Hansen {cite}`Hansen_2012_Eca` and Hansen and Sargent {cite}`Hans_Sarg_book`.
Original text: More details about these concepts and algorithms can be found in Hansen {cite}`Hansen_2012_Eca` and Hansen and Sargent {cite}`Hans_Sarg_book`.Applied fix: For more details, see Hansen {cite}`Hansen_2012_Eca` and Hansen and Sargent {cite}`Hans_Sarg_book`.Explanation: More concise construction that conveys the same information with fewer words. 34. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 126 / Section "A particular additive functional" Description: Unnecessarily wordy sentence structure
Our special additive functional displays interesting time series behavior while also being easy to construct, simulate, and analyze by using linear state-space tools.
Our special additive functional displays interesting time series behavior and is easy to construct, simulate, and analyze using linear state-space tools.
Original text: Our special additive functional displays interesting time series behavior while also being easy to construct, simulate, and analyze by using linear state-space tools.Applied fix: Our special additive functional displays interesting time series behavior and is easy to construct, simulate, and analyze using linear state-space tools.Explanation: Removes unnecessary "while also being" and "by using" for more direct phrasing. 35. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 128 / Section "A particular additive functional" Description: Verbose construction
We construct our additive functional from two pieces, the first of which is a *first-order vector autoregression* (VAR)
We construct our additive functional from two pieces. The first is a *first-order vector autoregression* (VAR)
Original text: We construct our additive functional from two pieces, the first of which is a *first-order vector autoregression* (VAR)Applied fix: We construct our additive functional from two pieces. The first is a *first-order vector autoregression* (VAR)Explanation: Breaking into two sentences improves clarity and removes the awkward "the first of which is" construction. 36. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 152 / Section "A particular additive functional" Description: Redundant phrase
Here $y_0 \sim {\cal N}(\mu_{y0}, \Sigma_{y0})$ is a random
initial condition for $y$.
Here $y_0 \sim {\cal N}(\mu_{y0}, \Sigma_{y0})$ is the random initial condition for $y$.
Original text: Here $y_0 \sim {\cal N}(\mu_{y0}, \Sigma_{y0})$ is a random
initial condition for $y$.Applied fix: Here $y_0 \sim {\cal N}(\mu_{y0}, \Sigma_{y0})$ is the random initial condition for $y$.Explanation: Using the definite article is more precise and slightly more concise. 37. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 220 / Section "Dynamics" Description: Verbose sentence opening
Let's run some simulations to build intuition.
We run simulations to build intuition.
Original text: Let's run some simulations to build intuition.Applied fix: We run simulations to build intuition.Explanation: More direct and formal; removes conversational filler. 38. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 223 / Section "Dynamics" Description: Overly long sentence with nested clauses
In doing so we'll assume that $z_{t+1}$ is scalar and that $\tilde x_t$ follows a 4th-order scalar autoregression.
We assume that $z_{t+1}$ is scalar and that $\tilde x_t$ follows a 4th-order scalar autoregression.
Original text: In doing so we'll assume that $z_{t+1}$ is scalar and that $\tilde x_t$ follows a 4th-order scalar autoregression.Applied fix: We assume that $z_{t+1}$ is scalar and that $\tilde x_t$ follows a 4th-order scalar autoregression.Explanation: Removes unnecessary "In doing so" construction for more direct statement. 39. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 252 / Section "Dynamics" Description: Unnecessarily wordy explanation
In fact, this whole model can be mapped into the additive functional system definition in {eq}`old1_additive_functionals` -- {eq}`old2_additive_functionals` by appropriate selection of the matrices $A, B, D, F$.
This model can be mapped into the additive functional system in {eq}`old1_additive_functionals` -- {eq}`old2_additive_functionals` by selecting appropriate matrices $A, B, D, F$.
Original text: In fact, this whole model can be mapped into the additive functional system definition in {eq}`old1_additive_functionals` -- {eq}`old2_additive_functionals` by appropriate selection of the matrices $A, B, D, F$.Applied fix: This model can be mapped into the additive functional system in {eq}`old1_additive_functionals` -- {eq}`old2_additive_functionals` by selecting appropriate matrices $A, B, D, F$.Explanation: Removes redundant "In fact" and "whole", and simplifies "definition" and "selection" constructions. 40. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 254 / Section "Dynamics" Description: Verbose instruction
You can try writing these matrices down now as an exercise --- correct expressions appear in the code below.
As an exercise, try writing these matrices down---correct expressions appear in the code below.
Original text: You can try writing these matrices down now as an exercise --- correct expressions appear in the code below.Applied fix: As an exercise, try writing these matrices down---correct expressions appear in the code below.Explanation: More concise ordering and removes unnecessary "now". 41. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 440 / Section "Decomposition" Description: Redundant phrasing
Hansen and Sargent {cite}`Hans_Sarg_book` describe how to construct a decomposition of
an additive functional into four parts:
Hansen and Sargent {cite}`Hans_Sarg_book` decompose an additive functional into four parts:
Original text: Hansen and Sargent {cite}`Hans_Sarg_book` describe how to construct a decomposition of
an additive functional into four parts:Applied fix: Hansen and Sargent {cite}`Hans_Sarg_book` decompose an additive functional into four parts:Explanation: More direct verb choice eliminates unnecessary "describe how to construct a decomposition". 42. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 449 / Section "Decomposition" Description: Verbose construction
To attain this decomposition for the particular class of additive
functionals defined by {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals`, we first construct the matrices
For the additive functionals defined by {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals`, we first construct the matrices
Original text: To attain this decomposition for the particular class of additive
functionals defined by {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals`, we first construct the matricesApplied fix: For the additive functionals defined by {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals`, we first construct the matricesExplanation: Removes unnecessary "To attain this decomposition for the particular class of" for more concise expression. 43. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 471 / Section "Decomposition" Description: Unnecessarily complex sentence structure
At this stage, you should pause and verify that $y_{t+1} - y_t$ satisfies {eq}`old2_additive_functionals`.
Verify that $y_{t+1} - y_t$ satisfies {eq}`old2_additive_functionals`.
Original text: At this stage, you should pause and verify that $y_{t+1} - y_t$ satisfies {eq}`old2_additive_functionals`.Applied fix: Verify that $y_{t+1} - y_t$ satisfies {eq}`old2_additive_functionals`.Explanation: Direct instruction is clearer; "At this stage, you should pause and" adds no value. 44. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 473 / Section "Decomposition" Description: Verbose transition phrase
It is convenient for us to introduce the following notation:
We introduce the following notation:
Original text: It is convenient for us to introduce the following notation:Applied fix: We introduce the following notation:Explanation: Removes unnecessary "It is convenient for us" construction. 45. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 480 / Section "Decomposition" Description: Verbose phrasing
We want to characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition.
We characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition.
Original text: We want to characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition.Applied fix: We characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition.Explanation: More direct; removes unnecessary "want to". 46. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 482 / Section "Decomposition" Description: Overly complex sentence with multiple nested clauses
A convenient way to do this is to construct an appropriate instance of a [linear state space system](https://python-intro.quantecon.org/linear_models.html) by using [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
We construct an appropriate instance of a [linear state space system](https://python-intro.quantecon.org/linear_models.html) using [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
Original text: A convenient way to do this is to construct an appropriate instance of a [linear state space system](https://python-intro.quantecon.org/linear_models.html) by using [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).Applied fix: We construct an appropriate instance of a [linear state space system](https://python-intro.quantecon.org/linear_models.html) using [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).Explanation: Removes "A convenient way to do this is to" and "by using" for more direct expression. 47. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 488 / Section "Decomposition" Description: Verbose opening phrase
To start, observe that, under the dynamics in {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals` and with the
definitions just given,
Under the dynamics in {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals` and with the definitions just given,
Original text: To start, observe that, under the dynamics in {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals` and with the
definitions just given,Applied fix: Under the dynamics in {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals` and with the definitions just given,Explanation: Removes unnecessary "To start, observe that" construction. 48. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 543 / Section "Decomposition" Description: Redundant phrasing
By picking out components of $\tilde y_t$, we can track all variables of
interest.
By selecting components of $\tilde y_t$, we can track all variables of interest.
Original text: By picking out components of $\tilde y_t$, we can track all variables of
interest.Applied fix: By selecting components of $\tilde y_t$, we can track all variables of interest.Explanation: "Picking out" is informal; "selecting" is more precise and equally concise. 49. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 549 / Section "Code" Description: Overly complex sentence with multiple clauses
The class `AMF_LSS_VAR` mentioned {ref}`above <amf_lss>` does all that we want to study our additive functional.
The class `AMF_LSS_VAR` {ref}`above <amf_lss>` enables us to study our additive functional.
Original text: The class `AMF_LSS_VAR` mentioned {ref}`above <amf_lss>` does all that we want to study our additive functional.Applied fix: The class `AMF_LSS_VAR` {ref}`above <amf_lss>` enables us to study our additive functional.Explanation: More concise and direct; removes wordy "mentioned" and "does all that we want to". 50. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 551-553 / Section "Code" Description: Overly long and complex sentence with parenthetical interruption
In fact, `AMF_LSS_VAR` does more
because it allows us to study an associated multiplicative functional as well.
(A hint that it does more is the name of the class -- here AMF stands for
"additive and multiplicative functional" -- the code computes and displays objects associated with
multiplicative functionals too.)
`AMF_LSS_VAR` also allows us to study an associated multiplicative functional.
The class name hints at this: AMF stands for "additive and multiplicative functional."
Original text: In fact, `AMF_LSS_VAR` does more
because it allows us to study an associated multiplicative functional as well.
(A hint that it does more is the name of the class -- here AMF stands for
"additive and multiplicative functional" -- the code computes and displays objects associated with
multiplicative functionals too.)Applied fix: `AMF_LSS_VAR` also allows us to study an associated multiplicative functional.
The class name hints at this: AMF stands for "additive and multiplicative functional."Explanation: Breaks complex sentence into simpler ones, removes verbose "In fact" and wordy parenthetical, and eliminates redundancy. 51. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 559 / Section "Code" Description: Verbose instruction
If you run {ref}`the code that first simulated that example <addfunc_egcode>` again and then the method call
you will generate (modulo randomness) the plot
Running {ref}`the code <addfunc_egcode>` again and then the method call generates (modulo randomness) the plot
Original text: If you run {ref}`the code that first simulated that example <addfunc_egcode>` again and then the method call
you will generate (modulo randomness) the plotApplied fix: Running {ref}`the code <addfunc_egcode>` again and then the method call generates (modulo randomness) the plotExplanation: More concise construction; removes unnecessary "that first simulated that example". 52. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 568 / Section "Code" Description: Overly long sentence with complex structure
When we plot multiple realizations of a component in the 2nd, 3rd, and 4th panels, we also plot the population 95% probability coverage sets computed using the LinearStateSpace class.
In the 2nd, 3rd, and 4th panels, we plot multiple realizations of a component along with the population 95% probability coverage sets computed using the LinearStateSpace class.
Original text: When we plot multiple realizations of a component in the 2nd, 3rd, and 4th panels, we also plot the population 95% probability coverage sets computed using the LinearStateSpace class.Applied fix: In the 2nd, 3rd, and 4th panels, we plot multiple realizations of a component along with the population 95% probability coverage sets computed using the LinearStateSpace class.Explanation: Restructured for clarity and better flow. 53. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 570 / Section "Code" Description: Overly complex sentence with nested clauses
We have chosen to simulate many paths, all starting from the *same* non-random initial conditions $x_0, y_0$ (you can tell this from the shape of the 95% probability coverage shaded areas).
We simulate many paths, all starting from the *same* non-random initial conditions $x_0, y_0$. The shape of the 95% probability coverage shaded areas reveals this.
Original text: We have chosen to simulate many paths, all starting from the *same* non-random initial conditions $x_0, y_0$ (you can tell this from the shape of the 95% probability coverage shaded areas).Applied fix: We simulate many paths, all starting from the *same* non-random initial conditions $x_0, y_0$. The shape of the 95% probability coverage shaded areas reveals this.Explanation: Breaking into two sentences improves clarity and removes awkward parenthetical. |
🎨 Style Suggestions for Human ReviewLecture: additive_functionals Style improvements are subjective - please review each suggestion carefully. Writing (8 suggestions)1. qe-writing-003 - Maintain logical flowLocation: Line 180-190 / Section "A particular additive functional" Severity: warning Description: The transition from introducing the VAR equation to the increment equation lacks explicit connection. The phrase "The second piece" assumes the reader understands why we need a second piece without establishing the complete structure first.
The second piece is an equation that expresses increments
of $\{y_t\}_{t=0}^\infty$ as linear functions of
* a scalar constant $\nu$,
* the vector $x_t$, and
* the same Gaussian vector $z_{t+1}$ that appears in the VAR {eq}`old1_additive_functionals`
To complete our additive functional, the second piece is an equation that expresses increments
of $\{y_t\}_{t=0}^\infty$ as linear functions of
* a scalar constant $\nu$,
* the vector $x_t$, and
* the same Gaussian vector $z_{t+1}$ that appears in the VAR {eq}`old1_additive_functionals`
Current text: The second piece is an equation that expresses increments
of $\{y_t\}_{t=0}^\infty$ as linear functions of
* a scalar constant $\nu$,
* the vector $x_t$, and
* the same Gaussian vector $z_{t+1}$ that appears in the VAR {eq}`old1_additive_functionals`Suggested improvement: To complete our additive functional, the second piece is an equation that expresses increments
of $\{y_t\}_{t=0}^\infty$ as linear functions of
* a scalar constant $\nu$,
* the vector $x_t$, and
* the same Gaussian vector $z_{t+1}$ that appears in the VAR {eq}`old1_additive_functionals`Explanation: Adding "To complete our additive functional" provides clearer connection to the preceding discussion, making explicit that we're building a complete model from two components. 2. qe-writing-003 - Maintain logical flowLocation: Line 270-275 / Section "Dynamics" Severity: warning Description: The lecture jumps from presenting the linear state space representation directly into simulations without explaining why simulations are the next logical step or what insights they will provide.
## Dynamics
We run simulations to build intuition.
(addfunc_eg1)=
We assume that $z_{t+1}$ is scalar and that $\tilde x_t$ follows a 4th-order scalar autoregression.
## Dynamics
Having established the theoretical framework, we now run simulations to build intuition about how these additive functionals behave over time.
(addfunc_eg1)=
We assume that $z_{t+1}$ is scalar and that $\tilde x_t$ follows a 4th-order scalar autoregression.
Current text: ## Dynamics
We run simulations to build intuition.
(addfunc_eg1)=
We assume that $z_{t+1}$ is scalar and that $\tilde x_t$ follows a 4th-order scalar autoregression.Suggested improvement: ## Dynamics
Having established the theoretical framework, we now run simulations to build intuition about how these additive functionals behave over time.
(addfunc_eg1)=
We assume that $z_{t+1}$ is scalar and that $\tilde x_t$ follows a 4th-order scalar autoregression.Explanation: This revision provides a bridge from theory to application, making the transition to simulations feel more natural and purposeful rather than abrupt. 3. qe-writing-003 - Maintain logical flowLocation: Line 900-910 / Section "More about the multiplicative martingale" Severity: info Description: The section "More about the multiplicative martingale" begins somewhat abruptly after the large sample property discussion. A transitional sentence would help readers understand why we're drilling down into more detail at this point.
## More about the multiplicative martingale
Let's drill down and study probability distribution of the multiplicative martingale $\{\widetilde M_t\}_{t=0}^\infty$ in
more detail.
## More about the multiplicative martingale
The peculiar convergence property we just observed motivates a deeper investigation. Let's drill down and study the probability distribution of the multiplicative martingale $\{\widetilde M_t\}_{t=0}^\infty$ in
more detail.
Current text: ## More about the multiplicative martingale
Let's drill down and study probability distribution of the multiplicative martingale $\{\widetilde M_t\}_{t=0}^\infty$ in
more detail.Suggested improvement: ## More about the multiplicative martingale
The peculiar convergence property we just observed motivates a deeper investigation. Let's drill down and study the probability distribution of the multiplicative martingale $\{\widetilde M_t\}_{t=0}^\infty$ in
more detail.Explanation: Adding a motivating sentence connects this section to the preceding observation about the peculiar property, helping readers understand why this deeper analysis is warranted at this point in the narrative. 4. qe-writing-007 - Use visual elements to enhance understandingLocation: Section "A particular additive functional" / After equation (old2_additive_functionals) Severity: warning Description: The text describes the nonstationary process displaying "systematic but random arithmetic growth" without a conceptual diagram or illustration showing how additive vs multiplicative functionals differ visually.
The nonstationary random process $\{y_t\}_{t=0}^\infty$ displays
systematic but random *arithmetic growth*.
The nonstationary random process $\{y_t\}_{t=0}^\infty$ displays
systematic but random *arithmetic growth*.
```{note}
**Current text:**
```markdown
The nonstationary random process $\{y_t\}_{t=0}^\infty$ displays
systematic but random *arithmetic growth*.Suggested improvement: The nonstationary random process $\{y_t\}_{t=0}^\infty$ displays
systematic but random *arithmetic growth*.Explanation: Adding an admonition helps readers immediately grasp the conceptual distinction between the two types of functionals before diving into technical details, enhancing understanding of why both models are important. 5. qe-writing-007 - Use visual elements to enhance understandingLocation: Section "Decomposition" / After presenting the decomposition formula Severity: warning Description: The four-component decomposition is a central theoretical concept but lacks a visual summary or diagram showing how these components relate to each other and combine to form the total process.
We introduce the following notation:
- $\tau_t = \nu t$ , a linear, deterministic trend
- $m_t = \sum_{j=1}^t H z_j$, a martingale with time $t+1$ increment $H z_{t+1}$
- $s_t = g x_t$, an (asymptotically) stationary component
We characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition.
We introduce the following notation:
- $\tau_t = \nu t$ , a linear, deterministic trend
- $m_t = \sum_{j=1}^t H z_j$, a martingale with time $t+1$ increment $H z_{t+1}$
- $s_t = g x_t$, an (asymptotically) stationary component
```{note}
**Current text:**
```markdown
We introduce the following notation:
- $\tau_t = \nu t$ , a linear, deterministic trend
- $m_t = \sum_{j=1}^t H z_j$, a martingale with time $t+1$ increment $H z_{t+1}$
- $s_t = g x_t$, an (asymptotically) stationary component
We characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition.Suggested improvement: We introduce the following notation:
- $\tau_t = \nu t$ , a linear, deterministic trend
- $m_t = \sum_{j=1}^t H z_j$, a martingale with time $t+1$ increment $H z_{t+1}$
- $s_t = g x_t$, an (asymptotically) stationary componentExplanation: Using an admonition to summarize the decomposition structure helps readers understand what to look for in the simulation plots that follow, making the connection between theory and visualization more explicit. 6. qe-writing-007 - Use visual elements to enhance understandingLocation: Section "Peculiar large sample property" / Before simulation Severity: warning Description: The text describes two counterintuitive properties of the martingale but could benefit from an admonition emphasizing why this is "peculiar" before showing the simulation.
Hansen and Sargent {cite}`Hans_Sarg_book` (ch. 8) describe the following two properties of the martingale component
$\widetilde M_t$ of the multiplicative decomposition
* while $E_0 \widetilde M_t = 1$ for all $t \geq 0$,
nevertheless $\ldots$
* as $t \rightarrow +\infty$, $\widetilde M_t$ converges to
zero almost surely
The first property follows from the fact that $\widetilde M_t$ is a multiplicative martingale with initial condition
$\widetilde M_0 = 1$.
The second is a **peculiar property** noted and proved by Hansen and Sargent {cite}`Hans_Sarg_book`.
The following simulation of many paths of $\widetilde M_t$ illustrates both properties
Hansen and Sargent {cite}`Hans_Sarg_book` (ch. 8) describe the following two properties of the martingale component
$\widetilde M_t$ of the multiplicative decomposition
* while $E_0 \widetilde M_t = 1$ for all $t \geq 0$,
nevertheless $\ldots$
* as $t \rightarrow +\infty$, $\widetilde M_t$ converges to
zero almost surely
The first property follows from the fact that $\widetilde M_t$ is a multiplicative martingale with initial condition
$\widetilde M_0 = 1$.
The second is a **peculiar property** noted and proved by Hansen and Sargent {cite}`Hans_Sarg_book`.
```{important}
**Current text:**
```markdown
Hansen and Sargent {cite}`Hans_Sarg_book` (ch. 8) describe the following two properties of the martingale component
$\widetilde M_t$ of the multiplicative decomposition
* while $E_0 \widetilde M_t = 1$ for all $t \geq 0$,
nevertheless $\ldots$
* as $t \rightarrow +\infty$, $\widetilde M_t$ converges to
zero almost surely
The first property follows from the fact that $\widetilde M_t$ is a multiplicative martingale with initial condition
$\widetilde M_0 = 1$.
The second is a **peculiar property** noted and proved by Hansen and Sargent {cite}`Hans_Sarg_book`.
The following simulation of many paths of $\widetilde M_t$ illustrates both propertiesSuggested improvement: Hansen and Sargent {cite}`Hans_Sarg_book` (ch. 8) describe the following two properties of the martingale component
$\widetilde M_t$ of the multiplicative decomposition
* while $E_0 \widetilde M_t = 1$ for all $t \geq 0$,
nevertheless $\ldots$
* as $t \rightarrow +\infty$, $\widetilde M_t$ converges to
zero almost surely
The first property follows from the fact that $\widetilde M_t$ is a multiplicative martingale with initial condition
$\widetilde M_0 = 1$.
The second is a **peculiar property** noted and proved by Hansen and Sargent {cite}`Hans_Sarg_book`.Explanation: An "important" admonition draws attention to this paradoxical result and prepares readers to interpret the simulation correctly, highlighting why the constant mean (dotted line) and collapsing confidence interval can coexist. 7. qe-writing-007 - Use visual elements to enhance understandingLocation: Section "Linear state-space representation" / After presenting the state space matrices Severity: info Description: The state space representation involves augmented matrices with specific block structure that could be clarified with visual formatting or color-coding of matrix blocks.
Next we construct a linear system
$$
\begin{bmatrix}
1 \\
x_{t+1} \\
y_{t+1}
\end{bmatrix} =
\begin{bmatrix}
1 & 0 & 0 \\
0 & A & 0 \\
\nu & D & 1
\end{bmatrix}
\begin{bmatrix}
1 \\
x_t \\
y_t
\end{bmatrix} +
\begin{bmatrix}
0 \\ B \\ F
\end{bmatrix}
z_{t+1}
$$
Next we construct a linear system
```{note}
The augmented state vector includes a constant (1), the VAR state ($x_t$), and the additive functional ($y_t$). This representation embeds the dynamics of both processes in a single linear state space system.Suggested improvement: Next we construct a linear systemExplanation: Adding a note before the matrix equation helps readers understand the structure and purpose of the augmented system, making the mathematical representation more accessible. 8. qe-writing-007 - Use visual elements to enhance understandingLocation: Section "More about the multiplicative martingale" / Before the density plots Severity: info Description: The section discusses the log-normal distribution of the multiplicative martingale but could use an admonition to highlight the key mathematical insight before showing the density evolution.
It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$ and that consequently ${\widetilde M}_t$ is log normal.
### Simulating a multiplicative martingale again
Next, we want a program to simulate the likelihood ratio process $\{ \tilde{M}_t \}_{t=0}^\infty$.
It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$ and that consequently ${\widetilde M}_t$ is log normal.
```{note}
**Current text:**
```markdown
It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$ and that consequently ${\widetilde M}_t$ is log normal.
### Simulating a multiplicative martingale again
Next, we want a program to simulate the likelihood ratio process $\{ \tilde{M}_t \}_{t=0}^\infty$.Suggested improvement: It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$ and that consequently ${\widetilde M}_t$ is log normal.Explanation: This admonition bridges the theoretical result and the visualizations that follow, helping readers connect the mathematical properties to the distributional dynamics shown in the density plots. |
✅ Deploy Preview for lustrous-melomakarona-3ee73e ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📋 Style Guide Review: additive_functionals
This PR addresses style guide compliance issues found in the
additive_functionalslecture.📊 Summary
📝 Changes by Category
🔍 Issues by Rule
🤖 This PR was automatically generated by the QuantEcon Style Guide Checker
📊 See the comment below for complete violation details