mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
Update a few missed ruff format updates
This commit is contained in:
parent
9d6e4ae67d
commit
b97ff77d65
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
from freqtrade_client import __version__ as client_version
|
|
||||||
|
|
||||||
from freqtrade import __version__ as ft_version
|
from freqtrade import __version__ as ft_version
|
||||||
|
from freqtrade_client import __version__ as client_version
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
@ -197,9 +197,9 @@ class BaseReinforcementLearningModel(IFreqaiModel):
|
||||||
"df_raw": self.df_raw,
|
"df_raw": self.df_raw,
|
||||||
}
|
}
|
||||||
if self.data_provider:
|
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]
|
symbol=self.data_provider.current_whitelist()[0]
|
||||||
) # type: ignore
|
)
|
||||||
|
|
||||||
return env_info
|
return env_info
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,8 @@ class LightGBMRegressorMultiTarget(BaseRegressionModel):
|
||||||
eval_weights = [data_dictionary["test_weights"]]
|
eval_weights = [data_dictionary["test_weights"]]
|
||||||
eval_sets = [(None, None)] * data_dictionary["test_labels"].shape[1] # type: ignore
|
eval_sets = [(None, None)] * data_dictionary["test_labels"].shape[1] # type: ignore
|
||||||
for i in range(data_dictionary["test_labels"].shape[1]):
|
for i in range(data_dictionary["test_labels"].shape[1]):
|
||||||
eval_sets[i] = [
|
eval_sets[i] = [ # type: ignore
|
||||||
( # type: ignore
|
(
|
||||||
data_dictionary["test_features"],
|
data_dictionary["test_features"],
|
||||||
data_dictionary["test_labels"].iloc[:, i],
|
data_dictionary["test_labels"].iloc[:, i],
|
||||||
)
|
)
|
||||||
|
|
|
@ -41,8 +41,8 @@ class XGBoostRegressorMultiTarget(BaseRegressionModel):
|
||||||
if self.freqai_info.get("data_split_parameters", {}).get("test_size", 0.1) != 0:
|
if self.freqai_info.get("data_split_parameters", {}).get("test_size", 0.1) != 0:
|
||||||
eval_weights = [data_dictionary["test_weights"]]
|
eval_weights = [data_dictionary["test_weights"]]
|
||||||
for i in range(data_dictionary["test_labels"].shape[1]):
|
for i in range(data_dictionary["test_labels"].shape[1]):
|
||||||
eval_sets[i] = [
|
eval_sets[i] = [ # type: ignore
|
||||||
( # type: ignore
|
(
|
||||||
data_dictionary["test_features"],
|
data_dictionary["test_features"],
|
||||||
data_dictionary["test_labels"].iloc[:, i],
|
data_dictionary["test_labels"].iloc[:, i],
|
||||||
)
|
)
|
||||||
|
|
|
@ -873,9 +873,9 @@ class Backtesting:
|
||||||
enter = row[SHORT_IDX] if trade.is_short else row[LONG_IDX]
|
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]
|
exit_sig = row[ESHORT_IDX] if trade.is_short else row[ELONG_IDX]
|
||||||
exits = self.strategy.should_exit(
|
exits = self.strategy.should_exit(
|
||||||
trade,
|
trade, # type: ignore
|
||||||
row[OPEN_IDX],
|
row[OPEN_IDX],
|
||||||
row[DATE_IDX].to_pydatetime(), # type: ignore
|
row[DATE_IDX].to_pydatetime(),
|
||||||
enter=enter,
|
enter=enter,
|
||||||
exit_=exit_sig,
|
exit_=exit_sig,
|
||||||
low=row[LOW_IDX],
|
low=row[LOW_IDX],
|
||||||
|
|
|
@ -334,7 +334,10 @@ def text_table_add_metrics(strat_results: Dict) -> str:
|
||||||
("Avg. Duration Loser", f"{strat_results['loser_holding_avg']}"),
|
("Avg. Duration Loser", f"{strat_results['loser_holding_avg']}"),
|
||||||
(
|
(
|
||||||
"Max Consecutive Wins / Loss",
|
"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
|
if "max_consecutive_losses" in strat_results
|
||||||
else "N/A",
|
else "N/A",
|
||||||
),
|
),
|
||||||
|
|
|
@ -765,7 +765,8 @@ class Telegram(RPCHandler):
|
||||||
if r.get("realized_profit"):
|
if r.get("realized_profit"):
|
||||||
lines.extend(
|
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})`",
|
"*Total Profit:* `{total_profit_ratio:.2%} ({total_profit_abs_r})`",
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user