nautilus_trader
nautilus_trader copied to clipboard
Refactor time-based bar aggregation
Draft Pull Request
Summary
interval_typetype from str to enum- Refactored TimeBarAggregator.init, so the variable initialization are before methods calling
- Added validation of time_bars_origin
- Fixed the first bar issue on left_open interval (https://nt-dist.stty.cz/issues/20250509-1-first-bar-not-generated-on-millisecond-bug/)
- Fixed the bug with
self.next_close_nsdoesn't change, when no tick is sent - Fixed potential bug with first bar skipped on batch processing
- Added _invalidate_skip_first_non_full_bar_on_exact_start for batch proccesing
- Added step validation to BarSpecification
- TBD
Related Issues/PRs
https://nt-dist.stty.cz/issues/20250509-1-first-bar-not-generated-on-millisecond-bug/
Type of change
- [x] Bug fix (non-breaking)
- [x] New feature (non-breaking)
- [x] Breaking change (impacts existing behavior)
- [ ] Documentation update
- [x] Maintenance / chore
Breaking change details (if applicable)
Release notes
- [ ] I added a concise entry to
RELEASES.mdthat follows the existing conventions (when applicable)
Testing
Ensure new or changed logic is covered by tests.
- [ ] Affected code paths are already covered by the test suite
- [ ] I added/updated tests to cover new or changed logic
Closing this, as the change have been/will be distributed across different PRs.