Skip to content

Commit 74d2148

Browse files
committed
Update CHANGELOG.md with comprehensive list of division by zero fixes for v0.0.71
1 parent 31b0ae4 commit 74d2148

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
1229
0.0.70
1330
------
1431

0 commit comments

Comments
 (0)