Skip to content

Releases: ranaroussi/quantstats

0.0.77

05 Sep 18:02
9529573

Choose a tag to compare

0.0.77

  • Fixed issue #467 - CVaR calculation returning NaN for DataFrame inputs:

    • The conditional_value_at_risk() function now properly handles DataFrame inputs
    • When filtering DataFrames, NaN values are now correctly removed before calculating the mean
    • CVaR calculations are now consistent between Series and DataFrame inputs
    • This fix ensures accurate risk metrics in HTML reports when using benchmarks
  • Confirmed issue #468 is already resolved:

    • The "mode.use_inf_as_null" pandas option error reported in v0.0.64 no longer occurs
    • This issue was resolved in a previous version through updates to pandas compatibility

What's Changed

  • Fix CVaR calculation for DataFrames and confirm resolution of mode.use_inf_as_null error by @ranaroussi in #471

Full Changelog: 0.0.76...0.0.77

0.0.76

20 Aug 11:41

Choose a tag to compare

0.0.76

  • Fixed issue #457 - Inconsistent benchmark EOY returns in reports:

    • Benchmark yearly returns now remain consistent regardless of strategy's trading calendar
    • HTML reports preserve original benchmark data for accurate EOY calculations
    • Previously, benchmark returns would change when aligned to different strategies' trading days
    • Added comprehensive tests to verify benchmark consistency across different comparisons
  • Improved timezone handling for cross-market comparisons:

    • All resampling operations now normalize timezones to prevent comparison errors
    • Mixed timezone-aware and timezone-naive data can now be compared without errors
    • Data is converted to UTC then made timezone-naive for consistent comparisons
    • Fixes "Cannot compare dtypes datetime64[ns] and datetime64[ns, UTC]" errors
  • Fixed FutureWarning for pandas pct_change():

    • Updated all pct_change() calls to use fill_method=None parameter
    • Prevents "fill_method='pad' is deprecated" warnings in pandas 2.x
    • Ensures compatibility with future pandas versions

0.0.75

18 Aug 00:22

Choose a tag to compare

0.0.75

  • Fixed FutureWarning for deprecated pandas frequency aliases:
    • Updated make_index default rebalance parameter from "1M" to "1ME"
    • Ensures compatibility with pandas 2.2.0+ without warnings
    • The _compat module already handles conversion for older pandas versions

Full Changelog: 0.0.73...0.0.75

0.0.74

17 Aug 15:51

Choose a tag to compare

Updates:

  • Completed fix for issue #463 - DataFrame handling in qs.reports functions:
    • kelly_criterion: Fixed improper use of 'or' operator with Series values
      • Now properly detects Series vs scalar inputs
      • Handles zero and NaN values correctly for DataFrames
    • recovery_factor: Added proper DataFrame input handling
      • Detects when max_dd is a Series and handles accordingly
      • Prevents "truth value of Series is ambiguous" errors
    • All functions now tested with qs.reports.html() and qs.reports.metrics() with benchmarks
    • Verified working with exact code examples from issue reporters

Full Changelog: 0.0.73...0.0.74

0.0.73

15 Aug 08:55

Choose a tag to compare

Addressed issue #463
Full Changelog: 0.0.72...0.0.73

0.0.72

14 Aug 22:56

Choose a tag to compare

  • Fixed ValueError "truth value of Series is ambiguous" for DataFrame inputs in multiple stats functions:
  • sortino: Properly handles Series downside deviation from DataFrame inputs
  • outlier_win_ratio: Handles Series positive_mean calculations correctly
  • outlier_loss_ratio: Handles Series negative_mean calculations correctly
  • risk_return_ratio: Handles Series standard deviation properly
  • ulcer_performance_index: Handles Series ulcer index values
  • serenity_index: Handles Series std and denominator calculations
  • gain_to_pain_ratio: Handles Series downside calculations
  • All functions now properly return Series for DataFrame inputs and scalars for Series inputs

0.0.71

14 Aug 22:41

Choose a tag to compare

Added comprehensive divide by zero protection across multiple stats functions

Full Changelog: 0.0.70...0.0.71

0.0.70

07 Aug 20:33
30181f3

Choose a tag to compare

What's Changed

  • Fixed chart naming inconsistency: renamed "Daily Active Returns" to "Daily Active Returns (Cumulative Sum)" and "Daily Returns" to "Daily Returns (Cumulative Sum)" to accurately reflect that charts show cumulative values (fixes issue #454)
  • Fixed CAGR calculation bug where years were incorrectly calculated using calendar days instead of trading periods, causing drastically reduced CAGR values (fixes issue #458)
  • Fixed inconsistent EOY returns for benchmarks by preserving original benchmark data for aggregation while aligning to strategy index for other calculations (fixes issue #457)

Full Changelog: 0.0.69...0.0.70

Version 0.0.69

30 Jul 18:09
557459b

Choose a tag to compare

What's Changed

  • Added periods parameter to calmar() function to support custom annualization periods (fixes #455)
  • Updated reports.py to pass periods parameter to Calmar ratio calculation for consistency with other metrics

Bug Fixes

  • Fixed issue #455: Calmar ratio periods parameter is missing

Full Changelog: 0.0.68...0.0.69

0.0.68

22 Jul 10:55
32aa0b6

Choose a tag to compare

What's Changed

Full Changelog: 0.0.67...0.0.68