Skip to content

Commit

Permalink
- Fix annual_returns calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
twkim112 committed Jul 4, 2024
1 parent d11966f commit 9fc0d79
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions quantstats_lumi/_plotting/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1274,8 +1274,7 @@ def monthly_heatmap_detailedview(
else:
continue

annual_returns = pivot_returns.sum(axis=1)

annual_returns = (pivot_returns / 100 + 1).prod(axis=1).sub(1).mul(100)
annually_grouped = daily_returns.groupby(daily_returns.index.year)
annual_dd = annually_grouped.apply(_stats.max_drawdown) * 100

Expand Down

0 comments on commit 9fc0d79

Please sign in to comment.