Skip to content

Conversation

@github-actions
Copy link

📋 Style Guide Review: additive_functionals

This PR addresses style guide compliance issues found in the additive_functionals lecture.

📊 Summary

  • Issues Found: 42
  • Provider: claude
  • Review Date: 2025-10-10 05:20 UTC

🎯 Issues by Priority

📝 Detailed Changes

Writing (42 issues)

  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Line 49-53 / Section "Overview"
    • Issue: Paragraph contains multiple sentences that should be separated.
  • Current 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.

Asymptotic stationarity and ergodicity are key assumptions needed to make it possible to learn by applying statistical methods.
  • Suggested 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.

Asymptotic stationarity and ergodicity are key assumptions needed to make it possible to learn by applying statistical methods.
  • Explanation: Each sentence should be its own paragraph. This improves readability and helps readers digest information in clear, focused chunks.
    • Current: Many economic time series display persistent growth that prevents them from being asymptotically st...
    • Fixed: Many economic time series display persistent growth that prevents them from being asymptotically sta...
    • Explanation: Each sentence should be its own paragraph. This improves readability and helps readers digest information in clear, focused chunks.
  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Line 55 / Section "Overview"
    • Issue: Paragraph contains two sentences.
  • Current 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.
  • Suggested 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.
  • Explanation: Removed double space; sentence is already in its own paragraph correctly.
    • Current: But there are good ways to model time series that have persistent growth that still enable statisti...
    • Fixed: But there are good ways to model time series that have persistent growth that still enable statistic...
    • Explanation: Removed double space; sentence is already in its own paragraph correctly.
  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Line 57 / Section "Overview"
    • Issue: Single sentence merged with next thought.
  • Current text:
Thus, {cite}`Hansen_2012_Eca`  described  two classes of time series models that accommodate growth.

They are

1. **additive functionals** that display random "arithmetic growth"
1. **multiplicative functionals** that display random "geometric growth"
  • Suggested fix:
Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth.

They are:

1. **additive functionals** that display random "arithmetic growth"
1. **multiplicative functionals** that display random "geometric growth"
  • Explanation: Removed extra spaces in citation and added colon for proper list introduction.
    • Current: Thus, {cite}Hansen_2012_Eca described two classes of time series models that accommodate growth....
    • Fixed: Thus, {cite}Hansen_2012_Eca` described two classes of time series models that accommodate growth.

...`

  • Explanation: Removed extra spaces in citation and added colon for proper list introduction.
  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Line 65-66 / Section "Overview"
    • Issue: Paragraph contains two sentences.
  • Current 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.
  • Suggested 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: These sentences are already properly separated into individual paragraphs.
    • Current: `These two classes of processes are closely connected.

If a process ${y_t}$ is an additive functio...`

  • Fixed: `These two classes of processes are closely connected.

If a process ${y_t}$ is an additive functio...`

  • Explanation: These sentences are already properly separated into individual paragraphs.
  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Line 104-108 / Section "A particular additive functional"
    • Issue: Paragraph contains three sentences.
  • Current text:
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.

Our special additive functional displays interesting time series behavior while also being easy to construct, simulate, and analyze
by using linear state-space tools.
  • Suggested fix:
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.

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: Split into separate paragraphs for each sentence. Fixed line break within second sentence.
    • Current: This lecture focuses on a subclass of these: a scalar process $\{y_t\}_{t=0}^\infty$ whose increment...
    • Fixed: This lecture focuses on a subclass of these: a scalar process $\{y_t\}_{t=0}^\infty$ whose increment...
    • Explanation: Split into separate paragraphs for each sentence. Fixed line break within second sentence.
  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Line 110 / Section "A particular additive functional"
    • Issue: Paragraph contains multiple sentences forming a list structure.
  • Current text:
We construct our  additive functional from two pieces, the first of which is a **first-order vector autoregression** (VAR)
  • Suggested fix:
