Skip to content

Conversation

@UdohNakamura
Copy link
Contributor

@UdohNakamura UdohNakamura commented Jul 7, 2025

Hello,

Thank you for creating and maintaining this excellent lecture note. It has been very helpful for my studies.

I noticed a potential inconsistency between the theoretical definition of the risk-free rate and its implementation in the RecurCompetitive class.

The Issue:

  • In the "Markov Asset Prices" section, the price of a risk-free bond in state i is defined as $R_i⁻¹ = Σ_j Q_{ij}$. This corresponds to summing the Q matrix across its rows (axis=1 in NumPy).

  • The current implementation in the risk_free_bond function uses np.sum(self.Q, 0), which sums across columns (axis=0).

The Fix:

This PR corrects the summation axis from 0 to 1 to align the code with the theoretical text.

Please let me know if I have misunderstood anything.

@mmcky mmcky requested a review from HumphreyYang July 21, 2025 00:29
Copy link
Member

@HumphreyYang HumphreyYang left a comment

Choose a reason for hiding this comment

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

Thanks @UdohNakamura. Great catch!

@mmcky
Copy link
Contributor

mmcky commented Jul 21, 2025

thanks @UdohNakamura and @HumphreyYang for your review.

@mmcky mmcky merged commit eb30e4f into QuantEcon:main Jul 21, 2025
6 checks passed
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.

3 participants