Fix some assumptions on the data

available_capital is not guaranteed to be available, while dry-run-wallet is.
This commit is contained in:
Matthias
2022-05-02 19:44:14 +02:00
parent 7160f9085a
commit 1e2523af61
4 changed files with 6 additions and 6 deletions

View File

@@ -36,7 +36,7 @@ class MaxDrawDownRelativeHyperOptLoss(IHyperOptLoss):
drawdown_df = calculate_underwater(
results,
value_col='profit_abs',
starting_balance=config['available_capital']
starting_balance=config['dry_run_wallet']
)
max_drawdown = abs(min(drawdown_df['drawdown']))
relative_drawdown = max(drawdown_df['drawdown_relative'])