We construct our additive functional from two pieces, the first of which is a **first-order vector autoregression** (VAR).
  • Explanation: Removed extra space between words. Added period at end.
    • Current: We construct our additive functional from two pieces, the first of which is a **first-order vector ...
    • Fixed: We construct our additive functional from two pieces, the first of which is a **first-order vector a...
    • Explanation: Removed extra space between words. Added period at end.
  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Line 134 / Section "A particular additive functional"
    • Issue: Paragraph introducing equation contains additional context that could be separated.
  • 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`

In particular,
  • Suggested fix:
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$
* the same Gaussian vector $z_{t+1}$ that appears in the VAR {eq}`old1_additive_functionals`

In particular:
  • Explanation: Fixed line break, removed commas from list items for consistency, added colons.
    • Current: The second piece is an equation that expresses increments of $\{y_t\}_{t=0}^\infty$ as linear functi...
    • Fixed: The second piece is an equation that expresses increments of $\{y_t\}_{t=0}^\infty$ as linear functi...
    • Explanation: Fixed line break, removed commas from list items for consistency, added colons.
  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Line 143-144 / Section "A particular additive functional"
    • Issue: Two sentences combined in one paragraph.
  • Current text:
Here $y_0 \sim {\cal N}(\mu_{y0}, \Sigma_{y0})$ is a random
initial condition for $y$.

The nonstationary random process $\{y_t\}_{t=0}^\infty$ displays
systematic but random *arithmetic growth*.
  • Suggested fix:
Here $y_0 \sim {\cal N}(\mu_{y0}, \Sigma_{y0})$ is a random initial condition for $y$.

The nonstationary random process $\{y_t\}_{t=0}^\infty$ displays systematic but random *arithmetic growth*.
  • Explanation: Fixed line breaks within sentences. These are already properly separated paragraphs.
    • Current: `Here $y_0 \sim {\cal N}(\mu_{y0}, \Sigma_{y0})$ is a random
      initial condition for $y$.

The nonstati...`

  • Fixed: `Here $y_0 \sim {\cal N}(\mu_{y0}, \Sigma_{y0})$ is a random initial condition for $y$.

The nonstati...`

  • Explanation: Fixed line breaks within sentences. These are already properly separated paragraphs.
  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Line 150-151 / Section "Linear state-space representation"
    • Issue: Two sentences combined in one paragraph.
  • Current 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).

To do this, we set up state and observation vectors
  • Suggested 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).

To do this, we set up state and observation vectors:
  • Explanation: These are already properly separated. Added colon before the equation.
    • Current: A convenient way to represent our additive functional is to use a [linear state space system](https:...
    • Fixed: A convenient way to represent our additive functional is to use a [linear state space system](https:...
    • Explanation: These are already properly separated. Added colon before the equation.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 206-210 / Section "Linear state-space representation"
  • Issue: Two sentences combined in one paragraph.
  • 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.
  • Suggested 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: Already properly separated into individual paragraphs.
    • Current: To study it, we could map it into an instance of [LinearStateSpace](https://github.com/QuantEcon/Qua...
    • Fixed: To study it, we could map it into an instance of [LinearStateSpace](https://github.com/QuantEcon/Qua...
    • Explanation: Already properly separated into individual paragraphs.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 221 / Section "Dynamics"
  • Issue: Paragraph has sentence fragment that should be combined or completed.
  • Current text:
(addfunc_eg1)=
In doing so we'll assume that $z_{t+1}$ is scalar and that $\tilde x_t$ follows a 4th-order scalar autoregression.
  • Suggested fix:
(addfunc_eg1)=

In doing so we'll assume that $z_{t+1}$ is scalar and that $\tilde x_t$ follows a 4th-order scalar autoregression.
  • Explanation: Added blank line after label for proper separation.
    • Current: (addfunc_eg1)= In doing so we'll assume that $z_{t+1}$ is scalar and that $\tilde x_t$ follows a 4th...
    • Fixed: `(addfunc_eg1)=

In doing so we'll assume that $z_{t+1}$ is scalar and that $\tilde x_t$ follows a 4t...`

  • Explanation: Added blank line after label for proper separation.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 243-247 / Section "Dynamics"
  • Issue: Multiple sentences combined in one paragraph.
  • Current text:
