-`tests/` - Existing tests will need to be run after each step to ensure no regressions.
### Notes
- This refactoring focuses on improving modularity by splitting large files into smaller, more focused modules, as outlined in the `refactoring.mdc` guide.
- Each major step will be followed by a verification phase to ensure the application remains stable.
## Tasks
- [x] 1.0 Refactor `aggregation.py` into a dedicated sub-package.
- [x] 1.1 Create safety net tests to ensure the aggregation logic still works as expected.
- [x] 1.2 Create a new directory `data/common/aggregation`.
- [x] 1.3 Create `data/common/aggregation/__init__.py` to mark it as a package.
- [x] 1.4 Move the `TimeframeBucket` class to `data/common/aggregation/bucket.py`.
- [x] 1.5 Move the `RealTimeCandleProcessor` class to `data/common/aggregation/realtime.py`.
- [x] 1.6 Move the `BatchCandleProcessor` class to `data/common/aggregation/batch.py`.
- [x] 1.7 Move the utility functions to `data/common/aggregation/utils.py`.
- [x] 1.8 Update `data/common/aggregation/__init__.py` to expose all public classes and functions.
- [x] 1.9 Delete the original `data/common/aggregation.py` file.
- [x] 1.10 Run tests to verify the aggregation logic still works as expected.