Add test and formatting to drawdown

This commit is contained in:
Matthias
2020-03-03 20:18:38 +01:00
parent 33a63562cb
commit 9d8970a76b
4 changed files with 10 additions and 5 deletions

View File

@@ -190,7 +190,7 @@ def create_cum_profit(df: pd.DataFrame, trades: pd.DataFrame, col_name: str,
return df
def calculate_max_drawdown(trades: pd.DataFrame, date_col: str = 'close_time',
def calculate_max_drawdown(trades: pd.DataFrame, *, date_col: str = 'close_time',
value_col: str = 'profitperc'
) -> Tuple[float, pd.Timestamp, pd.Timestamp]:
"""