Skip to content

Commit

Permalink
improve code comments based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
HumphreyYang committed Feb 28, 2024
1 parent ff690f5 commit 47286bd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lectures/cagan_ree.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,14 @@ First, we store parameters in a `namedtuple`:
```{code-cell} ipython3
# Create the rational expectation version of Cagan model in finite time
CaganREE = namedtuple("CaganREE",
["m0", "μ_seq", "α", "δ", "π_end"])
def create_cagan_model(m0=1, # Initial money supply
α=5, # Sensitivity parameter
μ_seq=None # Rate of growth
):
["m0", # initial money supply
"μ_seq", # sequence of rate of growth
"α", # sensitivity parameter
"δ", # α/(1 + α)
"π_end" # terminal expected inflation
])
def create_cagan_model(m0=1, α=5, μ_seq=None):
δ = α/(1 + α)
π_end = μ_seq[-1] # compute terminal expected inflation
return CaganREE(m0, μ_seq, α, δ, π_end)
Expand Down

0 comments on commit 47286bd

Please sign in to comment.