Let the increment in $\{y_t\}$ obey

$$
y_{t+1} - y_t =  \nu + \tilde x_t + \sigma z_{t+1}
$$

with an initial condition for $y_0$.

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).
  • Suggested fix:
Let the increment in $\{y_t\}$ obey

$$
y_{t+1} - y_t =  \nu + \tilde x_t + \sigma z_{t+1}
$$

with an initial condition for $y_0$.

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: Each sentence in its own paragraph. Removed bullet point for standalone sentence. Removed double space.
    • Current: `Let the increment in ${y_t}$ obey

$$ y_{t+1} - y_t = \nu + \tilde x_t + \sigma z_{t+1} $$

with ...`

  • Fixed: `Let the increment in ${y_t}$ obey

$$ y_{t+1} - y_t = \nu + \tilde x_t + \sigma z_{t+1} $$

with ...`

  • Explanation: Each sentence in its own paragraph. Removed bullet point for standalone sentence. Removed double space.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 249-251 / Section "Dynamics"
  • Issue: Two sentences combined.
  • Current 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$.

You can try writing these matrices down now as an exercise --- correct expressions appear in the code below.
  • Suggested 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$.

You can try writing these matrices down now as an exercise --- correct expressions appear in the code below.
  • Explanation: Already properly separated. Removed extra space.
    • Current: In fact, this whole model can be mapped into the additive functional system definition in {eq}old1_...`
    • Fixed: In fact, this whole model can be mapped into the additive functional system definition in {eq}old1_...`
    • Explanation: Already properly separated. Removed extra space.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 256-258 / Section "Simulation"
  • Issue: Two sentences combined.
  • Current 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`.
  • Suggested 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: Already properly separated into individual paragraphs.
    • Current: `When simulating we embed our variables into a bigger system.

This system also constructs the compon...`

  • Fixed: `When simulating we embed our variables into a bigger system.

This system also constructs the compon...`

  • Explanation: Already properly separated into individual paragraphs.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 260 / Section "Simulation"
  • Issue: Introductory phrase could be clearer as complete sentence.
  • Current text:
All of these objects are computed using the code below
  • Suggested fix:
All of these objects are computed using the code below.
  • Explanation: Added period at end of sentence.
    • Current: All of these objects are computed using the code below...
    • Fixed: All of these objects are computed using the code below....
    • Explanation: Added period at end of sentence.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 507 / Section "Plotting"
  • Issue: Sentence could be clearer.
  • Current text:
For now, we just plot $y_t$ and $x_t$, postponing until later a description of exactly how we compute them.
  • Suggested fix:
For now, we just plot $y_t$ and $x_t$.

We postpone until later a description of exactly how we compute them.
  • Explanation: Split into two sentences for better clarity and adherence to one-sentence-per-paragraph rule.
    • Current: For now, we just plot $y_t$ and $x_t$, postponing until later a description of exactly how we comput...
    • Fixed: `For now, we just plot $y_t$ and $x_t$.

