diff --git a/services/ml/features/talib_features.py b/services/ml/features/talib_features.py index 16b5cc4..312779a 100644 --- a/services/ml/features/talib_features.py +++ b/services/ml/features/talib_features.py @@ -56,12 +56,12 @@ def compute_talib_indicators( # Make a copy to avoid modifying the original result_df = df.copy() - # Extract OHLCV arrays (TA-Lib expects numpy arrays) - open_prices = df['open'].values - high_prices = df['high'].values - low_prices = df['low'].values - close_prices = df['close'].values - volume = df['volume'].values + # Extract OHLCV arrays (TA-Lib expects float64/double numpy arrays) + open_prices = df['open'].values.astype(np.float64) + high_prices = df['high'].values.astype(np.float64) + low_prices = df['low'].values.astype(np.float64) + close_prices = df['close'].values.astype(np.float64) + volume = df['volume'].values.astype(np.float64) logger.info(f"Computing {len(indicators)} TA-Lib indicators")