-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: Enhance investment pool functionality and error handling #86
base: main
Are you sure you want to change the base?
Conversation
princevijay27
commented
Feb 27, 2025
- Modified filter criteria for investment pool selection
- Updated token investment logic for better performance
- Implemented error handling for large numerical values
- Expanded pool selection range for increased flexibility
- Added fallback calculation for zero APR base
- Introduced investment caps and validation
- Added multi-pool functionality and updated partial position reallocation
- Modified filter criteria for investment pool selection - Updated token investment logic for better performance - Implemented error handling for large numerical values - Expanded pool selection range for increased flexibility - Added fallback calculation for zero APR base - Introduced investment caps and validation - Added multi-pool functionality and updated partial position reallocation
- Modified filter criteria for investment pool selection - Updated token investment logic for better performance - Implemented error handling for large numerical values - Expanded pool selection range for increased flexibility - Added fallback calculation for zero APR base - Introduced investment caps and validation - Added multi-pool functionality and updated partial position reallocation
if sharpe_ratio <= SHARPE_RATIO_THRESHOLD: | ||
logs.append(f"Opportunity does not meet the {SHARPE_RATIO_THRESHOLD=}") | ||
continue | ||
# if sharpe_ratio <= SHARPE_RATIO_THRESHOLD: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why comment these lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still not resolved
if len(assets) != len(max_amounts_in): | ||
raise ValueError("Length of assets and max_amounts_in must match") | ||
|
||
# Initialize the new amounts list with zeros |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you update the logging statements? They aren’t very clear right now and could be more descriptive.
@@ -172,23 +168,13 @@ def adjust_amounts(self, assets, max_amounts_in, assets_new): | |||
|
|||
# Initialize the new amounts list with zeros | |||
new_max_amounts_in = [0] * len(assets_new) | |||
self.context.logger.info(f"Initial new_max_amounts_in: {new_max_amounts_in}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't remove the logs just add more descriptive logs
…that were added for testing purposes
…that were added for testing purposes