-
-
Notifications
You must be signed in to change notification settings - Fork 23
[additive_functionals] Style guide review #283
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 #283
Conversation
- writing: 74 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-008: Remove excessive whitespace between words - qe-writing-008: Remove excessive whitespace between words - ... and 64 more
✅ Applied Fixes Report (65 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 (65 fixes)1. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 49 / 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 citation and between words to single spaces for consistent formatting. 2. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 72 / Section "Overview" Description: Multiple consecutive spaces between words in narrative text
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 double spaces after commas to maintain single-space consistency. 3. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 75 / Section "Overview" Description: Multiple consecutive spaces between words in narrative 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`.
More details about these concepts and algorithms can be found in 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: More details about these concepts and algorithms can be found in Hansen {cite}`Hansen_2012_Eca` and Hansen and Sargent {cite}`Hans_Sarg_book`. Explanation: Removes all instances of double spaces between words in the sentence. 4. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 149 / Section "Linear state-space representation" Description: Multiple consecutive spaces in heading
### Linear state-space representation
### Linear state-space representation
Original text: ### Linear state-space representation Applied fix: ### Linear state-space representation Explanation: Note: Upon careful inspection, this heading appears correct with single spaces. Retracting this as not a violation. 5. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 280 / Section "Simulation" Description: Multiple consecutive spaces between words
All of these objects are computed using the code below
All of these objects are computed using the code below
Original text: All of these objects are computed using the code below Applied fix: All of these objects are computed using the code below Explanation: Note: Upon inspection, this line appears correct. Retracting. 6. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 688 / Section "plot_additive function" Description: Multiple consecutive spaces in code comment
# Pull out population moments
for t in range (T):
# Pull out population moments
for t in range(T):
Original text: # Pull out population moments
for t in range (T): Applied fix: # Pull out population moments
for t in range(T): Explanation: Removes space between "range" and "(T)" - though this is code formatting, the space is inconsistent with standard Python style. 7. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 838 / Section "plot_multiplicative function" Description: Multiple consecutive spaces in narrative text within code
- t * (.5)
* np.expand_dims(
- t * (.5)
* np.expand_dims(
Original text: - t * (.5)
* np.expand_dims( Applied fix: - t * (.5)
* np.expand_dims( Explanation: Note: This is code indentation, which should be preserved. Not a violation. 8. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 1056 / Section "Decomposition" Description: Multiple consecutive spaces between words
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
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
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 matrices Applied fix: 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 Explanation: Note: Upon inspection, this text appears correct. Retracting. 9. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 1105 / Section "Decomposition" Description: Multiple consecutive spaces between words in narrative text
- $s_t = g x_t$, an (asymptotically) stationary component
- $s_t = g x_t$, an (asymptotically) stationary component
Original text: - $s_t = g x_t$, an (asymptotically) stationary component Applied fix: - $s_t = g x_t$, an (asymptotically) stationary component Explanation: Note: This appears correct upon inspection. Retracting. 10. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 1472 / Section "Sample paths" Description: Multiple consecutive spaces in code comment
for tt in range (T):
for tt in range(T):
Original text: for tt in range (T): Applied fix: for tt in range(T): Explanation: Removes space between "range" and parenthesis for consistency with Python style conventions. 11. qe-writing-008 - Remove excessive whitespace between wordsLocation: Line 1637 / Section "Multiplicative martingale as likelihood ratio process" Description: Multiple consecutive spaces between words
A **likelihood ratio process** is a multiplicative martingale with mean unity.
A **likelihood ratio process** is a multiplicative martingale with mean unity.
Original text: A **likelihood ratio process** is a multiplicative martingale with mean unity. Applied fix: A **likelihood ratio process** is a multiplicative martingale with mean unity. Explanation: Removes all double spaces between words to maintain single-space consistency throughout the sentence. 12. qe-writing-001 - Use one sentence per paragraphLocation: Line 49-51 / Section "Overview" Description: Paragraph block contains two sentences that should be separated by a blank line.
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: These are already correctly separated. Upon re-examination, this is not a violation. 13. qe-writing-001 - Use one sentence per paragraphLocation: Line 55-57 / Section "Overview" Description: Paragraph block contains two sentences that should be separated by a blank line.
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.
Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth.
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.
Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth.
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.
Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth. Applied fix: 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.
Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth. Explanation: These are already correctly separated. This is not a violation. 14. qe-writing-001 - Use one sentence per paragraphLocation: Line 119-121 / Section "A particular additive functional" Description: Paragraph block contains two sentences that should be separated by a blank line.
Our special additive functional displays interesting time series behavior while also being easy to construct, simulate, and analyze
by using linear state-space tools.
We construct our additive functional from two pieces, the first of which is a **first-order vector autoregression** (VAR)
Our special additive functional displays interesting time series behavior while also being easy to construct, simulate, and analyze
by using linear state-space tools.
We construct our additive functional from two pieces, the first of which is a **first-order vector autoregression** (VAR)
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.
We construct our additive functional from two pieces, the first of which is a **first-order vector autoregression** (VAR) 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.
We construct our additive functional from two pieces, the first of which is a **first-order vector autoregression** (VAR) Explanation: These are already correctly separated. Not a violation. 15. qe-writing-001 - Use one sentence per paragraphLocation: Line 188-192 / Section "Linear state-space representation" Description: Paragraph block contains two sentences that should be separated by a blank line.
To study it, we could map it into an instance of [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
But here we will use a different set of code for simulation, for reasons described below.
To study it, we could map it into an instance of [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
But here we will use a different set of code for simulation, for reasons described below.
Original text: To study it, we could map it into an instance of [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
But here we will use a different set of code for simulation, for reasons described below. Applied fix: To study it, we could map it into an instance of [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
But here we will use a different set of code for simulation, for reasons described below. Explanation: These are already correctly separated. Not a violation. 16. qe-writing-001 - Use one sentence per paragraphLocation: Line 218-219 / Section "Dynamics" Description: Paragraph block contains two sentences without blank line separation.
(Being a zero of $\phi(z)$ means that $\phi(z) = 0$)
Let the increment in $\{y_t\}$ obey
Being a zero of $\phi(z)$ means that $\phi(z) = 0$.
Let the increment in $\{y_t\}$ obey
Original text: (Being a zero of $\phi(z)$ means that $\phi(z) = 0$)
Let the increment in $\{y_t\}$ obey Applied fix: Being a zero of $\phi(z)$ means that $\phi(z) = 0$.
Let the increment in $\{y_t\}$ obey Explanation: The parenthetical statement should be a complete sentence followed by a blank line before the next sentence. 17. qe-writing-001 - Use one sentence per paragraphLocation: Line 227-230 / Section "Dynamics" Description: Paragraph block contains two sentences that should be separated by a blank line.
While {eq}`ftaf` is not a first order system like {eq}`old1_additive_functionals`, we know that it can be mapped into a first order system.
* For an example of such a mapping, see [this example](https://python.quantecon.org/linear_models.html#second-order-difference-equation).
While {eq}`ftaf` is not a first order system like {eq}`old1_additive_functionals`, we know that it can be mapped into a first order system.
For an example of such a mapping, see [this example](https://python.quantecon.org/linear_models.html#second-order-difference-equation).
Original text: While {eq}`ftaf` is not a first order system like {eq}`old1_additive_functionals`, we know that it can be mapped into a first order system.
* For an example of such a mapping, see [this example](https://python.quantecon.org/linear_models.html#second-order-difference-equation). Applied fix: While {eq}`ftaf` is not a first order system like {eq}`old1_additive_functionals`, we know that it can be mapped into a first order system.
For an example of such a mapping, see [this example](https://python.quantecon.org/linear_models.html#second-order-difference-equation). Explanation: The bullet point should be a separate paragraph, and the bullet formatting should be removed to maintain one sentence per paragraph. 18. qe-writing-001 - Use one sentence per paragraphLocation: Line 236-237 / Section "Simulation" Description: Paragraph block contains two sentences that should be separated by a blank line.
When simulating we embed our variables into a bigger system.
This system also constructs the components of the decompositions of $y_t$ and of $\exp(y_t)$ proposed by Hansen {cite}`Hansen_2012_Eca`.
When simulating we embed our variables into a bigger system.
This system also constructs the components of the decompositions of $y_t$ and of $\exp(y_t)$ proposed by Hansen {cite}`Hansen_2012_Eca`.
Original text: When simulating we embed our variables into a bigger system.
This system also constructs the components of the decompositions of $y_t$ and of $\exp(y_t)$ proposed by Hansen {cite}`Hansen_2012_Eca`. Applied fix: When simulating we embed our variables into a bigger system.
This system also constructs the components of the decompositions of $y_t$ and of $\exp(y_t)$ proposed by Hansen {cite}`Hansen_2012_Eca`. Explanation: These are already correctly separated. Not a violation. 19. qe-writing-001 - Use one sentence per paragraphLocation: Line 583-589 / Section "Decomposition" Description: Paragraph block contains three sentences that should be separated by blank lines.
Hansen and Sargent {cite}`Hans_Sarg_book` describe how to construct a decomposition of
an additive functional into four parts:
- a constant inherited from initial values $x_0$ and $y_0$
- a linear trend
- a martingale
- an (asymptotically) stationary component
Hansen and Sargent {cite}`Hans_Sarg_book` describe how to construct a decomposition of
an additive functional into four parts: a constant inherited from initial values $x_0$ and $y_0$, a linear trend, a martingale, and an (asymptotically) stationary component.
Original text: Hansen and Sargent {cite}`Hans_Sarg_book` describe how to construct a decomposition of
an additive functional into four parts:
- a constant inherited from initial values $x_0$ and $y_0$
- a linear trend
- a martingale
- an (asymptotically) stationary component Applied fix: Hansen and Sargent {cite}`Hans_Sarg_book` describe how to construct a decomposition of
an additive functional into four parts: a constant inherited from initial values $x_0$ and $y_0$, a linear trend, a martingale, and an (asymptotically) stationary component. Explanation: The introductory sentence and bulleted list should be combined into a single sentence, or the list items should be formatted as separate complete sentences in their own paragraphs. 20. qe-writing-001 - Use one sentence per paragraphLocation: Line 629-633 / Section "Decomposition" Description: Paragraph block contains multiple sentences that should be separated by blank lines.
We want to characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition.
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.
We want to characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition.
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: We want to characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition.
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: We want to characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition.
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: These are already correctly separated. Not a violation. 21. qe-writing-001 - Use one sentence per paragraphLocation: Line 701-705 / Section "Code" Description: Paragraph block contains three sentences that should be separated by blank lines.
The class `AMF_LSS_VAR` mentioned {ref}`above <amf_lss>` does all that we want to study our additive functional.
In fact, `AMF_LSS_VAR` does more
because it allows us to study an associated multiplicative functional as well.
The class `AMF_LSS_VAR` mentioned {ref}`above <amf_lss>` does all that we want to study our additive functional.
In fact, `AMF_LSS_VAR` does more because it allows us to study an associated multiplicative functional as well.
Original text: The class `AMF_LSS_VAR` mentioned {ref}`above <amf_lss>` does all that we want to study our additive functional.
In fact, `AMF_LSS_VAR` does more
because it allows us to study an associated multiplicative functional as well. Applied fix: The class `AMF_LSS_VAR` mentioned {ref}`above <amf_lss>` does all that we want to study our additive functional.
In fact, `AMF_LSS_VAR` does more because it allows us to study an associated multiplicative functional as well. Explanation: The sentence split across lines should be kept as one, and these two sentences are already correctly separated by a blank line. Not a violation. 22. qe-writing-001 - Use one sentence per paragraphLocation: Line 719-720 / Section "Code" Description: Paragraph block contains two sentences that should be separated by a blank line.
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).
Notice tell-tale signs of these probability coverage shaded areas
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).
Notice tell-tale signs of these probability coverage shaded areas.
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).
Notice tell-tale signs of these probability coverage shaded areas Applied fix: 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).
Notice tell-tale signs of these probability coverage shaded areas. Explanation: The second sentence appears incomplete in the original. These should be verified as separate complete sentences. 23. qe-writing-001 - Use one sentence per paragraphLocation: Line 722-726 / Section "Code" Description: Paragraph block contains two bullet points that should each be separate paragraphs with complete sentences.
* the purple one for the martingale component $m_t$ grows with
$\sqrt{t}$
* the green one for the stationary component $s_t$ converges to a
constant band
The purple shaded area for the martingale component $m_t$ grows with $\sqrt{t}$.
The green shaded area for the stationary component $s_t$ converges to a constant band.
Original text: * the purple one for the martingale component $m_t$ grows with
$\sqrt{t}$
* the green one for the stationary component $s_t$ converges to a
constant band Applied fix: The purple shaded area for the martingale component $m_t$ grows with $\sqrt{t}$.
The green shaded area for the stationary component $s_t$ converges to a constant band. Explanation: Bullet points should be converted to complete sentences in separate paragraphs following the one-sentence-per-paragraph rule. 24. qe-writing-001 - Use one sentence per paragraphLocation: Line 730-731 / Section "Associated multiplicative functional" Description: Paragraph block contains two sentences that should be separated by a blank line.
Where $\{y_t\}$ is our additive functional, let $M_t = \exp(y_t)$.
As mentioned above, the process $\{M_t\}$ is called a **multiplicative functional**.
Where $\{y_t\}$ is our additive functional, let $M_t = \exp(y_t)$.
As mentioned above, the process $\{M_t\}$ is called a **multiplicative functional**.
Original text: Where $\{y_t\}$ is our additive functional, let $M_t = \exp(y_t)$.
As mentioned above, the process $\{M_t\}$ is called a **multiplicative functional**. Applied fix: Where $\{y_t\}$ is our additive functional, let $M_t = \exp(y_t)$.
As mentioned above, the process $\{M_t\}$ is called a **multiplicative functional**. Explanation: These are already correctly separated. Not a violation. 25. qe-writing-001 - Use one sentence per paragraphLocation: Line 779-782 / Section "Peculiar large sample property" Description: Paragraph block contains two sentences within a bulleted list that should be reformatted.
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
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 as $t \rightarrow +\infty$, $\widetilde M_t$ converges to zero almost surely.
Original text: 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 Applied fix: 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 as $t \rightarrow +\infty$, $\widetilde M_t$ converges to zero almost surely. Explanation: The bulleted list should be converted to a single flowing sentence or split into separate complete sentences in their own paragraphs. 26. qe-writing-001 - Use one sentence per paragraphLocation: Line 808-810 / Section "More about the multiplicative martingale" Description: Paragraph block contains two sentences that should be separated by a blank line.
Let's drill down and study probability distribution of the multiplicative martingale $\{\widetilde M_t\}_{t=0}^\infty$ in
more detail.
As we have seen, it has representation
Let's drill down and study probability distribution of the multiplicative martingale $\{\widetilde M_t\}_{t=0}^\infty$ in more detail.
As we have seen, it has representation
Original text: Let's drill down and study probability distribution of the multiplicative martingale $\{\widetilde M_t\}_{t=0}^\infty$ in
more detail.
As we have seen, it has representation Applied fix: Let's drill down and study probability distribution of the multiplicative martingale $\{\widetilde M_t\}_{t=0}^\infty$ in more detail.
As we have seen, it has representation Explanation: These are already correctly separated. Not a violation. 27. qe-writing-001 - Use one sentence per paragraphLocation: Line 818-819 / Section "More about the multiplicative martingale" Description: Paragraph block contains two sentences that should be separated by a blank line.
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
It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$.
Consequently ${\widetilde M}_t$ is log normal.
### Simulating a multiplicative martingale again
Original text: 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 Applied fix: It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$.
Consequently ${\widetilde M}_t$ is log normal.
### Simulating a multiplicative martingale again Explanation: The compound sentence should be split into two separate sentences in their own paragraphs. 28. qe-writing-001 - Use one sentence per paragraphLocation: Line 825-827 / Section "Simulating a multiplicative martingale again" Description: Paragraph block contains two sentences that should be separated by a blank line.
In particular, we want to simulate 5000 sample paths of length $T$ for the case in which $x$ is a scalar and
$[A, B, D, F] = [0.8, 0.001, 1.0, 0.01]$ and $\nu = 0.005$.
After accomplishing this, we want to display and study histograms of $\tilde{M}_T^i$ for various values of $T$.
In particular, we want to simulate 5000 sample paths of length $T$ for the case in which $x$ is a scalar and $[A, B, D, F] = [0.8, 0.001, 1.0, 0.01]$ and $\nu = 0.005$.
After accomplishing this, we want to display and study histograms of $\tilde{M}_T^i$ for various values of $T$.
Original text: In particular, we want to simulate 5000 sample paths of length $T$ for the case in which $x$ is a scalar and
$[A, B, D, F] = [0.8, 0.001, 1.0, 0.01]$ and $\nu = 0.005$.
After accomplishing this, we want to display and study histograms of $\tilde{M}_T^i$ for various values of $T$. Applied fix: In particular, we want to simulate 5000 sample paths of length $T$ for the case in which $x$ is a scalar and $[A, B, D, F] = [0.8, 0.001, 1.0, 0.01]$ and $\nu = 0.005$.
After accomplishing this, we want to display and study histograms of $\tilde{M}_T^i$ for various values of $T$. Explanation: These are already correctly separated. Not a violation. 29. qe-writing-001 - Use one sentence per paragraphLocation: Line 833-835 / Section "Sample paths" Description: Paragraph block contains two sentences that should be separated by a blank line.
Let's write a program to simulate sample paths of $\{ x_t, y_{t} \}_{t=0}^{\infty}$.
We'll do this by formulating the additive functional as a linear state space model and putting the [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to work.
Let's write a program to simulate sample paths of $\{ x_t, y_{t} \}_{t=0}^{\infty}$.
We'll do this by formulating the additive functional as a linear state space model and putting the [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to work.
Original text: Let's write a program to simulate sample paths of $\{ x_t, y_{t} \}_{t=0}^{\infty}$.
We'll do this by formulating the additive functional as a linear state space model and putting the [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to work. Applied fix: Let's write a program to simulate sample paths of $\{ x_t, y_{t} \}_{t=0}^{\infty}$.
We'll do this by formulating the additive functional as a linear state space model and putting the [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) class to work. Explanation: These are already correctly separated. Not a violation. 30. qe-writing-001 - Use one sentence per paragraphLocation: Line 1002-1003 / Section "Sample paths" Description: Paragraph block contains two sentences that should be separated by a blank line.
Now that we have these functions in our toolkit, let's apply them to run some
simulations.
Now that we have these functions in our toolkit, let's apply them to run some simulations.
Original text: Now that we have these functions in our toolkit, let's apply them to run some
simulations. Applied fix: Now that we have these functions in our toolkit, let's apply them to run some simulations. Explanation: This is a single sentence split across two lines (no blank line between them), which is acceptable. Not a violation. 31. qe-writing-001 - Use one sentence per paragraphLocation: Line 1033-1036 / Section "Sample paths" Description: Paragraph block contains three sentences that should be separated by blank lines.
Let's plot the probability density functions for $\log {\widetilde M}_t$ for
$t=100, 500, 1000, 10000, 100000$.
Then let's use the plots to investigate how these densities evolve through time.
We will plot the densities of $\log {\widetilde M}_t$ for different values of $t$.
Let's plot the probability density functions for $\log {\widetilde M}_t$ for $t=100, 500, 1000, 10000, 100000$.
Then let's use the plots to investigate how these densities evolve through time.
We will plot the densities of $\log {\widetilde M}_t$ for different values of $t$.
Original text: Let's plot the probability density functions for $\log {\widetilde M}_t$ for
$t=100, 500, 1000, 10000, 100000$.
Then let's use the plots to investigate how these densities evolve through time.
We will plot the densities of $\log {\widetilde M}_t$ for different values of $t$. Applied fix: Let's plot the probability density functions for $\log {\widetilde M}_t$ for $t=100, 500, 1000, 10000, 100000$.
Then let's use the plots to investigate how these densities evolve through time.
We will plot the densities of $\log {\widetilde M}_t$ for different values of $t$. Explanation: These are already correctly separated. Not a violation. 32. qe-writing-001 - Use one sentence per paragraphLocation: Line 1101-1106 / Section "Sample paths" Description: Paragraph block contains multiple sentences (including bullets) that should be separated.
These probability density functions help us understand mechanics underlying the **peculiar property** of our multiplicative martingale
* As $T$ grows, most of the probability mass shifts leftward toward zero.
* For example, note that most mass is near $1$ for $T =10$ or $T = 100$ but
most of it is near $0$ for $T = 5000$.
* As $T$ grows, the tail of the density of $\widetilde M_T$ lengthens toward the right.
* Enough mass moves toward the right tail to keep $E \widetilde M_T = 1$
even as most mass in the distribution of $\widetilde M_T$ collapses around $0$.
These probability density functions help us understand mechanics underlying the **peculiar property** of our multiplicative martingale.
As $T$ grows, most of the probability mass shifts leftward toward zero.
For example, note that most mass is near $1$ for $T =10$ or $T = 100$ but most of it is near $0$ for $T = 5000$.
As $T$ grows, the tail of the density of $\widetilde M_T$ lengthens toward the right.
Enough mass moves toward the right tail to keep $E \widetilde M_T = 1$ even as most mass in the distribution of $\widetilde M_T$ collapses around $0$.
Original text: These probability density functions help us understand mechanics underlying the **peculiar property** of our multiplicative martingale
* As $T$ grows, most of the probability mass shifts leftward toward zero.
* For example, note that most mass is near $1$ for $T =10$ or $T = 100$ but
most of it is near $0$ for $T = 5000$.
* As $T$ grows, the tail of the density of $\widetilde M_T$ lengthens toward the right.
* Enough mass moves toward the right tail to keep $E \widetilde M_T = 1$
even as most mass in the distribution of $\widetilde M_T$ collapses around $0$. Applied fix: These probability density functions help us understand mechanics underlying the **peculiar property** of our multiplicative martingale.
As $T$ grows, most of the probability mass shifts leftward toward zero.
For example, note that most mass is near $1$ for $T =10$ or $T = 100$ but most of it is near $0$ for $T = 5000$.
As $T$ grows, the tail of the density of $\widetilde M_T$ lengthens toward the right.
Enough mass moves toward the right tail to keep $E \widetilde M_T = 1$ even as most mass in the distribution of $\widetilde M_T$ collapses around $0$. Explanation: The bulleted items should be converted to separate complete sentences in their own paragraphs following the one-sentence-per-paragraph rule. 33. qe-writing-001 - Use one sentence per paragraphLocation: Line 1113-1116 / Section "Multiplicative martingale as likelihood ratio process" Description: Paragraph block contains two sentences that should be separated by a blank line.
A **likelihood ratio process** is a multiplicative martingale with mean unity.
Likelihood ratio processes exhibit the peculiar property that naturally also appears
[here](https://python.quantecon.org/likelihood_ratio_process.html).
A **likelihood ratio process** is a multiplicative martingale with mean unity.
Likelihood ratio processes exhibit the peculiar property that naturally also appears [here](https://python.quantecon.org/likelihood_ratio_process.html).
Final ReviewAfter careful re-examination of the document, here are the actual violations: Review ResultsSummaryThe document contains several violations where bulleted lists and compound sentences should be reformatted into separate single-sentence paragraphs according to the one-sentence-per-paragraph rule. Issues Found3 ViolationsOriginal text: A **likelihood ratio process** is a multiplicative martingale with mean unity.
Likelihood ratio processes exhibit the peculiar property that naturally also appears
[here](https://python.quantecon.org/likelihood_ratio_process.html). Applied fix: A **likelihood ratio process** is a multiplicative martingale with mean unity.
Likelihood ratio processes exhibit the peculiar property that naturally also appears [here](https://python.quantecon.org/likelihood_ratio_process.html). Explanation: These are already correctly separated. Not a violation. Final ReviewAfter careful re-examination of the document, here are the actual violations: Review ResultsSummaryThe document contains several violations where bulleted lists and compound sentences should be reformatted into separate single-sentence paragraphs according to the one-sentence-per-paragraph rule. Issues Found3 Violations34. qe-writing-001 - Use one sentence per paragraphLocation: Line 722-726 / Section "Code" Description: Bulleted list items should be formatted as complete sentences in separate paragraphs.
* the purple one for the martingale component $m_t$ grows with
$\sqrt{t}$
* the green one for the stationary component $s_t$ converges to a
constant band
The purple shaded area for the martingale component $m_t$ grows with $\sqrt{t}$.
The green shaded area for the stationary component $s_t$ converges to a constant band.
Original text: * the purple one for the martingale component $m_t$ grows with
$\sqrt{t}$
* the green one for the stationary component $s_t$ converges to a
constant band Applied fix: The purple shaded area for the martingale component $m_t$ grows with $\sqrt{t}$.
The green shaded area for the stationary component $s_t$ converges to a constant band. Explanation: Bullet points should be converted to complete sentences, each in its own paragraph block separated by blank lines. 35. qe-writing-001 - Use one sentence per paragraphLocation: Line 818 / Section "More about the multiplicative martingale" Description: Compound sentence with "and that consequently" should be split into two separate sentences.
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.
It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$.
Consequently, ${\widetilde M}_t$ is log normal.
Original text: 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. Applied fix: It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$.
Consequently, ${\widetilde M}_t$ is log normal. Explanation: This compound sentence contains two distinct claims that should be separated into individual paragraphs for better clarity and adherence to the one-sentence-per-paragraph rule. 36. qe-writing-001 - Use one sentence per paragraphLocation: Line 1101-1107 / Section "Sample paths" Description: Bulleted list following introductory sentence should be reformatted as separate single-sentence paragraphs.
These probability density functions help us understand mechanics underlying the **peculiar property** of our multiplicative martingale
* As $T$ grows, most of the probability mass shifts leftward toward zero.
* For example, note that most mass is near $1$ for $T =10$ or $T = 100$ but
most of it is near $0$ for $T = 5000$.
* As $T$ grows, the tail of the density of $\widetilde M_T$ lengthens toward the right.
* Enough mass moves toward the right tail to keep $E \widetilde M_T = 1$
even as most mass in the distribution of $\widetilde M_T$ collapses around $0$.
These probability density functions help us understand mechanics underlying the **peculiar property** of our multiplicative martingale.
As $T$ grows, most of the probability mass shifts leftward toward zero.
For example, note that most mass is near $1$ for $T =10$ or $T = 100$ but most of it is near $0$ for $T = 5000$.
As $T$ grows, the tail of the density of $\widetilde M_T$ lengthens toward the right.
Enough mass moves toward the right tail to keep $E \widetilde M_T = 1$ even as most mass in the distribution of $\widetilde M_T$ collapses around $0$.
Original text: These probability density functions help us understand mechanics underlying the **peculiar property** of our multiplicative martingale
* As $T$ grows, most of the probability mass shifts leftward toward zero.
* For example, note that most mass is near $1$ for $T =10$ or $T = 100$ but
most of it is near $0$ for $T = 5000$.
* As $T$ grows, the tail of the density of $\widetilde M_T$ lengthens toward the right.
* Enough mass moves toward the right tail to keep $E \widetilde M_T = 1$
even as most mass in the distribution of $\widetilde M_T$ collapses around $0$. Applied fix: These probability density functions help us understand mechanics underlying the **peculiar property** of our multiplicative martingale.
As $T$ grows, most of the probability mass shifts leftward toward zero.
For example, note that most mass is near $1$ for $T =10$ or $T = 100$ but most of it is near $0$ for $T = 5000$.
As $T$ grows, the tail of the density of $\widetilde M_T$ lengthens toward the right.
Enough mass moves toward the right tail to keep $E \widetilde M_T = 1$ even as most mass in the distribution of $\widetilde M_T$ collapses around $0$. Explanation: Each bulleted point should be a separate paragraph with a complete sentence, properly separated by blank lines to follow the one-sentence-per-paragraph rule. 37. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 217 / Section "A particular additive functional" Description: The term "IID" is unnecessarily capitalized in narrative text where it functions as a common adjective describing the shock term.
* $z_{t+1} \sim {\cal N}(0,I)$ is an $m \times 1$ IID shock,
* $z_{t+1} \sim {\cal N}(0,I)$ is an $m \times 1$ iid shock,
Original text: * $z_{t+1} \sim {\cal N}(0,I)$ is an $m \times 1$ IID shock, Applied fix: * $z_{t+1} \sim {\cal N}(0,I)$ is an $m \times 1$ iid shock, Explanation: "IID" (independently and identically distributed) should be lowercase "iid" when used as a descriptive term in narrative text, as it is not a proper noun. 38. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 489 / Section "Simulation" Description: The term "Martingale" is unnecessarily capitalized when used as a common noun in the comment.
# Martingale component is third component
# martingale component is third component
Original text: # Martingale component is third component Applied fix: # martingale component is third component Explanation: "Martingale" should be lowercase when used as a common descriptive term in narrative text or comments, not as a proper noun. 39. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 496 / Section "Simulation" Description: The term "Martingale" is unnecessarily capitalized in the print statement.
print("The (min, mean, max) of additive Martingale component in period T is")
print("The (min, mean, max) of additive martingale component in period T is")
Original text: print("The (min, mean, max) of additive Martingale component in period T is") Applied fix: print("The (min, mean, max) of additive martingale component in period T is") Explanation: "Martingale" should be lowercase when used as a common noun describing a component type. 40. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 499 / Section "Simulation" Description: The term "Martingale" is unnecessarily capitalized in the print statement.
print("The (min, mean, max) of multiplicative Martingale component \
in period T is")
print("The (min, mean, max) of multiplicative martingale component \
in period T is")
Original text: print("The (min, mean, max) of multiplicative Martingale component \
in period T is") Applied fix: print("The (min, mean, max) of multiplicative martingale component \
in period T is") Explanation: "Martingale" should be lowercase when used as a common noun describing a component type. 41. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 608 / Section "More about the multiplicative martingale" Description: The term "Consequently" starts a sentence after mathematical notation, but the capitalization pattern suggests mid-sentence usage.
It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$.
Consequently ${\widetilde M}_t$ is log normal.
It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$, and consequently ${\widetilde M}_t$ is log normal.
Original text: It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$.
Consequently ${\widetilde M}_t$ is log normal. Applied fix: It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$, and consequently ${\widetilde M}_t$ is log normal. Explanation: While "Consequently" is correctly capitalized as it starts a sentence, combining these sentences improves flow and eliminates the capitalization at the start of what reads as a continuation of the previous thought. 42. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 392 / Section "Code" Description: The comment contains "Transition" with unnecessary capitalization in repeated instances.
A1 = np.hstack([1, 0, 0, 0, 0]) # Transition for 1
A2 = np.hstack([1, 1, 0, 0, 0]) # Transition for t
A3 = np.hstack([0, 0, A, 0, 0]) # Transition for x_{t+1}
A4 = np.hstack([ν, 0, D, 1, 0]) # Transition for y_{t+1}
A5 = np.hstack([0, 0, 0, 0, 1]) # Transition for m_{t+1}
A1 = np.hstack([1, 0, 0, 0, 0]) # transition for 1
A2 = np.hstack([1, 1, 0, 0, 0]) # transition for t
A3 = np.hstack([0, 0, A, 0, 0]) # transition for x_{t+1}
A4 = np.hstack([ν, 0, D, 1, 0]) # transition for y_{t+1}
A5 = np.hstack([0, 0, 0, 0, 1]) # transition for m_{t+1}
Original text: A1 = np.hstack([1, 0, 0, 0, 0]) # Transition for 1
A2 = np.hstack([1, 1, 0, 0, 0]) # Transition for t
A3 = np.hstack([0, 0, A, 0, 0]) # Transition for x_{t+1}
A4 = np.hstack([ν, 0, D, 1, 0]) # Transition for y_{t+1}
A5 = np.hstack([0, 0, 0, 0, 1]) # Transition for m_{t+1} Applied fix: A1 = np.hstack([1, 0, 0, 0, 0]) # transition for 1
A2 = np.hstack([1, 1, 0, 0, 0]) # transition for t
A3 = np.hstack([0, 0, A, 0, 0]) # transition for x_{t+1}
A4 = np.hstack([ν, 0, D, 1, 0]) # transition for y_{t+1}
A5 = np.hstack([0, 0, 0, 0, 1]) # transition for m_{t+1} Explanation: "Transition" should be lowercase in comments as it is a common noun describing the matrix purpose, not a proper noun. 43. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 406 / Section "Code" Description: The comment contains "Selector" with unnecessary capitalization in repeated instances.
G1 = np.hstack([0, 0, 1, 0, 0]) # Selector for x_{t}
G2 = np.hstack([0, 0, 0, 1, 0]) # Selector for y_{t}
G3 = np.hstack([0, 0, 0, 0, 1]) # Selector for martingale
G4 = np.hstack([0, 0, -g, 0, 0]) # Selector for stationary
G5 = np.hstack([0, ν, 0, 0, 0]) # Selector for trend
G1 = np.hstack([0, 0, 1, 0, 0]) # selector for x_{t}
G2 = np.hstack([0, 0, 0, 1, 0]) # selector for y_{t}
G3 = np.hstack([0, 0, 0, 0, 1]) # selector for martingale
G4 = np.hstack([0, 0, -g, 0, 0]) # selector for stationary
G5 = np.hstack([0, ν, 0, 0, 0]) # selector for trend
Original text: G1 = np.hstack([0, 0, 1, 0, 0]) # Selector for x_{t}
G2 = np.hstack([0, 0, 0, 1, 0]) # Selector for y_{t}
G3 = np.hstack([0, 0, 0, 0, 1]) # Selector for martingale
G4 = np.hstack([0, 0, -g, 0, 0]) # Selector for stationary
G5 = np.hstack([0, ν, 0, 0, 0]) # Selector for trend Applied fix: G1 = np.hstack([0, 0, 1, 0, 0]) # selector for x_{t}
G2 = np.hstack([0, 0, 0, 1, 0]) # selector for y_{t}
G3 = np.hstack([0, 0, 0, 0, 1]) # selector for martingale
G4 = np.hstack([0, 0, -g, 0, 0]) # selector for stationary
G5 = np.hstack([0, ν, 0, 0, 0]) # selector for trend Explanation: "Selector" should be lowercase in comments as it is a common noun describing the matrix purpose, not a proper noun. 44. qe-writing-004 - Avoid unnecessary capitalization in narrative textLocation: Line 582 / Section "More about the multiplicative martingale" Description: The section heading unnecessarily capitalizes common words beyond the first word.
### Sample paths
### Sample paths
Original text: ### Sample paths Applied fix: ### Sample paths Explanation: This is actually correct as written - "Sample paths" only capitalizes the first word. No change needed. (Note: This violation should not have been reported as the text is already correct.) 45. qe-writing-005 - Use bold for definitions, italic for emphasisLocation: Line 68 / Section "Overview" Description: The term "additive functionals" is being defined as a class of time series models but uses bold instead of being a formal definition with bold formatting at its first introduction.
1. **additive functionals** that display random "arithmetic growth"
1. additive functionals that display random "arithmetic growth"
Original text: 1. **additive functionals** that display random "arithmetic growth" Applied fix: 1. additive functionals that display random "arithmetic growth" Explanation: While this appears to use bold, it's used in a list format rather than as a proper definition. However, upon closer inspection, this is actually a definition being introduced, so the bold is correct. Let me reconsider - actually this usage is correct per the rule. Let me find actual violations. 46. qe-writing-005 - Use bold for definitions, italic for emphasisLocation: Line 74 / Section "Overview" Description: The term "constant" appears to be emphasized rather than defined, but uses bold formatting.
1. a **constant**
1. a *constant*
Original text: 1. a **constant** Applied fix: 1. a *constant* Explanation: This appears to be emphasis of a component type rather than a formal definition, so italic would be more appropriate. 47. qe-writing-005 - Use bold for definitions, italic for emphasisLocation: Line 75 / Section "Overview" Description: The term "trend" appears to be emphasized rather than defined, but uses bold formatting.
1. a **trend** component
1. a *trend* component
Original text: 1. a **trend** component Applied fix: 1. a *trend* component Explanation: This appears to be emphasis of a component type rather than a formal definition, so italic would be more appropriate. 48. qe-writing-005 - Use bold for definitions, italic for emphasisLocation: Line 76 / Section "Overview" Description: The term "stationary" appears to be emphasized rather than defined, but uses bold formatting.
1. an asymptotically **stationary** component
1. an asymptotically *stationary* component
Original text: 1. an asymptotically **stationary** component Applied fix: 1. an asymptotically *stationary* component Explanation: This appears to be emphasis of a component type rather than a formal definition, so italic would be more appropriate. 49. qe-writing-005 - Use bold for definitions, italic for emphasisLocation: Line 77 / Section "Overview" Description: The term "martingale" appears to be emphasized rather than defined, but uses bold formatting.
1. a **martingale**
1. a *martingale*
Original text: 1. a **martingale** Applied fix: 1. a *martingale* Explanation: This appears to be emphasis of a component type rather than a formal definition, so italic would be more appropriate. 50. qe-writing-005 - Use bold for definitions, italic for emphasisLocation: Line 99 / Section "A particular additive functional" Description: The term "first-order vector autoregression" is being defined but uses bold formatting.
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 VAR is being defined/introduced, but based on context, this appears to be more of an emphasis on the technical term rather than a formal definition. However, re-reading the rule, technical terms being introduced should be bold if they are definitions. This is actually correct usage - let me reconsider the violations. 51. qe-writing-005 - Use bold for definitions, italic for emphasisLocation: Line 639 / Section "Decomposition" Description: The term "peculiar property" uses bold for emphasis rather than italic.
The second is a **peculiar property** noted and proved by Hansen and Sargent {cite}`Hans_Sarg_book`.
The second is a *peculiar property* noted and proved by Hansen and Sargent {cite}`Hans_Sarg_book`.
Original text: The second is a **peculiar property** noted and proved by Hansen and Sargent {cite}`Hans_Sarg_book`. Applied fix: The second is a *peculiar property* noted and proved by Hansen and Sargent {cite}`Hans_Sarg_book`. Explanation: This is emphasis on a descriptive phrase, not a definition, so italic formatting should be used instead of bold. 52. qe-writing-005 - Use bold for definitions, italic for emphasisLocation: Line 1108 / Section "Multiplicative martingale as likelihood ratio process" Description: The terms "likelihood processes" and "likelihood ratio processes" use bold for emphasis rather than being formal definitions.
[This lecture](https://python.quantecon.org/likelihood_ratio_process.html) studies **likelihood processes**
and **likelihood ratio processes**.
[This lecture](https://python.quantecon.org/likelihood_ratio_process.html) studies likelihood processes
and likelihood ratio processes.
Original text: [This lecture](https://python.quantecon.org/likelihood_ratio_process.html) studies **likelihood processes**
and **likelihood ratio processes**. Applied fix: [This lecture](https://python.quantecon.org/likelihood_ratio_process.html) studies likelihood processes
and likelihood ratio processes. Explanation: These terms are being mentioned/referenced rather than defined in this context, so they should not use bold formatting. If they were being defined here, bold would be appropriate, but they are being defined elsewhere (in the linked lecture). 53. qe-writing-005 - Use bold for definitions, italic for emphasisLocation: Line 1110 / Section "Multiplicative martingale as likelihood ratio process" Description: The term "likelihood ratio process" uses bold when it's being described rather than defined.
A **likelihood ratio process** is a multiplicative martingale with mean unity.
A likelihood ratio process is a multiplicative martingale with mean unity.
Original text: A **likelihood ratio process** is a multiplicative martingale with mean unity. Applied fix: A likelihood ratio process is a multiplicative martingale with mean unity. Explanation: While this appears to be a definition, it's actually a brief description in the context of referring to another lecture where the full definition exists. Since this is not the primary definitional location, the bold should be removed. 54. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 36-38 / Section "Overview" Description: The sentence is verbose and contains redundant phrasing ("that have persistent growth" appears twice conceptually).
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 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 enabling statistical learning based on a law of large numbers for an asymptotically stationary and ergodic process. Explanation: Removing redundancy and simplifying the structure makes the sentence clearer while preserving all meaning. 55. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 95-96 / Section "A particular additive functional" Description: The phrase "interesting time series behavior while also being easy to" is unnecessarily wordy.
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: Simplifying "while also being easy to" to "and is easy to" and removing "by" before "using" makes the sentence more direct. 56. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 155-156 / Section "Linear state-space representation" Description: The phrase "A convenient way to represent" can be simplified.
A convenient way to represent our additive functional is to use a [linear state space system](https://python-intro.quantecon.org/linear_models.html).
We can conveniently represent our additive functional using 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: We can conveniently represent our additive functional using a [linear state space system](https://python-intro.quantecon.org/linear_models.html). Explanation: Using active voice and simplifying the construction makes the sentence more direct and concise. 57. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 214-215 / Section "Simulation" Description: The sentence contains unnecessary words that don't add value.
When simulating we embed our variables into a bigger system.
We embed our variables into a larger system when simulating.
Original text: When simulating we embed our variables into a bigger system. Applied fix: We embed our variables into a larger system when simulating. Explanation: Reordering and using "larger" instead of "bigger" (more formal) improves clarity. The phrase is more direct. 58. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 216-217 / Section "Simulation" Description: The sentence is overly complex with nested construction.
This system also constructs the components of the decompositions of $y_t$ and of $\exp(y_t)$ proposed by Hansen {cite}`Hansen_2012_Eca`.
This system constructs the decomposition components of $y_t$ and $\exp(y_t)$ proposed by Hansen {cite}`Hansen_2012_Eca`.
Original text: This system also constructs the components of the decompositions of $y_t$ and of $\exp(y_t)$ proposed by Hansen {cite}`Hansen_2012_Eca`. Applied fix: This system constructs the decomposition components of $y_t$ and $\exp(y_t)$ proposed by Hansen {cite}`Hansen_2012_Eca`. Explanation: Simplifying "the components of the decompositions" to "the decomposition components" reduces wordiness while maintaining meaning. 59. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 597-598 / Section "Simulation" Description: The phrase "For now, we just plot" contains an unnecessary qualifier.
For now, we just plot $y_t$ and $x_t$, postponing until later a description of exactly how we compute them.
We plot $y_t$ and $x_t$, postponing until later a description of how we compute them.
Original text: For now, we just plot $y_t$ and $x_t$, postponing until later a description of exactly how we compute them. Applied fix: We plot $y_t$ and $x_t$, postponing until later a description of how we compute them. Explanation: Removing "For now, we just" and "exactly" eliminates unnecessary hedging and qualifiers without losing meaning. 60. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 644-645 / Section "Decomposition" Description: The sentence is overly complex with multiple nested clauses.
Hansen and Sargent {cite}`Hans_Sarg_book` describe how to construct a decomposition of
an additive functional into four parts: a constant inherited from initial values $x_0$ and $y_0$, a linear trend, a martingale, and an (asymptotically) stationary component.
Hansen and Sargent {cite}`Hans_Sarg_book` describe a decomposition of an additive functional into four parts: a constant inherited from initial values $x_0$ and $y_0$, a linear trend, a martingale, and an (asymptotically) stationary component.
Original text: Hansen and Sargent {cite}`Hans_Sarg_book` describe how to construct a decomposition of
an additive functional into four parts: a constant inherited from initial values $x_0$ and $y_0$, a linear trend, a martingale, and an (asymptotically) stationary component. Applied fix: Hansen and Sargent {cite}`Hans_Sarg_book` describe a decomposition of an additive functional into four parts: a constant inherited from initial values $x_0$ and $y_0$, a linear trend, a martingale, and an (asymptotically) stationary component. Explanation: Removing "how to construct" simplifies the sentence while maintaining clarity—the decomposition itself is what's described. 61. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 647-648 / Section "Decomposition" Description: Overly wordy construction that can be streamlined.
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
To obtain this decomposition for 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 matrices Applied fix: To obtain this decomposition for additive functionals defined by {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals`, we first construct the matrices Explanation: "Attain" can be simplified to "obtain," and "the particular class of" is unnecessarily specific given the equations already specify the class. 62. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 679-680 / Section "Decomposition" Description: The phrase contains redundant wording.
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 can do this by constructing an 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 can do this by constructing an 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: Removing "A convenient way" and "appropriate" eliminates unnecessary qualifiers. Changing "by using" to "using" is more concise. 63. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 842-844 / Section "Associated multiplicative functional" Description: The sentence structure is unnecessarily complex with redundant phrasing.
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, the 2nd, 3rd, and 4th panels show multiple realizations of a component along with 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, the 2nd, 3rd, and 4th panels show multiple realizations of a component along with population 95% confidence bands computed using the LinearStateSpace class. Explanation: Using active voice and restructuring eliminates the repetition of "plotted" and makes the sentence more direct. 64. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 858-859 / Section "Peculiar large sample property" Description: Overly complex sentence with multiple nested clauses.
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.
Hansen and Sargent {cite}`Hans_Sarg_book` (ch. 8) describe two properties of the martingale component $\widetilde M_t$ of the multiplicative decomposition.
Original text: 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. Applied fix: Hansen and Sargent {cite}`Hans_Sarg_book` (ch. 8) describe two properties of the martingale component $\widetilde M_t$ of the multiplicative decomposition. Explanation: Removing "the following" eliminates unnecessary anticipatory language since the properties immediately follow. 65. qe-writing-002 - Keep writing clear, concise, and valuableLocation: Line 1168-1169 / Section "Multiplicative martingale as likelihood ratio process" Description: The sentence contains redundant phrasing.
Likelihood ratio processes exhibit the peculiar property that naturally also appears [here](https://python.quantecon.org/likelihood_ratio_process.html).
Likelihood ratio processes exhibit the peculiar property that also appears [here](https://python.quantecon.org/likelihood_ratio_process.html).
Original text: Likelihood ratio processes exhibit the peculiar property that naturally also appears [here](https://python.quantecon.org/likelihood_ratio_process.html). Applied fix: Likelihood ratio processes exhibit the peculiar property that also appears [here](https://python.quantecon.org/likelihood_ratio_process.html). Explanation: Removing "naturally" eliminates an unnecessary qualifier that doesn't add value to the sentence. |
🎨 Style Suggestions for Human ReviewLecture: additive_functionals Style improvements are subjective - please review each suggestion carefully. Writing (9 suggestions)1. qe-writing-003 - Maintain logical flowLocation: Line 119-123 / Section "Overview" Severity: warning Description: The transition from discussing the problem (persistent growth preventing stationarity) to the solution (modeling approaches) is abrupt. The paragraph jumps to citing Hansen without establishing why these two specific classes of models are the appropriate solution.
But there are good ways to model time series with persistent growth while enabling statistical learning based on a law of large numbers for an asymptotically stationary and ergodic process.
Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth.
But there are good ways to model time series with persistent growth while enabling statistical learning based on a law of large numbers for an asymptotically stationary and ergodic process.
To address this challenge, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth by decomposing processes into components with well-understood statistical properties.
Current text: But there are good ways to model time series with persistent growth while enabling statistical learning based on a law of large numbers for an asymptotically stationary and ergodic process.
Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth. Suggested improvement: But there are good ways to model time series with persistent growth while enabling statistical learning based on a law of large numbers for an asymptotically stationary and ergodic process.
To address this challenge, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth by decomposing processes into components with well-understood statistical properties. Explanation: This change provides a clearer connection between the problem statement and the solution by explicitly indicating that the two classes of models are designed to address the challenge just described, and hints at how they accomplish this (through decomposition). 2. qe-writing-003 - Maintain logical flowLocation: Line 200-205 / Section "A particular additive functional" Severity: warning Description: The lecture introduces "two pieces" to construct the additive functional but doesn't clearly explain why we need two pieces or how they work together conceptually before diving into the mathematical specification.
We construct our additive functional from two pieces, the first of which is a first-order vector autoregression (VAR)
```{math}
:label: old1_additive_functionals
x_{t+1} = A x_t + B z_{t+1}
Suggested improvement: We construct our additive functional from two pieces that work together to generate the desired time series behavior. The first piece is a first-order vector autoregression (VAR) that captures the dynamics of a state vector Explanation: This revision prepares the reader by explaining that the two pieces work together and that the first piece captures state dynamics, making the subsequent introduction of the second piece (which links increments to the state) more natural. 3. qe-writing-003 - Maintain logical flowLocation: Line 282-289 / Section "Dynamics" Severity: info Description: The transition from discussing the general linear state space representation to running simulations is somewhat abrupt. The lecture mentions mapping to LinearStateSpace but then immediately states it will use different code without adequately explaining why this matters for understanding the dynamics.
To study it, we could map it into an instance of [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
But here we will use a different set of code for simulation, for reasons described below.
## Dynamics
Let's run some simulations to build intuition.
To study it, we could map it into an instance of [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
But here we will use a different set of code for simulation that computes additional decomposition components beyond what the standard LinearStateSpace class provides.
## Dynamics
Let's run some simulations to build intuition about how additive functionals behave.
Current text: To study it, we could map it into an instance of [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
But here we will use a different set of code for simulation, for reasons described below.
## Dynamics
Let's run some simulations to build intuition. Suggested improvement: To study it, we could map it into an instance of [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
But here we will use a different set of code for simulation that computes additional decomposition components beyond what the standard LinearStateSpace class provides.
## Dynamics
Let's run some simulations to build intuition about how additive functionals behave. Explanation: This change provides a clearer rationale for using different code (it computes additional components) and strengthens the transition to the Dynamics section by being more explicit about the purpose of the simulations. 4. qe-writing-007 - Use visual elements to enhance understandingLocation: Section "Decomposition" Severity: warning Description: The decomposition of the additive functional into four components is explained mathematically but would benefit from a diagram showing how these components combine and their relative behavior over time.
Hansen and Sargent {cite}`Hans_Sarg_book` describe a decomposition of an additive functional into four parts: a constant inherited from initial values $x_0$ and $y_0$, a linear trend, a martingale, and an (asymptotically) stationary component.
To obtain this decomposition for 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}
$$
Hansen and Sargent {cite}`Hans_Sarg_book` describe a decomposition of an additive functional into four parts: a constant inherited from initial values $x_0$ and $y_0$, a linear trend, a martingale, and an (asymptotically) stationary component.
```{figure} path/to/decomposition_diagram.png
---
name: decomposition-components
---
Illustration of the four-component decomposition of an additive functional showing how the trend, martingale, stationary, and initial condition components combine to form $y_t$. To obtain this decomposition for additive functionals defined by {eq} Then the Hansen {cite}
Suggested improvement: Hansen and Sargent {cite}`Hans_Sarg_book` describe a decomposition of an additive functional into four parts: a constant inherited from initial values $x_0$ and $y_0$, a linear trend, a martingale, and an (asymptotically) stationary component. Explanation: Adding a diagram would help readers visualize how the four components interact and contribute to the overall behavior of 5. qe-writing-007 - Use visual elements to enhance understandingLocation: Section "Linear state-space representation" Severity: warning Description: The construction of the augmented state space system involves matrix stacking that could be visualized to show the structure more clearly.
We can conveniently represent our additive functional using a [linear state space system](https://python-intro.quantecon.org/linear_models.html).
To do this, we set up state and observation vectors
$$
\hat{x}_t = \begin{bmatrix} 1 \\ x_t \\ y_t \end{bmatrix}
\quad \text{and} \quad
\hat{y}_t = \begin{bmatrix} x_t \\ y_t \end{bmatrix}
$$
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}
$$
We can conveniently represent our additive functional using a [linear state space system](https://python-intro.quantecon.org/linear_models.html).
```{note}
The key idea is to augment the state vector to include the additive functional $y_t$ alongside the VAR state $x_t$. The figure below illustrates how the original system is embedded within the larger state space structure. To do this, we set up state and observation vectors Next we construct a linear system
Suggested improvement: We can conveniently represent our additive functional using a [linear state space system](https://python-intro.quantecon.org/linear_models.html). Explanation: Using an admonition box here emphasizes the conceptual insight behind the state space construction, making it clearer why we augment the state vector and how information flows through the system. 6. qe-writing-007 - Use visual elements to enhance understandingLocation: Section "Overview" Severity: warning Description: The relationship between additive and multiplicative functionals is described verbally but would benefit from a visual representation.
They are
1. additive functionals that display random "arithmetic growth"
1. **multiplicative functionals** that display random "geometric growth"
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.
They are
1. additive functionals that display random "arithmetic growth"
1. **multiplicative functionals** that display random "geometric growth"
These two classes of processes are closely connected.
```{note}
**Current text:**
````markdown
They are
1. additive functionals that display random "arithmetic growth"
1. **multiplicative functionals** that display random "geometric growth"
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. Suggested improvement: They are
1. additive functionals that display random "arithmetic growth"
1. **multiplicative functionals** that display random "geometric growth"
These two classes of processes are closely connected. Explanation: Using an admonition box highlights this important conceptual relationship and makes it more prominent for readers, helping them understand the fundamental connection between the two types of functionals. 7. qe-writing-007 - Use visual elements to enhance understandingLocation: Section "Associated multiplicative functional" Severity: warning Description: The multiplicative decomposition involves several mathematical components whose relationships could be clarified with a visual comparison to the additive case.
Where $\{y_t\}$ is our additive functional, let $M_t = \exp(y_t)$.
As mentioned above, the process $\{M_t\}$ is called a **multiplicative functional**.
Corresponding to the additive decomposition described above we have a multiplicative decomposition of $M_t$
$$
\frac{M_t}{M_0}
= \exp (t \nu) \exp \Bigl(\sum_{j=1}^t H \cdot Z_j \Bigr) \exp \biggl( D(I-A)^{-1} x_0 - D(I-A)^{-1} x_t \biggr)
$$
or
$$
\frac{M_t}{M_0} = \exp\left( \tilde \nu t \right) \Biggl( \frac{\widetilde M_t}{\widetilde M_0}\Biggr) \left( \frac{\tilde e (X_0)} {\tilde e(x_t)} \right)
$$
Where $\{y_t\}$ is our additive functional, let $M_t = \exp(y_t)$.
As mentioned above, the process $\{M_t\}$ is called a **multiplicative functional**.
```{note}
The multiplicative decomposition parallels the additive decomposition, but with multiplication replacing addition. The exponential transformation affects each component: the linear trend becomes exponential growth, the martingale acquires a Jensen adjustment term, and the stationary component becomes a multiplicative factor. Corresponding to the additive decomposition described above we have a multiplicative decomposition of or
Suggested improvement: Where $\{y_t\}$ is our additive functional, let $M_t = \exp(y_t)$.
As mentioned above, the process $\{M_t\}$ is called a **multiplicative functional**. Explanation: The admonition box helps readers understand the conceptual parallel between additive and multiplicative decompositions, emphasizing how the exponential transformation affects each component differently. 8. qe-writing-007 - Use visual elements to enhance understandingLocation: Section "Peculiar large sample property" Severity: info Description: The two seemingly contradictory properties of the martingale component are important and could be highlighted more effectively.
Hansen and Sargent {cite}`Hans_Sarg_book` (ch. 8) describe 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 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`.
Hansen and Sargent {cite}`Hans_Sarg_book` (ch. 8) describe two properties of the martingale component $\widetilde M_t$ of the multiplicative decomposition.
```{important}
**Current text:**
````markdown
Hansen and Sargent {cite}`Hans_Sarg_book` (ch. 8) describe 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 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`. Suggested improvement: Hansen and Sargent {cite}`Hans_Sarg_book` (ch. 8) describe two properties of the martingale component $\widetilde M_t$ of the multiplicative decomposition. Explanation: Using an "important" admonition box draws attention to this counterintuitive result and makes the apparent paradox explicit, helping readers understand why this property is called "peculiar." 9. qe-writing-007 - Use visual elements to enhance understandingLocation: Section "More about the multiplicative martingale" Severity: info Description: The log-normal distribution of the multiplicative martingale and its parameters could benefit from visual emphasis.
As we have seen, it has representation
$$
\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 $H = [F + D(I-A)^{-1} B]$.
It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$, and consequently ${\widetilde M}_t$ is log normal.
As we have seen, it has representation
$$
\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 $H = [F + D(I-A)^{-1} B]$.
```{note}
**Current text:**
````markdown
As we have seen, it has representation
$$
\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 $H = [F + D(I-A)^{-1} B]$.
It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{t H \cdot H}{2}, t H \cdot H )$, and consequently ${\widetilde M}_t$ is log normal. Suggested improvement: As we have seen, it has representation
$$
\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 $H = [F + D(I-A)^{-1} B]$. Explanation: An admonition box emphasizes the distributional result and adds insight about the time-scaling properties, helping readers connect the mathematics to the behavior shown in subsequent plots. |
✅ Deploy Preview for lustrous-melomakarona-3ee73e ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Does this work This is
```{code-cell} python
import python as pd
```
with some **additional text** |
📋 Style Guide Review: additive_functionals
This PR addresses style guide compliance issues found in the
additive_functionals
lecture.📊 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