FIX ISSUES

This commit is contained in:
Jérôme Delacotte
2025-12-04 19:12:59 +01:00
parent 496c4d7827
commit 3efc95e415
13 changed files with 33 additions and 32 deletions

View File

@@ -1084,23 +1084,23 @@ class Zeus_8_3_2_B_4_2(IStrategy):
dataframe['stop_buying'] = latched
if self.dp.runmode.value in ('backtest'):
if False and self.dp.runmode.value in ('backtest'):
self.trainModel(dataframe, metadata)
short_pair = self.getShortName(pair)
if short_pair == 'BTC':
self.model = joblib.load(f"{short_pair}_rf_model.pkl")
# Préparer les features pour la prédiction
features = dataframe[self.model_indicators].fillna(0)
# Prédiction : probabilité que le prix monte
probs = self.model.predict_proba(features)[:, 1]
# Sauvegarder la probabilité pour lanalyse
dataframe['ml_prob'] = probs
self.inspect_model(self.model)
# if short_pair == 'BTC':
# self.model = joblib.load(f"{short_pair}_rf_model.pkl")
#
# # Préparer les features pour la prédiction
# features = dataframe[self.model_indicators].fillna(0)
#
# # Prédiction : probabilité que le prix monte
# probs = self.model.predict_proba(features)[:, 1]
#
# # Sauvegarder la probabilité pour lanalyse
# dataframe['ml_prob'] = probs
#
# self.inspect_model(self.model)
return dataframe