Skip to content

Commit

Permalink
STY: Fix flake8 error
Browse files Browse the repository at this point in the history
  • Loading branch information
richafrank committed Jul 11, 2020
1 parent cfdf82a commit ecc8308
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyfolio/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,9 @@ def get_top_drawdowns(returns, top=10):
underwater = underwater.loc[:peak]

drawdowns.append((peak, valley, recovery))
if (len(returns) == 0) or (len(underwater) == 0) or (np.min(underwater) == 0):
if ((len(returns) == 0)
or (len(underwater) == 0)
or (np.min(underwater) == 0)):
break

return drawdowns
Expand Down

0 comments on commit ecc8308

Please sign in to comment.