diff --git a/freqtrade/data/metrics.py b/freqtrade/data/metrics.py index 77f29080c..de8ebac4a 100644 --- a/freqtrade/data/metrics.py +++ b/freqtrade/data/metrics.py @@ -261,8 +261,8 @@ def calculate_expectancy(trades: pd.DataFrame) -> tuple[float, float]: :return: expectancy, expectancy_ratio """ - expectancy = 0 - expectancy_ratio = 100 + expectancy = 0.0 + expectancy_ratio = 100.0 if len(trades) > 0: winning_trades = trades.loc[trades["profit_abs"] > 0] diff --git a/requirements-dev.txt b/requirements-dev.txt index 91a233b3d..1907e9a0e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -8,7 +8,7 @@ coveralls==4.0.1 ruff==0.7.0 -mypy==1.11.2 +mypy==1.12.1 pre-commit==4.0.1 pytest==8.3.3 pytest-asyncio==0.24.0