From bd4dd8403b0b6223bff4ef494f28c15c506caf75 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 25 Jan 2020 12:48:13 +0100 Subject: [PATCH] Fix type-errors with stake_amount --- freqtrade/optimize/backtesting.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 92129b324..cdf74f65f 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -279,7 +279,7 @@ class Backtesting: return bt_res return None - def backtest(self, processed: Dict, stake_amount: int, + def backtest(self, processed: Dict, stake_amount: float, start_date, end_date, max_open_trades: int = 0, position_stacking: bool = False) -> DataFrame: """ @@ -300,7 +300,7 @@ class Backtesting: logger.debug(f"Run backtest, stake_amount: {stake_amount}, " f"start_date: {start_date}, end_date: {end_date}, " f"max_open_trades: {max_open_trades}, position_stacking: {position_stacking}" - ) + ) trades = [] trade_count_lock: Dict = {} @@ -405,7 +405,7 @@ class Backtesting: # Execute backtest and print results all_results[self.strategy.get_strategy_name()] = self.backtest( processed=preprocessed, - stake_amount=self.config.get('stake_amount'), + stake_amount=self.config['stake_amount'], start_date=min_date, end_date=max_date, max_open_trades=max_open_trades,