Skip to content

Handle equal-return edge case in CLA max_sharpe - #744

Closed
Whning0513 wants to merge 1 commit into
PyPortfolio:mainfrom
Whning0513:fix-cla-equal-returns-738
Closed

Handle equal-return edge case in CLA max_sharpe#744
Whning0513 wants to merge 1 commit into
PyPortfolio:mainfrom
Whning0513:fix-cla-equal-returns-738

Conversation

@Whning0513

Copy link
Copy Markdown

Summary

  • treat None lambdas consistently in CLA case-b comparisons
  • let max_sharpe() fall back to the same solution as min_volatility() when expected returns are equal
  • add a regression test covering equal expected returns

Closes #738

@Whning0513

Copy link
Copy Markdown
Author

Closing this as a duplicate of the earlier #740. Both apply the same _infnone guard and add the same equal-return regression case; keeping a second implementation open does not add a distinct fix.

@Whning0513 Whning0513 closed this Sep 9, 2026
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.

[BUG] CLA crashes with TypeError and produces non-deterministic results when expected returns are equal

1 participant