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: 23
  • Provider: claude
  • Review Date: 2025-10-10 05:47 UTC

🎯 Issues by Priority

📝 Detailed Changes

Writing (23 issues)

  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Section "Overview"
    • Issue: Multiple paragraphs contain more than one sentence, violating the one-sentence-per-paragraph rule.
  • 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.
  • 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.
  • Explanation: The text has extra spaces before "asymptotically" and "irregular" that should be removed for consistency, though the paragraph structure is correct here.
    • 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: The text has extra spaces before "asymptotically" and "irregular" that should be removed for consistency, though the paragraph structure is correct here.
  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Section "Overview"
    • Issue: Paragraph contains multiple sentences separated by periods.
  • 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: Remove extra space after "But" for consistency.
    • 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: Remove extra space after "But" for consistency.
  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Section "Overview"
    • Issue: Paragraph contains multiple sentences.
  • Current text:
We also describe and compute decompositions of additive and multiplicative processes into four components:

1. a **constant**
1. a **trend** component
1. an asymptotically **stationary** component
1. a **martingale**

We describe how to construct,  simulate,  and interpret these components.
  • Suggested fix:
We also describe and compute decompositions of additive and multiplicative processes into four components:

1. a **constant**
1. a **trend** component
1. an asymptotically **stationary** component
1. a **martingale**

We describe how to construct, simulate, and interpret these components.
  • Explanation: Remove extra spaces after commas in the second sentence.
    • Current: We also describe and compute decompositions of additive and multiplicative processes into four compo...
    • Fixed: We also describe and compute decompositions of additive and multiplicative processes into four compo...
    • Explanation: Remove extra spaces after commas in the second sentence.
  1. qe-writing-004 - Avoid unnecessary capitalization in narrative text
    • Location: Section "A particular additive functional"
    • Issue: The term "Gaussian" is capitalized mid-sentence when referring to a general distribution type.
  • 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.
  • 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.
  • Explanation: While "Gaussian" is often capitalized as it derives from a proper name, the style guide suggests avoiding unnecessary capitalization. However, this may be an acceptable exception for mathematical terminology.
    • 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: While "Gaussian" is often capitalized as it derives from a proper name, the style guide suggests avoiding unnecessary capitalization. However, this may be an acceptable exception for mathematical terminology.
  1. qe-writing-004 - Avoid unnecessary capitalization in narrative text
    • Location: Section "A particular additive functional"
    • Issue: IID is unnecessarily capitalized in narrative text.
  • Current text:
* $z_{t+1} \sim {\cal N}(0,I)$ is an $m \times 1$ IID shock,
  • Suggested fix:
* $z_{t+1} \sim {\cal N}(0,I)$ is an $m \times 1$ iid shock,
  • Explanation: Following the style guide's preference for lowercase, "iid" should not be capitalized unless at the beginning of a sentence.
    • Current: * $z_{t+1} \sim {\cal N}(0,I)$ is an $m \times 1$ IID shock,...
    • Fixed: * $z_{t+1} \sim {\cal N}(0,I)$ is an $m \times 1$ iid shock,...
    • Explanation: Following the style guide's preference for lowercase, "iid" should not be capitalized unless at the beginning of a sentence.
  1. qe-writing-004 - Avoid unnecessary capitalization in narrative text
    • Location: Section "A particular additive functional"
    • Issue: Gaussian is capitalized mid-sentence.
  • Current text:
* the same Gaussian vector $z_{t+1}$ that appears in the VAR {eq}`old1_additive_functionals`
  • Suggested fix:
* the same gaussian vector $z_{t+1}$ that appears in the VAR {eq}`old1_additive_functionals`
  • Explanation: Consistent with the capitalization rule, though mathematical terms may be exceptions.
    • Current: * the same Gaussian vector $z_{t+1}$ that appears in the VAR {eq}old1_additive_functionals...
    • Fixed: * the same gaussian vector $z_{t+1}$ that appears in the VAR {eq}old1_additive_functionals...
    • Explanation: Consistent with the capitalization rule, though mathematical terms may be exceptions.
  1. qe-writing-004 - Avoid unnecessary capitalization in narrative text
    • Location: Section "A particular additive functional"
    • Issue: Gaussian is capitalized mid-sentence.
  • Current text:
