File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -532,6 +532,7 @@ def _max_cagr_asset(self) -> dict:
532532
533533 @property
534534 def _max_cagr_asset_right_to_max_cagr (self ) -> Optional [dict ]:
535+ # sourcery skip: use-named-expression
535536 """
536537 The asset with max CAGR lying to the right of the global max CAGR point
537538 (risk should be more than self.max_return['Risk']).
@@ -540,7 +541,8 @@ def _max_cagr_asset_right_to_max_cagr(self) -> Optional[dict]:
540541 """
541542 tolerance = 0.01 # assets CAGR should be less than max CAGR with certain tolerance
542543 cagr = helpers .Frame .get_cagr (self .assets_ror )
543- if global_max_cagr_is_not_asset := (cagr < self .global_max_return_portfolio ["CAGR" ] * (1 - tolerance )).all ():
544+ global_max_cagr_is_not_asset = (cagr < self .global_max_return_portfolio ["CAGR" ] * (1 - tolerance )).all ()
545+ if global_max_cagr_is_not_asset :
544546 condition = self .risk_annual .values > self .global_max_return_portfolio ["Risk" ]
545547 ror_selected = self .assets_ror .loc [:, condition ]
546548 if not ror_selected .empty :
You can’t perform that action at this time.
0 commit comments