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: 24
  • Provider: claude
  • Review Date: 2025-10-10 06:19 UTC

🎯 Issues by Priority

📝 Detailed Changes

Writing (24 issues)

  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Line 65-67 / Section "Overview"
    • Issue: Paragraph contains multiple sentences that should be separated into individual paragraphs.
  • 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: Each sentence should be in its own paragraph. Also fixes excessive whitespace issues in these lines.
    • 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 in its own paragraph. Also fixes excessive whitespace issues in these lines.
  1. qe-writing-008 - Remove excessive whitespace between words
    • Location: Line 65 / Section "Overview"
    • Issue: Multiple consecutive spaces found between words "being" and "asymptotically"
  • Current text:
Many economic time series display persistent growth that prevents them from being  asymptotically stationary and ergodic.
  • Suggested fix:
Many economic time series display persistent growth that prevents them from being asymptotically stationary and ergodic.
  • Explanation: Only single spaces should appear between words in narrative text.
    • 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: Only single spaces should appear between words in narrative text.
  1. qe-writing-008 - Remove excessive whitespace between words
    • Location: Line 67 / Section "Overview"
    • Issue: Multiple consecutive spaces found between words "display" and "irregular"
  • Current text:
For example, outputs, prices, and dividends typically display  irregular but persistent growth.
  • Suggested fix:
For example, outputs, prices, and dividends typically display irregular but persistent growth.
  • Explanation: Only single spaces should appear between words in narrative text.
    • Current: For example, outputs, prices, and dividends typically display irregular but persistent growth....
    • Fixed: For example, outputs, prices, and dividends typically display irregular but persistent growth....
    • Explanation: Only single spaces should appear between words in narrative text.
  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Line 71-73 / Section "Overview"
    • Issue: Paragraph contains two sentences that should be separated.
  • 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.

Thus, {cite}`Hansen_2012_Eca`  described  two classes of time series models that accommodate growth.
  • 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.

Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth.
  • Explanation: These are separate sentences and should be in separate paragraphs. Also fixes excessive whitespace issues.
    • 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: These are separate sentences and should be in separate paragraphs. Also fixes excessive whitespace issues.
  1. qe-writing-008 - Remove excessive whitespace between words
    • Location: Line 71 / Section "Overview"
    • Issue: Multiple consecutive spaces found between "But" and "there"
  • 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: Only single spaces should appear between words in narrative text.
    • 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: Only single spaces should appear between words in narrative text.
  1. qe-writing-008 - Remove excessive whitespace between words
    • Location: Line 73 / Section "Overview"
    • Issue: Multiple consecutive spaces found between "Hansen_2012_Eca" and "described"
  • Current text:
Thus, {cite}`Hansen_2012_Eca`  described  two classes of time series models that accommodate growth.
  • Suggested fix:
Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth.
  • Explanation: Only single spaces should appear between words in narrative text.
    • 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: Only single spaces should appear between words in narrative text.
  1. qe-writing-008 - Remove excessive whitespace between words
    • Location: Line 73 / Section "Overview"
    • Issue: Multiple consecutive spaces found between "described" and "two"
  • Current text:
Thus, {cite}`Hansen_2012_Eca`  described  two classes of time series models that accommodate growth.
  • Suggested fix:
Thus, {cite}`Hansen_2012_Eca` described two classes of time series models that accommodate growth.
  • Explanation: Only single spaces should appear between words in narrative text.
    • 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: Only single spaces should appear between words in narrative text.
  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Line 85-87 / Section "Overview"
    • Issue: Paragraph contains two sentences that should be separated.
  • 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: Each sentence should be in its own paragraph for clarity and readability.
    • 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: Each sentence should be in its own paragraph for clarity and readability.
  1. qe-writing-001 - Use one sentence per paragraph
    • Location: Line 97-99 / Section "Overview"
    • Issue: Paragraph contains two sentences that should be separated.
  • Current text:
We describe how to construct,  simulate,  and interpret these components.

More details about  these concepts and algorithms  can be found in Hansen  {cite}`Hansen_2012_Eca` and Hansen and Sargent {cite}`Hans_Sarg_book`.
  • Suggested fix:
