File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,25 @@ Changelog
77- Fixed RuntimeWarnings in tail_ratio function by properly handling edge cases:
88 - Handle divide by zero when lower quantile is 0
99 - Handle invalid values when quantiles return NaN
10+ - Handle DataFrame inputs that return Series from quantile operations
1011 - Return NaN gracefully instead of triggering warnings
1112
13+ - Added comprehensive divide by zero protection across multiple stats functions:
14+ - gain_to_pain_ratio: Returns NaN when no negative returns (downside = 0)
15+ - recovery_factor: Returns NaN when no drawdown (max_dd = 0)
16+ - sortino: Returns NaN when downside deviation is 0
17+ - calmar: Returns NaN when max drawdown is 0
18+ - ulcer_performance_index: Returns NaN when ulcer index is 0
19+ - serenity_index: Returns NaN when std or denominator is 0
20+ - payoff_ratio: Returns NaN when average loss is 0
21+ - outlier_win_ratio: Returns NaN when no positive returns
22+ - outlier_loss_ratio: Returns NaN when no negative returns
23+ - risk_return_ratio: Returns NaN when standard deviation is 0
24+ - kelly_criterion: Returns NaN when win/loss ratio is 0 or NaN
25+ - greeks: Returns NaN for beta when benchmark variance is 0
26+ - rolling_greeks: Handles zero benchmark std gracefully
27+ - All functions now return NaN instead of triggering RuntimeWarnings
28+
12290.0.70
1330------
1431
You can’t perform that action at this time.
0 commit comments