Skip to content

Commit fc90cb4

Browse files
committed
fix for #652 get_max_drawdown_underwater 🔧
1 parent 4b901f6 commit fc90cb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyfolio/timeseries.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ def get_max_drawdown_underwater(underwater):
890890
The maximum drawdown's recovery.
891891
"""
892892

893-
valley = underwater.idxmin() # end of the period
893+
valley = underwater.index[underwater.values.argmin()] # end of the period
894894
# Find first 0
895895
peak = underwater[:valley][underwater[:valley] == 0].index[-1]
896896
# Find last 0

0 commit comments

Comments
 (0)