Skip to content

fix: Fix KeyError in Warren Buffett agent's intrinsic value analysis by issue #157 #163

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

zky001
Copy link

@zky001 zky001 commented Mar 11, 2025

#157
Fixed inconsistent key names in calculate_intrinsic_value function where some code paths returned "value" and others returned "intrinsic_value". This inconsistency was causing KeyError exceptions when accessing the intrinsic_value in the warren_buffett_agent function. Additionally, improved safety checks when calculating margin of safety to ensure both intrinsic_value and market_cap are positive numbers, preventing misleading or erroneous calculations. The fix ensures proper error handling and consistent dictionary key naming throughout the Warren Buffett agent implementation.

Fixed inconsistent key names in calculate_intrinsic_value function where some code paths returned "value" and others returned "intrinsic_value". This inconsistency was causing KeyError exceptions when accessing the intrinsic_value in the warren_buffett_agent function.
Additionally, improved safety checks when calculating margin of safety to ensure both intrinsic_value and market_cap are positive numbers, preventing misleading or erroneous calculations.
The fix ensures proper error handling and consistent dictionary key naming throughout the Warren Buffett agent implementation.
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