diff --git a/build_helpers/freqtrade_client_version_align.py b/build_helpers/freqtrade_client_version_align.py index 91d708b54..3e425100c 100755 --- a/build_helpers/freqtrade_client_version_align.py +++ b/build_helpers/freqtrade_client_version_align.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 -from freqtrade_client import __version__ as client_version - from freqtrade import __version__ as ft_version +from freqtrade_client import __version__ as client_version def main(): diff --git a/freqtrade/freqai/RL/BaseReinforcementLearningModel.py b/freqtrade/freqai/RL/BaseReinforcementLearningModel.py index e52470b41..225ed3d50 100644 --- a/freqtrade/freqai/RL/BaseReinforcementLearningModel.py +++ b/freqtrade/freqai/RL/BaseReinforcementLearningModel.py @@ -197,9 +197,9 @@ class BaseReinforcementLearningModel(IFreqaiModel): "df_raw": self.df_raw, } if self.data_provider: - env_info["fee"] = self.data_provider._exchange.get_fee( + env_info["fee"] = self.data_provider._exchange.get_fee( # type: ignore symbol=self.data_provider.current_whitelist()[0] - ) # type: ignore + ) return env_info diff --git a/freqtrade/freqai/prediction_models/LightGBMRegressorMultiTarget.py b/freqtrade/freqai/prediction_models/LightGBMRegressorMultiTarget.py index dc7f5d662..88752ea0b 100644 --- a/freqtrade/freqai/prediction_models/LightGBMRegressorMultiTarget.py +++ b/freqtrade/freqai/prediction_models/LightGBMRegressorMultiTarget.py @@ -42,8 +42,8 @@ class LightGBMRegressorMultiTarget(BaseRegressionModel): eval_weights = [data_dictionary["test_weights"]] eval_sets = [(None, None)] * data_dictionary["test_labels"].shape[1] # type: ignore for i in range(data_dictionary["test_labels"].shape[1]): - eval_sets[i] = [ - ( # type: ignore + eval_sets[i] = [ # type: ignore + ( data_dictionary["test_features"], data_dictionary["test_labels"].iloc[:, i], ) diff --git a/freqtrade/freqai/prediction_models/XGBoostRegressorMultiTarget.py b/freqtrade/freqai/prediction_models/XGBoostRegressorMultiTarget.py index f1e1f881b..7bc01e89a 100644 --- a/freqtrade/freqai/prediction_models/XGBoostRegressorMultiTarget.py +++ b/freqtrade/freqai/prediction_models/XGBoostRegressorMultiTarget.py @@ -41,8 +41,8 @@ class XGBoostRegressorMultiTarget(BaseRegressionModel): if self.freqai_info.get("data_split_parameters", {}).get("test_size", 0.1) != 0: eval_weights = [data_dictionary["test_weights"]] for i in range(data_dictionary["test_labels"].shape[1]): - eval_sets[i] = [ - ( # type: ignore + eval_sets[i] = [ # type: ignore + ( data_dictionary["test_features"], data_dictionary["test_labels"].iloc[:, i], ) diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 73633eeb4..03b026744 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -873,9 +873,9 @@ class Backtesting: enter = row[SHORT_IDX] if trade.is_short else row[LONG_IDX] exit_sig = row[ESHORT_IDX] if trade.is_short else row[ELONG_IDX] exits = self.strategy.should_exit( - trade, + trade, # type: ignore row[OPEN_IDX], - row[DATE_IDX].to_pydatetime(), # type: ignore + row[DATE_IDX].to_pydatetime(), enter=enter, exit_=exit_sig, low=row[LOW_IDX], diff --git a/freqtrade/optimize/optimize_reports/bt_output.py b/freqtrade/optimize/optimize_reports/bt_output.py index 061d509ab..1769dcef5 100644 --- a/freqtrade/optimize/optimize_reports/bt_output.py +++ b/freqtrade/optimize/optimize_reports/bt_output.py @@ -334,7 +334,10 @@ def text_table_add_metrics(strat_results: Dict) -> str: ("Avg. Duration Loser", f"{strat_results['loser_holding_avg']}"), ( "Max Consecutive Wins / Loss", - f"{strat_results['max_consecutive_wins']} / {strat_results['max_consecutive_losses']}" + ( + f"{strat_results['max_consecutive_wins']} / " + f"{strat_results['max_consecutive_losses']}" + ) if "max_consecutive_losses" in strat_results else "N/A", ), diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index f77e02e5b..1ee5a3f54 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -765,7 +765,8 @@ class Telegram(RPCHandler): if r.get("realized_profit"): lines.extend( [ - "*Realized Profit:* `{realized_profit_ratio:.2%} ({realized_profit_r})`", + "*Realized Profit:* `{realized_profit_ratio:.2%} " + "({realized_profit_r})`", "*Total Profit:* `{total_profit_ratio:.2%} ({total_profit_abs_r})`", ] )