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:
Vasily.onl
2025-05-26 16:46:04 +08:00
parent ba78539cbb
commit bd6a0f05d7
10 changed files with 2239 additions and 62 deletions

View File

@@ -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)