Improve StreamingFeatherWriter to support file rotation and better me management #1954
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
This PR adds file rotation functionality to the StreamingFeatherWriter class and improves time management and file naming. #1945
Key changes include:
Implementation of file rotation based on size, time interval, and scheduled dates.
Use of a Clock object for time management, improving flexibility and testability.
Addition of timestamps to filenames for better organization and identification.
Tracking of file sizes and creation times to support rotation functionality and provide more information.
Addition of methods to query current file information and next rotation time.
Type of change
Delete options that are not relevant.
How has this change been tested?
The code undergoes testing in both live trading and backtesting processes. It functions correctly in live trading. However, in backtesting, there is an issue with the initialization of _next_rotation_time because the clock component is not initialized immediately, but it does not affect its usage.