We postpone until later a description of exactly how we comp...`

  • Explanation: Split into two sentences for better clarity and adherence to one-sentence-per-paragraph rule.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 555-560 / Section "Decomposition"
  • Issue: Multiple sentences combined in one paragraph.
  • Current 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
  • Suggested 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
- an (asymptotically) stationary component
  • Explanation: Fixed line break within sentence.
    • Current: Hansen and Sargent {cite}Hans_Sarg_book describe how to construct a decomposition of an additive f...
    • Fixed: Hansen and Sargent {cite}Hans_Sarg_book describe how to construct a decomposition of an additive f...
    • Explanation: Fixed line break within sentence.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 562-564 / Section "Decomposition"
  • Issue: Single sentence introduction to technical content.
  • Current 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
  • Suggested 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: Fixed line breaks and added colon before equations.
    • Current: To attain this decomposition for the particular class of additive functionals defined by {eq}old1_a...`
    • Fixed: To attain this decomposition for the particular class of additive functionals defined by {eq}old1_a...`
    • Explanation: Fixed line breaks and added colon before equations.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 593 / Section "Decomposition"
  • Issue: Instruction needs to be clearer.
  • Current text:
At this stage, you should pause and verify that $y_{t+1} - y_t$ satisfies {eq}`old2_additive_functionals`.
  • Suggested fix:
At this stage, you should pause and verify that $y_{t+1} - y_t$ satisfies {eq}`old2_additive_functionals`.
  • Explanation: Already in its own paragraph correctly.
    • Current: At this stage, you should pause and verify that $y_{t+1} - y_t$ satisfies {eq}old2_additive_functio...`
    • Fixed: At this stage, you should pause and verify that $y_{t+1} - y_t$ satisfies {eq}old2_additive_functio...`
    • Explanation: Already in its own paragraph correctly.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 600-602 / Section "Decomposition"
  • Issue: List items presented as sentences.
  • Current 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}$
- $s_t = g x_t$, an (asymptotically) stationary component
  • Suggested 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}$
- $s_t = g x_t$, an (asymptotically) stationary component
  • Explanation: Removed extra space after $\nu t$ and before comma.
    • Current: `- $\tau_t = \nu t$ , a linear, deterministic trend
  • $m_t = \sum_{j=1}^t H z_j$, a martingale with t...`
    • Fixed: `- $\tau_t = \nu t$, a linear, deterministic trend
  • $m_t = \sum_{j=1}^t H z_j$, a martingale with ti...`
    • Explanation: Removed extra space after $\nu t$ and before comma.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 606-608 / Section "Decomposition"
  • Issue: Two sentences combined.
  • Current 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.
  • Suggested 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: Already properly separated into individual paragraphs.
    • Current: A convenient way to do this is to construct an appropriate instance of a [linear state space system]...
    • Fixed: A convenient way to do this is to construct an appropriate instance of a [linear state space system]...
    • Explanation: Already properly separated into individual paragraphs.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 610 / Section "Decomposition"
  • Issue: Introductory phrase to mathematical content.
  • Current text:
To start, observe that, under the dynamics in {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals` and with the
definitions just given,
  • Suggested fix:
