mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-14 04:03:55 +00:00
chore: improve type safety
This commit is contained in:
parent
83f285c913
commit
41a4c7c39f
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue
Block a user