We describe how to construct, simulate, and interpret these components.

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: Each sentence should be in its own paragraph. Also fixes excessive whitespace issues.
    • Current: `We describe how to construct, simulate, and interpret these components.

More details about these...`

  • Fixed: `We describe how to construct, simulate, and interpret these components.

More details about these co...`

  • Explanation: Each sentence should be in its own paragraph. Also fixes excessive whitespace issues.
  1. qe-writing-008 - Remove excessive whitespace between words
  • Location: Line 97 / Section "Overview"
  • Issue: Multiple consecutive spaces found between "construct," and "simulate,"
  • Current text:
We describe how to construct,  simulate,  and interpret these components.
  • Suggested fix:
We describe how to construct, simulate, and interpret these components.
  • Explanation: Only single spaces should appear between words in narrative text.
    • Current: We describe how to construct, simulate, and interpret these components....
    • Fixed: We describe how to construct, simulate, and interpret these components....
    • Explanation: Only single spaces should appear between words in narrative text.
  1. qe-writing-008 - Remove excessive whitespace between words
  • Location: Line 97 / Section "Overview"
  • Issue: Multiple consecutive spaces found between "simulate," and "and"
  • Current text:
We describe how to construct,  simulate,  and interpret these components.
  • Suggested fix:
We describe how to construct, simulate, and interpret these components.
  • Explanation: Only single spaces should appear between words in narrative text.
    • Current: We describe how to construct, simulate, and interpret these components....
    • Fixed: We describe how to construct, simulate, and interpret these components....
    • Explanation: Only single spaces should appear between words in narrative text.
  1. qe-writing-008 - Remove excessive whitespace between words
  • Location: Line 99 / Section "Overview"
  • Issue: Multiple consecutive spaces found between "about" and "these"
  • Current 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`.
  • Suggested 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: Only single spaces should appear between words in narrative text.
    • Current: More details about these concepts and algorithms can be found in Hansen {cite}Hansen_2012_Eca a...
    • Fixed: More details about these concepts and algorithms can be found in Hansen {cite}Hansen_2012_Eca and ...
    • Explanation: Only single spaces should appear between words in narrative text.
  1. qe-writing-008 - Remove excessive whitespace between words
  • Location: Line 99 / Section "Overview"
  • Issue: Multiple consecutive spaces found between "algorithms" and "can"
  • Current 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`.
  • Suggested 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: Only single spaces should appear between words in narrative text.
    • Current: More details about these concepts and algorithms can be found in Hansen {cite}Hansen_2012_Eca a...
    • Fixed: More details about these concepts and algorithms can be found in Hansen {cite}Hansen_2012_Eca and ...
    • Explanation: Only single spaces should appear between words in narrative text.
  1. qe-writing-008 - Remove excessive whitespace between words
  • Location: Line 99 / Section "Overview"
  • Issue: Multiple consecutive spaces found between "Hansen" and citation
  • Current 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`.
  • Suggested 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: Only single spaces should appear between words in narrative text.
    • Current: More details about these concepts and algorithms can be found in Hansen {cite}Hansen_2012_Eca a...
    • Fixed: More details about these concepts and algorithms can be found in Hansen {cite}Hansen_2012_Eca and ...
    • Explanation: Only single spaces should appear between words in narrative text.
  1. qe-writing-004 - Avoid unnecessary capitalization in narrative text
  • Location: Line 119 / Section "A particular additive functional"
  • Issue: Capitalized technical term "Gaussian" should be lowercase in narrative text
  • 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: Technical terms should not be capitalized unless they are proper nouns. However, note: "Gaussian" is actually a proper noun (derived from mathematician Carl Friedrich Gauss), so this may be acceptable. Consider context carefully.
    • 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: Technical terms should not be capitalized unless they are proper nouns. However, note: "Gaussian" is actually a proper noun (derived from mathematician Carl Friedrich Gauss), so this may be acceptable. Consider context carefully.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 121-123 / Section "A particular additive functional"
  • Issue: Paragraph contains two sentences that should be separated.
  • Current 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)
  • Suggested 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: Each sentence should be in its own paragraph. Also fixes excessive whitespace issue.
    • Current: Our special additive functional displays interesting time series behavior while also being easy to c...
    • Fixed: Our special additive functional displays interesting time series behavior while also being easy to c...
    • Explanation: Each sentence should be in its own paragraph. Also fixes excessive whitespace issue.
  1. qe-writing-008 - Remove excessive whitespace between words
  • Location: Line 125 / Section "A particular additive functional"
  • Issue: Multiple consecutive spaces found between "our" and "additive"
  • 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: Only single spaces should appear between words in narrative text.
    • 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: Only single spaces should appear between words in narrative text.
  1. qe-writing-004 - Avoid unnecessary capitalization in narrative text
  • Location: Line 147 / Section "A particular additive functional"
  • Issue: Capitalized technical term "Gaussian" should be lowercase
  • 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: Technical terms should not be capitalized unless they are proper nouns. Note: As mentioned previously, "Gaussian" may be acceptable as it derives from a proper name.
    • 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: Technical terms should not be capitalized unless they are proper nouns. Note: As mentioned previously, "Gaussian" may be acceptable as it derives from a proper name.
  1. qe-writing-004 - Avoid unnecessary capitalization in narrative text
  • Location: Line 158 / Section "A particular additive functional"
  • Issue: Capitalized technical term "Gaussian" should be lowercase
  • 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: While the mathematical notation is fine, ensure consistent treatment of technical terms in narrative.
    • 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: While the mathematical notation is fine, ensure consistent treatment of technical terms in narrative.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 577-579 / Section "Decomposition"
  • Issue: Paragraph contains multiple sentences in list format that should be properly structured.
  • 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: The introductory sentence should be a complete paragraph, followed by the list.
    • 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: The introductory sentence should be a complete paragraph, followed by the list.
  1. qe-writing-002 - Keep writing clear, concise, and valuable
  • Location: Line 587-589 / Section "Decomposition"
  • Issue: Overly wordy sentence that could be more concise
  • 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 additive functionals defined by {eq}`old1_additive_functionals` and {eq}`old2_additive_functionals`, we first construct the matrices
  • Explanation: The phrase "the particular class of" is redundant when context is clear. Removing it improves conciseness without losing meaning.
    • Current: To attain this decomposition for the particular class of additive functionals defined by {eq}old1_a...`
    • Fixed: To attain this decomposition for the additive functionals defined by {eq}old1_additive_functionals...
    • Explanation: The phrase "the particular class of" is redundant when context is clear. Removing it improves conciseness without losing meaning.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 622-625 / Section "Decomposition"
  • Issue: Paragraph contains two sentences that should be separated.
  • Current 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).
  • Suggested 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).
  • Explanation: Each sentence should be in its own paragraph.
    • Current: `We want to characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition.

A convenie...`

  • Fixed: `We want to characterize and simulate components $\tau_t, m_t, s_t$ of the decomposition.

A convenie...`

  • Explanation: Each sentence should be in its own paragraph.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 629-631 / Section "Decomposition"
  • Issue: Paragraph contains two sentences that should be separated.
  • 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: The line break within the sentence creates awkward formatting; keep the complete sentence on natural line breaks.
    • 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: The line break within the sentence creates awkward formatting; keep the complete sentence on natural line breaks.
  1. qe-writing-001 - Use one sentence per paragraph
  • Location: Line 698-700 / Section "Code"
  • Issue: Paragraph contains multiple sentences that should be separated.
  • 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.
  • 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.
  • Explanation: Each sentence should be in its own paragraph. Also fixes excessive whitespace issue between "study" and "an".
    • 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: Each sentence should be in its own paragraph. Also fixes excessive whitespace issue between "study" and "an".

📌 Summary

The lecture contains several writing style violations, primarily related to paragraph structure (multiple sentences per paragraph), excessive whitespace between words, unnecessary capitalization, and inconsistent formatting choices.


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

- writing: 24 fixes

Rules addressed:
- qe-writing-001: Use one sentence per paragraph
- qe-writing-008: Remove excessive whitespace between words
- qe-writing-008: Remove excessive whitespace between words
- qe-writing-001: Use one sentence per paragraph
- qe-writing-008: Remove excessive whitespace between words
- qe-writing-008: Remove excessive whitespace between words
- qe-writing-008: Remove excessive whitespace between words
- qe-writing-001: Use one sentence per paragraph
- qe-writing-001: Use one sentence per paragraph
- qe-writing-008: Remove excessive whitespace between words
- ... and 14 more
@netlify
Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for lustrous-melomakarona-3ee73e ready!

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