Implement Incremental BBRS Strategy for Real-time Data Processing
- Introduced `BBRSIncrementalState` for real-time processing of the Bollinger Bands + RSI strategy, allowing minute-level data input and internal timeframe aggregation. - Added `TimeframeAggregator` class to handle real-time data aggregation to higher timeframes (15min, 1h, etc.). - Updated `README_BBRS.md` to document the new incremental strategy, including key features and usage examples. - Created comprehensive tests to validate the incremental strategy against the original implementation, ensuring signal accuracy and performance consistency. - Enhanced error handling and logging for better monitoring during real-time processing. - Updated `TODO.md` to reflect the completion of the incremental BBRS strategy implementation.
This commit is contained in:
@@ -175,8 +175,9 @@ class BollingerBandsStrategy:
|
||||
DataFrame: A unified DataFrame containing original data, BB, RSI, and signals.
|
||||
"""
|
||||
|
||||
data = aggregate_to_hourly(data, 1)
|
||||
# data = aggregate_to_hourly(data, 1)
|
||||
# data = aggregate_to_daily(data)
|
||||
data = aggregate_to_minutes(data, 15)
|
||||
|
||||
# Calculate Bollinger Bands
|
||||
bb_calculator = BollingerBands(config=self.config)
|
||||
|
||||
Reference in New Issue
Block a user