Skip to content

Fix notation conflict: change volatility parameter from s to ν - #728

Merged
jstac merged 1 commit into
mainfrom
cake_og
Nov 22, 2025
Merged

jstac merged 1 commit into
mainfrom
cake_og

Conversation

@jstac

@jstac jstac commented Nov 22, 2025

Copy link
Copy Markdown
Contributor

Summary

This PR resolves a notation conflict in the stochastic cake eating lecture where the variable s was being used for both:

  • Savings: s = x - c
  • Volatility (shock scale parameter) in the production shock: ξ := exp(μ + s ζ)

The volatility parameter has been changed to ν (Greek letter nu) throughout both the mathematical text and Python code.

Changes

  • Updated mathematical notation in LaTeX expressions from s to \nu
  • Changed Model NamedTuple field from s: float to ν: float
  • Updated create_model function parameter from s to ν
  • Modified shock calculation to use ν: shocks = np.exp(μ + ν * np.random.randn(shock_size))
  • Simplified Model instantiation from keyword arguments to positional arguments for cleaner code

Test plan

  • Converted markdown to Python using jupytext
  • Ran the Python script successfully
  • Both test cases converged without errors (log utility in 229 iterations, CRRA utility in 237 iterations)

🤖 Generated with Claude Code

Changed the shock scale parameter from 's' to 'ν' (Greek letter nu) to
resolve the naming conflict with savings (s = x - c). This makes the code
more readable and consistent with mathematical notation conventions.

Changes:
- Updated mathematical notation in text to use \nu instead of s
- Changed Model NamedTuple field from 's' to 'ν'
- Updated create_model function parameter from 's' to 'ν'
- Modified shock calculation to use ν
- Simplified Model instantiation to use positional arguments

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@jstac

jstac commented Nov 22, 2025

Copy link
Copy Markdown
Contributor Author

This change improves code clarity by eliminating the confusing dual use of the variable 's'. Now 's' is used exclusively for savings (s = x - c), and 'ν' (nu) is used for the volatility parameter in the shock distribution. The Greek letter ν is a natural choice that aligns with common mathematical conventions for volatility parameters.

@github-actions

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant