]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
perf(qav3): fine tune stoploss natr ratio
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 13 Apr 2025 09:48:56 +0000 (11:48 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 13 Apr 2025 09:48:56 +0000 (11:48 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py
quickadapter/user_data/strategies/QuickAdapterV3.py

index cf48014ca3711131a8e5cc959a496e48c14a39d3..62cec4cd84e58b542afe8a8a8bada164bbf2f340 100644 (file)
@@ -44,7 +44,7 @@ class QuickAdapterRegressorV3(BaseRegressionModel):
     https://github.com/sponsors/robcaulk
     """
 
-    version = "3.7.8"
+    version = "3.7.9"
 
     @cached_property
     def _optuna_config(self) -> dict:
@@ -460,11 +460,11 @@ class QuickAdapterRegressorV3(BaseRegressionModel):
         if self._optuna_config.get("warm_start"):
             self.optuna_enqueue_previous_best_params(pair, namespace, study)
 
-        is_study_multi_objective = direction is None and directions is not None
-        if is_study_multi_objective is True:
-            objective_type = "multi objective"
-        else:
+        is_study_single_objective = direction is not None and directions is None
+        if is_study_single_objective is True:
             objective_type = "single objective"
+        else:
+            objective_type = "multi objective"
         logger.info(f"Optuna {pair} {namespace} {objective_type} hyperopt started")
         start_time = time.time()
         try:
@@ -484,7 +484,7 @@ class QuickAdapterRegressorV3(BaseRegressionModel):
             return
 
         time_spent = time.time() - start_time
-        if is_study_multi_objective is False:
+        if is_study_single_objective:
             if not QuickAdapterRegressorV3.optuna_study_has_best_trial(study):
                 logger.error(
                     f"Optuna {pair} {namespace} {objective_type} hyperopt failed ({time_spent:.2f} secs): no study best trial found"
index 46ac9219bbb0dbedf7d676df7d599aa28356804b..793ddeacdbe2166de18861cfd84d23b91698a658 100644 (file)
@@ -58,7 +58,7 @@ class QuickAdapterV3(IStrategy):
     INTERFACE_VERSION = 3
 
     def version(self) -> str:
-        return "3.3.4"
+        return "3.3.5"
 
     timeframe = "5m"
 
@@ -380,7 +380,7 @@ class QuickAdapterV3(IStrategy):
             self._label_params[pair]["label_natr_ratio"] = label_natr_ratio
 
     def get_trailing_stoploss_natr_ratio(self, pair: str) -> float:
-        return self.get_label_natr_ratio(pair) * 0.025
+        return self.get_label_natr_ratio(pair) * 0.25
 
     def set_freqai_targets(self, dataframe: DataFrame, metadata: dict, **kwargs):
         pair = str(metadata.get("pair"))