]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
refactor(qav3): avoid side effects at predictions thresholds computation
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 25 Aug 2025 13:28:00 +0000 (15:28 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 25 Aug 2025 13:28:00 +0000 (15:28 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py

index 3b9e7c4ef0d090e116d3f44e16780482986f0eca..b6da415a7623c3eb508995a52461798c8c8bfc06 100644 (file)
@@ -547,7 +547,7 @@ class QuickAdapterRegressorV3(BaseRegressionModel):
                 max(2, int(label_period_cycles)) * label_period_candles,
             )
         )
-        pred_extrema = pred_df.get(EXTREMA_COLUMN).iloc[-thresholds_candles:]
+        pred_extrema = pred_df.get(EXTREMA_COLUMN).iloc[-thresholds_candles:].copy()
         thresholds_smoothing = str(
             self.freqai_info.get("prediction_thresholds_smoothing", "mean")
         )