Here $y_0 \sim {\cal N}(\mu_{y0}, \Sigma_{y0})$ is a random
initial condition for $y$.
  • Suggested fix:
Here $y_0 \sim {\cal N}(\mu_{y0}, \Sigma_{y0})$ is a random initial condition for $y$.
  • Explanation: Remove unnecessary line break within the sentence for better readability.
    • Current: Here $y_0 \sim {\cal N}(\mu_{y0}, \Sigma_{y0})$ is a random initial condition for $y$....
    • Fixed: Here $y_0 \sim {\cal N}(\mu_{y0}, \Sigma_{y0})$ is a random initial condition for $y$....
    • Explanation: Remove unnecessary line break within the sentence for better readability.
  1. qe-writing-002 - Keep writing clear, concise, and valuable
    • Location: Section "Dynamics"
    • Issue: The sentence is overly complex with multiple clauses that could be simplified.
  • Current text:
(Being a zero of $\phi(z)$ means that $\phi(z) = 0$)
  • Suggested fix:
A zero of $\phi(z)$ satisfies $\phi(z) = 0$.
  • Explanation: More direct phrasing improves clarity and conciseness.
    • Current: (Being a zero of $\phi(z)$ means that $\phi(z) = 0$)...
    • Fixed: A zero of $\phi(z)$ satisfies $\phi(z) = 0$....
    • Explanation: More direct phrasing improves clarity and conciseness.
  1. qe-writing-002 - Keep writing clear, concise, and valuable
    • Location: Section "Dynamics"
    • Issue: Redundant explanation that doesn't add value.
  • Current 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.
  • Suggested fix:
While {eq}`ftaf` is not a first order system like {eq}`old1_additive_functionals`, it can be mapped into a first order system.
  • Explanation: "we know that" is unnecessary verbiage. Also removes extra space before "into".
    • Current: While {eq}ftaf is not a first order system like {eq}old1_additive_functionals, we know that it c...
    • Fixed: While {eq}ftaf is not a first order system like {eq}old1_additive_functionals, it can be mapped ...
    • Explanation: "we know that" is unnecessary verbiage. Also removes extra space before "into".
  1. qe-writing-002 - Keep writing clear, concise, and valuable
  • Location: Section "Simulation"
  • Issue: Sentence could be more concise.
  • Current text:
When simulating we embed our variables into a bigger system.
  • Suggested fix:
