Skip to content

[ge_arrow] Correct summation axis #480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

UdohNakamura
Copy link

@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.

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