- Introduced `indicators.py` containing implementations for SMA, EMA, RSI, MACD, and Bollinger Bands, optimized for handling sparse OHLCV data. - Added `IndicatorResult` dataclass to encapsulate results of indicator calculations. - Implemented methods for calculating multiple indicators efficiently with JSON configuration support and validation. - Updated `__init__.py` to include new indicators in the module's exports. - Enhanced documentation to cover the new technical indicators module, including usage examples and integration details. - Added comprehensive unit tests to ensure accuracy and robustness of the indicators module.
65 lines
1.3 KiB
Python
65 lines
1.3 KiB
Python
"""
|
|
Common data processing utilities for all exchanges.
|
|
|
|
This package contains shared components for data validation, transformation,
|
|
and aggregation that can be used across different exchange implementations.
|
|
"""
|
|
|
|
from .data_types import (
|
|
StandardizedTrade,
|
|
OHLCVCandle,
|
|
MarketDataPoint,
|
|
DataValidationResult
|
|
)
|
|
|
|
from .aggregation import (
|
|
TimeframeBucket,
|
|
RealTimeCandleProcessor,
|
|
CandleProcessingConfig
|
|
)
|
|
|
|
from .transformation import (
|
|
BaseDataTransformer,
|
|
UnifiedDataTransformer,
|
|
create_standardized_trade
|
|
)
|
|
|
|
from .validation import (
|
|
BaseDataValidator,
|
|
ValidationResult
|
|
)
|
|
|
|
from .indicators import (
|
|
TechnicalIndicators,
|
|
IndicatorResult,
|
|
create_default_indicators_config,
|
|
validate_indicator_config
|
|
)
|
|
|
|
__all__ = [
|
|
# Data types
|
|
'StandardizedTrade',
|
|
'OHLCVCandle',
|
|
'MarketDataPoint',
|
|
'DataValidationResult',
|
|
|
|
# Aggregation
|
|
'TimeframeBucket',
|
|
'RealTimeCandleProcessor',
|
|
'CandleProcessingConfig',
|
|
|
|
# Transformation
|
|
'BaseDataTransformer',
|
|
'UnifiedDataTransformer',
|
|
'create_standardized_trade',
|
|
|
|
# Validation
|
|
'BaseDataValidator',
|
|
'ValidationResult',
|
|
|
|
# Technical Indicators
|
|
'TechnicalIndicators',
|
|
'IndicatorResult',
|
|
'create_default_indicators_config',
|
|
'validate_indicator_config'
|
|
] |