Skip to content

Commit

Permalink
fix for #652 get_max_drawdown_underwater 🔧
Browse files Browse the repository at this point in the history
  • Loading branch information
f0ster committed Mar 13, 2021
1 parent 4b901f6 commit 9c57cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyfolio/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ def get_max_drawdown_underwater(underwater):
The maximum drawdown's recovery.
"""

valley = underwater.idxmin() # end of the period
valley = underwater.index[underwater.values.argmin()] # end of the period
# Find first 0
peak = underwater[:valley][underwater[:valley] == 0].index[-1]
# Find last 0
Expand Down

0 comments on commit 9c57cc5

Please sign in to comment.