Fix on max drawdown formula to match tests

This commit is contained in:
Nicolas Papp
2022-05-01 12:25:53 -03:00
parent 53a2f55cf0
commit f9244aad92
3 changed files with 3 additions and 3 deletions

View File

@@ -153,7 +153,7 @@ def calculate_max_drawdown(trades: pd.DataFrame, *, date_col: str = 'close_date'
max_drawdown_rel = max_drawdown_df.loc[idxmin, 'drawdown_relative']
return (
abs(min(max_drawdown_df['drawdown'])),
abs(max_drawdown_df.loc[idxmin, 'drawdown']),
high_date,
low_date,
high_val,