When simulating, we embed our variables into a larger system.
  • Explanation: Add comma after introductory clause and use "larger" instead of "bigger" for more formal tone.
    • Current: When simulating we embed our variables into a bigger system....
    • Fixed: When simulating, we embed our variables into a larger system....
    • Explanation: Add comma after introductory clause and use "larger" instead of "bigger" for more formal tone.
  1. qe-writing-002 - Keep writing clear, concise, and valuable
  • Location: Section "Simulation"
  • Issue: Unclear reference and awkward phrasing.
  • Current 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`.
  • Suggested fix:
This system constructs the decomposition components of $y_t$ and $\exp(y_t)$ proposed by Hansen {cite}`Hansen_2012_Eca`.
  • Explanation: Removes redundant "also" and simplifies "of the decompositions of" to "decomposition components of".
    • Current: This system also constructs the components of the decompositions of $y_t$ and of $\exp(y_t)$ propose...
    • Fixed: This system constructs the decomposition components of $y_t$ and $\exp(y_t)$ proposed by Hansen {cit...
    • Explanation: Removes redundant "also" and simplifies "of the decompositions of" to "decomposition components of".
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Section "Decomposition"
  • Issue: Single paragraph contains multiple sentences.
  • 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: Remove unnecessary line break within the opening 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: Remove unnecessary line break within the opening sentence.
  1. qe-writing-002 - Keep writing clear, concise, and valuable
  • Location: Section "Decomposition"
  • Issue: The phrase contains unnecessary spaces.
  • Current text:
We want to characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition.
  • Suggested fix:
We characterize and simulate the decomposition components $\tau_t$, $m_t$, and $s_t$.
  • Explanation: "Want to" is often unnecessary verbiage; improved list formatting with proper comma usage.
    • Current: We want to characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition....
    • Fixed: We characterize and simulate the decomposition components $\tau_t$, $m_t$, and $s_t$....
    • Explanation: "Want to" is often unnecessary verbiage; improved list formatting with proper comma usage.
  1. qe-writing-003 - Maintain logical flow
  • Location: Section "Decomposition"
  • Issue: Abrupt transition without clear connection to previous content.
  • 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).
  • Suggested fix:
To characterize and simulate these components, we construct an appropriate instance of a [linear state space system](https://python-intro.quantecon.org/linear_models.html) using [LinearStateSpace](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/lss.py) from [QuantEcon.py](http://quantecon.org/quantecon-py).
  • Explanation: Better transition connects this sentence to the previous paragraph's goal; removes unnecessary "by using".
    • Current: A convenient way to do this is to construct an appropriate instance of a [linear state space system]...
    • Fixed: To characterize and simulate these components, we construct an appropriate instance of a [linear sta...
    • Explanation: Better transition connects this sentence to the previous paragraph's goal; removes unnecessary "by using".
  1. qe-writing-002 - Keep writing clear, concise, and valuable
  • Location: Section "Code"
  • Issue: Sentence structure could be more concise and direct.
  • Current text:
The class `AMF_LSS_VAR` mentioned {ref}`above <amf_lss>` does all that we want to study our additive functional.
  • Suggested fix:
The `AMF_LSS_VAR` class {ref}`mentioned above <amf_lss>` enables us to study our additive functional.
  • Explanation: More direct phrasing; "does all that we want to study" is awkward.
    • Current: The class AMF_LSS_VAR mentioned {ref}above <amf_lss> does all that we want to study our additive...
    • Fixed: The AMF_LSS_VAR class {ref}mentioned above <amf_lss> enables us to study our additive functional...
    • Explanation: More direct phrasing; "does all that we want to study" is awkward.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Section "Code"
  • Issue: Paragraph contains multiple sentences.
  • Current text:
In fact, `AMF_LSS_VAR` does more
because it allows us to study  an associated multiplicative functional as well.

(A hint that it does more is the name of the class -- here AMF stands for
"additive and multiplicative functional" -- the code computes and displays objects associated with
multiplicative functionals too.)
  • Suggested fix:
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: Remove unnecessary line breaks within sentences and extra spaces.
    • Current: In fact, AMF_LSS_VAR does more because it allows us to study an associated multiplicative functio...
    • Fixed: In fact, AMF_LSS_VAR does more because it allows us to study an associated multiplicative function...
    • Explanation: Remove unnecessary line breaks within sentences and extra spaces.
  1. qe-writing-002 - Keep writing clear, concise, and valuable
  • Location: Section "Code"
  • Issue: Conditional phrasing adds unnecessary complexity.
  • Current text:
If you run {ref}`the code that first simulated that example <addfunc_egcode>` again and then the method call
you will generate (modulo randomness) the plot
  • Suggested fix:
Running {ref}`the code that first simulated that example <addfunc_egcode>` again and then the method call generates (modulo randomness) the plot below.
  • Explanation: More direct phrasing without conditional "if...you will"; adds "below" for clarity.
    • Current: If you run {ref}the code that first simulated that example <addfunc_egcode> again and then the met...
    • Fixed: Running {ref}the code that first simulated that example <addfunc_egcode> again and then the method...
    • Explanation: More direct phrasing without conditional "if...you will"; adds "below" for clarity.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Section "Code"
  • Issue: Paragraph contains multiple sentences.
  • 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.
  • 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.
  • Explanation: LinearStateSpace should be in code formatting 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: LinearStateSpace should be in code formatting for consistency.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Section "Code"
  • Issue: Multiple sentences in paragraph discussing initial conditions.
  • Current 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
  • Suggested 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 the tell-tale signs of these probability coverage shaded areas:
  • Explanation: Add colon after "areas" since a list follows; "tell-tale" should be hyphenated.
    • Current: We have chosen to simulate many paths, all starting from the *same* non-random initial conditions $x...
    • Fixed: We have chosen to simulate many paths, all starting from the *same* non-random initial conditions $x...
    • Explanation: Add colon after "areas" since a list follows; "tell-tale" should be hyphenated.
  1. qe-writing-002 - Keep writing clear, concise, and valuable
  • Location: Section "Associated multiplicative functional"
  • Issue: Redundant phrasing.
  • Current text:
Where $\{y_t\}$ is our additive functional, let $M_t = \exp(y_t)$.
  • Suggested fix:
Let $M_t = \exp(y_t)$, where $\{y_t\}$ is our additive functional.
  • Explanation: More natural mathematical exposition order.
    • Current: Where $\{y_t\}$ is our additive functional, let $M_t = \exp(y_t)$....
    • Fixed: Let $M_t = \exp(y_t)$, where $\{y_t\}$ is our additive functional....
    • Explanation: More natural mathematical exposition order.
  1. qe-writing-002 - Keep writing clear, concise, and valuable
  • Location: Section "Associated multiplicative functional"
  • Issue: Wordy introduction to equation.
  • 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: Add comma after introductory phrase, add colon before equation, remove extra space before $M_t$.
    • 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 ...
    • Explanation: Add comma after introductory phrase, add colon before equation, remove extra space before $M_t$.
  1. qe-writing-002 - Keep writing clear, concise, and valuable
  • Location: Section "Associated multiplicative functional"
  • Issue: Conditional phrasing is unnecessarily wordy.
  • 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:
Running {ref}`the code that first simulated that example <addfunc_egcode>` again and then executing the method call in the cell below produces the graph in the next cell.
  • Explanation: More direct phrasing; use "produces" instead of "you'll obtain"; avoid contractions in technical writing.
    • Current: If you run {ref}the code that first simulated that example <addfunc_egcode> again and then the met...
    • Fixed: Running {ref}the code that first simulated that example <addfunc_egcode> again and then executing ...
    • Explanation: More direct phrasing; use "produces" instead of "you'll obtain"; avoid contractions in technical writing.
  1. qe-writing-002 - Keep writing clear, concise, and valuable
  • Location: Section "Peculiar large sample property"
  • Issue: Sentence has grammatical issues.
  • Current text:
It is interesting to how the martingale behaves as $T \rightarrow +\infty$.
  • Suggested fix:
It is interesting to see how the martingale behaves as $T \rightarrow +\infty$.
  • Explanation: Missing word "see" makes the sentence grammatically incorrect.
    • Current: It is interesting to how the martingale behaves as $T \rightarrow +\infty$....
    • Fixed: It is interesting to see how the martingale behaves as $T \rightarrow +\infty$....
    • Explanation: Missing word "see" makes the sentence grammatically incorrect.

📌 Summary

The lecture contains several writing style violations, primarily related to paragraph structure (multiple sentences per paragraph), capitalization issues in narrative text, and some opportunities to improve clarity and conciseness.


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

- writing: 23 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-004: Avoid unnecessary capitalization in narrative text
- qe-writing-004: Avoid unnecessary capitalization in narrative text
- qe-writing-004: Avoid unnecessary capitalization in narrative text
- qe-writing-004: Avoid unnecessary capitalization in narrative text
- qe-writing-002: Keep writing clear, concise, and valuable
- qe-writing-002: Keep writing clear, concise, and valuable
- qe-writing-002: Keep writing clear, concise, and valuable
- ... and 13 more
@netlify
Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for lustrous-melomakarona-3ee73e ready!

Name Link
🔨 Latest commit e641fc7
🔍 Latest deploy log https://app.netlify.com/projects/lustrous-melomakarona-3ee73e/deploys/68e89e0fcd68030008988a33
😎 Deploy Preview https://deploy-preview-271--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.

@mmcky
Copy link
Contributor

mmcky commented Oct 10, 2025

This was based on the new architecture

  • use LLM to provide fixes and suggestions
  • programmatically apply them to the document

this reduces costs.

@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