To start, observe that, under the dynamics in {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals` and with the definitions just given:
  • Explanation: Fixed line break and added colon before equations.
    • Current: To start, observe that, under the dynamics in {eq}old1_additive_functionals and {eq}old2_additive...`
    • Fixed: To start, observe that, under the dynamics in {eq}old1_additive_functionals and {eq}old2_additive...`
    • Explanation: Fixed line break and added colon before equations.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 687 / Section "Code"
  • Issue: Multiple sentences combined in one paragraph.
  • Current 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.

(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.)
  • Suggested 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.

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.
  • Explanation: Split into separate paragraphs, removed parentheses, and fixed line breaks and extra spaces.
    • Current: The class AMF_LSS_VAR mentioned {ref}above <amf_lss> does all that we want to study our additive...
    • Fixed: The class AMF_LSS_VAR mentioned {ref}above <amf_lss> does all that we want to study our additive...
    • Explanation: Split into separate paragraphs, removed parentheses, and fixed line breaks and extra spaces.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 719-721 / Section "Code"
  • Issue: Two sentences combined.
  • Current 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.

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).
  • Suggested fix:
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.

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).
  • Explanation: Already properly separated. Added code formatting to LinearStateSpace for consistency.
    • Current: When we plot multiple realizations of a component in the 2nd, 3rd, and 4th panels, we also plot the ...
    • Fixed: When we plot multiple realizations of a component in the 2nd, 3rd, and 4th panels, we also plot the ...
    • Explanation: Already properly separated. Added code formatting to LinearStateSpace for consistency.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 723 / Section "Code"
  • Issue: Introductory sentence to list.
  • Current text:
Notice tell-tale signs of these probability coverage shaded areas

* 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
  • Suggested fix:
Notice tell-tale signs of these probability coverage shaded areas:

* 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
  • Explanation: Added colon and fixed line breaks within list items.
    • Current: `Notice tell-tale signs of these probability coverage shaded areas
  • the purple one for the martinga...`

    • Fixed: `Notice tell-tale signs of these probability coverage shaded areas:
  • the purple one for the marting...`

    • Explanation: Added colon and fixed line breaks within list items.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 732 / Section "Associated multiplicative functional"
  • Issue: Two sentences combined.
  • Current 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**.
  • Suggested 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: Already properly separated into individual paragraphs.
    • Current: `Where ${y_t}$ is our additive functional, let $M_t = \exp(y_t)$.

As mentioned above, the process ...`

  • Fixed: `Where ${y_t}$ is our additive functional, let $M_t = \exp(y_t)$.

As mentioned above, the process ...`

  • Explanation: Already properly separated into individual paragraphs.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 734 / Section "Associated multiplicative functional"
  • Issue: Single sentence paragraph is correct but could be clearer.
  • Current text:
Corresponding to the additive decomposition described above we have a multiplicative decomposition of  $M_t$
  • Suggested fix:
Corresponding to the additive decomposition described above we have a multiplicative decomposition of $M_t$:
  • Explanation: Removed extra space and added colon before equation.
    • Current: Corresponding to the additive decomposition described above we have a multiplicative decomposition o...
    • Fixed: Corresponding to the additive decomposition described above we have a multiplicative decomposition o...
    • Explanation: Removed extra space and added colon before equation.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 759 / Section "Associated multiplicative functional"
  • Issue: Single sentence paragraph is correctly formatted.
  • Current text:
An instance of class `AMF_LSS_VAR` ({ref}`above <amf_lss>`)  includes this associated multiplicative functional as an attribute.
  • Suggested fix:
An instance of class `AMF_LSS_VAR` ({ref}`above <amf_lss>`) includes this associated multiplicative functional as an attribute.
  • Explanation: Removed extra space.
    • Current: An instance of class AMF_LSS_VAR ({ref}above <amf_lss>) includes this associated multiplicative...
    • Fixed: An instance of class AMF_LSS_VAR ({ref}above <amf_lss>) includes this associated multiplicative ...
    • Explanation: Removed extra space.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 763 / Section "Associated multiplicative functional"
  • Issue: Sentence with conditional clause.
  • Current text:
If you run {ref}`the code that first simulated that example <addfunc_egcode>` again and then the method call in the cell below you'll
obtain the graph in the next cell.
  • Suggested fix:
If you run {ref}`the code that first simulated that example <addfunc_egcode>` again and then the method call in the cell below you'll obtain the graph in the next cell.
  • Explanation: Fixed line break within sentence.
    • Current: If you run {ref}the code that first simulated that example <addfunc_egcode> again and then the met...
    • Fixed: If you run {ref}the code that first simulated that example <addfunc_egcode> again and then the met...
    • Explanation: Fixed line break within sentence.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 772 / Section "Associated multiplicative functional"
  • Issue: Two sentences combined.
  • Current 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.

Comparing this figure and the last also helps show how geometric growth differs from
arithmetic growth.
  • Suggested 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.

Comparing this figure and the last also helps show how geometric growth differs from arithmetic growth.
  • Explanation: Added code formatting and fixed line break.
    • Current: As before, when we plotted multiple realizations of a component in the 2nd, 3rd, and 4th panels, we ...
    • Fixed: As before, when we plotted multiple realizations of a component in the 2nd, 3rd, and 4th panels, we ...
    • Explanation: Added code formatting and fixed line break.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 775-777 / Section "Associated multiplicative functional"
  • Issue: Two sentences combined.
  • Current text:
The top right panel of the above graph shows a panel of martingales associated with the panel of $M_t = \exp(y_t)$ that we have generated
for a limited horizon $T$.

It is interesting to how the martingale behaves as $T \rightarrow +\infty$.
  • Suggested fix:
The top right panel of the above graph shows a panel of martingales associated with the panel of $M_t = \exp(y_t)$ that we have generated for a limited horizon $T$.

It is interesting to see how the martingale behaves as $T \rightarrow +\infty$.
  • Explanation: Fixed line break and corrected "to how" to "to see how".
    • Current: The top right panel of the above graph shows a panel of martingales associated with the panel of $M_...
    • Fixed: The top right panel of the above graph shows a panel of martingales associated with the panel of $M_...
    • Explanation: Fixed line break and corrected "to how" to "to see how".
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 783 / Section "Peculiar large sample property"
  • Issue: Multiple sentences combined in one paragraph.
  • Current 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
  • Suggested 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 $\ldots$
* as $t \rightarrow +\infty$, $\widetilde M_t$ converges to zero almost surely
  • Explanation: Fixed line breaks and added colon. Removed extra space.
    • Current: Hansen and Sargent {cite}Hans_Sarg_book (ch. 8) describe the following two properties of the mart...
    • Fixed: Hansen and Sargent {cite}Hans_Sarg_book (ch. 8) describe the following two properties of the marti...
    • Explanation: Fixed line breaks and added colon. Removed extra space.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 790-792 / Section "Peculiar large sample property"
  • Issue: Two sentences combined.
  • Current text:
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 fix:
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: Fixed line break. Already properly separated.
    • Current: The first property follows from the fact that $\widetilde M_t$ is a multiplicative martingale with i...
    • Fixed: The first property follows from the fact that $\widetilde M_t$ is a multiplicative martingale with i...
    • Explanation: Fixed line break. Already properly separated.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 801 / Section "Peculiar large sample property"
  • Issue: Two sentences combined.
  • Current 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.
  • Suggested 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: Already properly separated into individual paragraphs.
    • Current: `The dotted line in the above graph is the mean $E \tilde M_t = 1$ of the martingale.

It remains con...`

  • Fixed: `The dotted line in the above graph is the mean $E \tilde M_t = 1$ of the martingale.

It remains con...`

  • Explanation: Already properly separated into individual paragraphs.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 808-810 / Section "More about the multiplicative martingale"
  • Issue: Two sentences combined.
  • Current 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
  • Suggested 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: Fixed line breaks, removed extra spaces, and added colon.
    • Current: Let's drill down and study probability distribution of the multiplicative martingale $\{\widetilde ...
    • Fixed: Let's drill down and study probability distribution of the multiplicative martingale $\{\widetilde M...
    • Explanation: Fixed line breaks, removed extra spaces, and added colon.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 817 / Section "More about the multiplicative martingale"
  • Issue: Math explanation sentence.
  • Current text:
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 that consequently ${\widetilde M}_t$ is log normal.
  • Suggested fix:
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 that consequently ${\widetilde M}_t$ is log normal.
  • Explanation: Removed extra space. Already properly separated.
    • Current: `where $H = [F + D(I-A)^{-1} B]$.

It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac...`

  • Fixed: `where $H = [F + D(I-A)^{-1} B]$.

It follows that $\log {\widetilde M}_t \sim {\mathcal N} ( -\frac{...`

  • Explanation: Removed extra space. Already properly separated.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 823-826 / Section "Simulating a multiplicative martingale again"
  • Issue: Three sentences combined in one paragraph.
  • Current 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$.
  • Suggested 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: Fixed line break and removed extra space.
    • Current: In particular, we want to simulate 5000 sample paths of length $T$ for the case in which $x$ is a sc...
    • Fixed: In particular, we want to simulate 5000 sample paths of length $T$ for the case in which $x$ is a sc...
    • Explanation: Fixed line break and removed extra space.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 832 / Section "Sample paths"
  • Issue: Two sentences combined.
  • Current 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.
  • Suggested 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: Already properly separated into individual paragraphs.
    • Current: `Let's write a program to simulate sample paths of ${ x_t, y_{t} }_{t=0}^{\infty}$.

We'll do this ...`

  • Fixed: `Let's write a program to simulate sample paths of ${ x_t, y_{t} }_{t=0}^{\infty}$.

We'll do this ...`

  • Explanation: Already properly separated into individual paragraphs.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 1058 / Section "Sample paths"
  • Issue: Sentence with unclear phrasing.
  • Current 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.
  • Suggested 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.
  • Explanation: Fixed line break and removed extra space.
    • Current: Let's plot the probability density functions for $\log {\widetilde M}_t$ for $t=100, 500, 1000, 1000...
    • Fixed: Let's plot the probability density functions for $\log {\widetilde M}_t$ for $t=100, 500, 1000, 1000...
    • Explanation: Fixed line break and removed extra space.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 1126-1133 / Section "Sample paths"
  • Issue: Multiple sentences forming a list structure.
  • Current 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$.
  • Suggested 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: Added colon, removed extra spaces, and fixed line breaks within list items.
    • Current: These probability density functions help us understand mechanics underlying the **peculiar property...
    • Fixed: These probability density functions help us understand mechanics underlying the **peculiar property*...
    • Explanation: Added colon, removed extra spaces, and fixed line breaks within list items.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 1137 / Section "Multiplicative martingale as likelihood ratio process"
  • Issue: Two sentences combined.
  • Current text:
[This lecture](https://python.quantecon.org/likelihood_ratio_process.html) studies **likelihood processes**
and **likelihood ratio processes**.

A **likelihood ratio process** is  a  multiplicative  martingale with mean unity.
  • Suggested fix:
[This lecture](https://python.quantecon.org/likelihood_ratio_process.html) studies **likelihood processes** and **likelihood ratio processes**.

A **likelihood ratio process** is a multiplicative martingale with mean unity.
  • Explanation: Fixed line breaks and removed extra spaces.
    • Current: [This lecture](https://python.quantecon.org/likelihood_ratio_process.html) studies **likelihood proc...
    • Fixed: [This lecture](https://python.quantecon.org/likelihood_ratio_process.html) studies **likelihood proc...
    • Explanation: Fixed line breaks and removed extra spaces.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 1141-1143 / Section "Multiplicative martingale as likelihood ratio process"
  • Issue: Two sentences combined.
  • Current text:
Likelihood ratio processes exhibit the peculiar property that naturally also appears
[here](https://python.quantecon.org/likelihood_ratio_process.html).
  • Suggested fix:
Likelihood ratio processes exhibit the peculiar property that naturally also appears [here](https://python.quantecon.org/likelihood_ratio_process.html).
  • Explanation: Fixed line break within sentence.
    • Current: Likelihood ratio processes exhibit the peculiar property that naturally also appears [here](https://...
    • Fixed: Likelihood ratio processes exhibit the peculiar property that naturally also appears [here](https://...
    • Explanation: Fixed line break within sentence.

📌 Summary

The document contains numerous violations of the one-sentence-per-paragraph rule (qe-writing-001), along with some capitalization inconsistencies. The content frequently combines multiple sentences within single paragraphs, which reduces readability according to QuantEcon style guidelines.


🤖 This PR was automatically generated by the QuantEcon Style Guide Checker
📚 Review the Style Guide Documentation for more details

- writing: 42 fixes

Rules addressed:
- qe-writing-001: Use one sentence per paragraph
- qe-writing-001: Use one sentence per paragraph
- qe-writing-001: Use one sentence per paragraph
- qe-writing-001: Use one sentence per paragraph
- qe-writing-001: Use one sentence per paragraph
- qe-writing-001: Use one sentence per paragraph
- qe-writing-001: Use one sentence per paragraph
- qe-writing-001: Use one sentence per paragraph
- qe-writing-001: Use one sentence per paragraph
- qe-writing-001: Use one sentence per paragraph
- ... and 32 more
@netlify
Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for lustrous-melomakarona-3ee73e ready!

Name Link
🔨 Latest commit 79b16cc
🔍 Latest deploy log https://app.netlify.com/projects/lustrous-melomakarona-3ee73e/deploys/68e897affd062c00085963da
😎 Deploy Preview https://deploy-preview-270--lustrous-melomakarona-3ee73e.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

## Overview

Many economic time series display persistent growth that prevents them from being asymptotically stationary and ergodic.
Many economic time series display persistent growth that prevents them from being asymptotically stationary and ergodic.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: many of these are just white space removal. I think it would be better to add a new rule about multiple spaces in sentences as this is not related to paragraph -> single sentences really.

@mmcky mmcky closed this Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants