]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
chore(qav3): more sensible defaults
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 1 Apr 2025 12:24:21 +0000 (14:24 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 1 Apr 2025 12:24:21 +0000 (14:24 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/freqaimodels/LightGBMRegressorQuickAdapterV3.py
quickadapter/user_data/freqaimodels/XGBoostRegressorQuickAdapterV3.py
quickadapter/user_data/strategies/QuickAdapterV3.py

index c1d1ba21c286e6bada0d8cd0051c2d881592860d..cffc45ed811a3b7e7340622b895dd356a32c59af 100644 (file)
@@ -43,7 +43,7 @@ class LightGBMRegressorQuickAdapterV3(BaseRegressionModel):
     https://github.com/sponsors/robcaulk
     """
 
-    version = "3.6.2"
+    version = "3.6.3"
 
     def __init__(self, **kwargs):
         super().__init__(**kwargs)
@@ -268,7 +268,7 @@ class LightGBMRegressorQuickAdapterV3(BaseRegressionModel):
         label_period_candles: int,
     ) -> tuple[pd.Series, pd.Series]:
         prediction_thresholds_smoothing = self.freqai_info.get(
-            "prediction_thresholds_smoothing", "mean"
+            "prediction_thresholds_smoothing", "quantile"
         )
         smoothing_methods: dict = {
             "quantile": self.quantile_min_max_pred,
@@ -276,7 +276,7 @@ class LightGBMRegressorQuickAdapterV3(BaseRegressionModel):
             "median": LightGBMRegressorQuickAdapterV3.median_min_max_pred,
         }
         return smoothing_methods.get(
-            prediction_thresholds_smoothing, smoothing_methods["mean"]
+            prediction_thresholds_smoothing, smoothing_methods["quantile"]
         )(pred_df, fit_live_predictions_candles, label_period_candles)
 
     def optuna_hp_enqueue_previous_best_trial(
index 3b5e5f6b42fd5389efc3e9bf2bf8d1373185ddf2..16a1b4e413971b988eac4f07f681689ea1cdf068 100644 (file)
@@ -43,7 +43,7 @@ class XGBoostRegressorQuickAdapterV3(BaseRegressionModel):
     https://github.com/sponsors/robcaulk
     """
 
-    version = "3.6.2"
+    version = "3.6.3"
 
     def __init__(self, **kwargs):
         super().__init__(**kwargs)
@@ -271,7 +271,7 @@ class XGBoostRegressorQuickAdapterV3(BaseRegressionModel):
         label_period_candles: int,
     ) -> tuple[pd.Series, pd.Series]:
         prediction_thresholds_smoothing = self.freqai_info.get(
-            "prediction_thresholds_smoothing", "mean"
+            "prediction_thresholds_smoothing", "quantile"
         )
         smoothing_methods: dict = {
             "quantile": self.quantile_min_max_pred,
@@ -279,7 +279,7 @@ class XGBoostRegressorQuickAdapterV3(BaseRegressionModel):
             "median": XGBoostRegressorQuickAdapterV3.median_min_max_pred,
         }
         return smoothing_methods.get(
-            prediction_thresholds_smoothing, smoothing_methods["mean"]
+            prediction_thresholds_smoothing, smoothing_methods["quantile"]
         )(pred_df, fit_live_predictions_candles, label_period_candles)
 
     def optuna_hp_enqueue_previous_best_trial(
index af818d7153d4ff87fbcb9924200aab559a35f3e6..f2a39f51d0dbd7b7b591cdf5d67723df8af8d74e 100644 (file)
@@ -59,7 +59,7 @@ class QuickAdapterV3(IStrategy):
     INTERFACE_VERSION = 3
 
     def version(self) -> str:
-        return "3.2.5"
+        return "3.2.6"
 
     timeframe = "5m"
 
@@ -136,11 +136,11 @@ class QuickAdapterV3(IStrategy):
             "fit_live_predictions_candles", 100
         )
         return [
-            {"method": "CooldownPeriod", "stop_duration_candles": 4},
+            {"method": "CooldownPeriod", "stop_duration_candles": 2},
             {
                 "method": "MaxDrawdown",
                 "lookback_period_candles": fit_live_predictions_candles,
-                "trade_limit": 20,
+                "trade_limit": self.config.get("max_open_trades"),
                 "stop_duration_candles": fit_live_predictions_candles,
                 "max_allowed_drawdown": 0.2,
             },