fix: generalize values for before_trading_start_minutes#222
Open
zhiyisun wants to merge 12 commits intostefan-jansen:mainfrom
Open
fix: generalize values for before_trading_start_minutes#222zhiyisun wants to merge 12 commits intostefan-jansen:mainfrom
zhiyisun wants to merge 12 commits intostefan-jansen:mainfrom
Conversation
Use open_times and timezone info from trading_calendar for before_trading_start_minutes. Replace the original 8:45 "US/Eastern". Signed-off-by: Zhiyi Sun <zhiyisun@msn.com>
exchange_calendar is migrating from pytz to zoneinfo. Using str(self.trading_calendar.tz) can support both pytz and zoneinfo.
- Modified winsorise_uint32 function to exclude volume from uint32 boundary checks - Updated daily bars (bcolz) to handle volume as uint64 instead of uint32 - Updated minute bars (bcolz) to handle volume as uint64 instead of uint32 - Updated HDF5 daily bars to handle volume as uint64 instead of uint32 - Updated Cython code to properly read volume as uint64 - Fixed related documentation and function signatures This resolves the issue where large volume values (e.g., billions of shares) were triggering uint32 overflow warnings. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Addresses the pandas FutureWarning that occurs when DataFrameGroupBy.apply operates on the grouping columns. Explicitly set include_groups=False to match the upcoming pandas behavior where grouping columns will be excluded from the operation by default. Fixes issues in: - src/zipline/assets/asset_writer.py (lines ~321 and ~383) - src/zipline/pipeline/loaders/earnings_estimates.py (line ~479) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Fixes the 'name 'uint64' is not defined' error that occurred when changing the volume column from 32-bit to 64-bit integers. The Cython file _src/zipline/data/_equities.pyx_ was missing the import for the uint64 dtype, which is now properly imported from numpy. Also fixed pyproject.toml license specification to comply with PEP 621. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
… parameter - Removed include_groups=False parameter from groupby calls in asset_writer.py and earnings_estimates.py - This fixes TypeError in older pandas versions where include_groups parameter is not supported - Addresses issue where DataFrame.groupby() was getting unexpected keyword argument 'include_groups' Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In original zipline, the before_trading_start_minutes is fixed as 8:45AM US/Eastern timezone. But that won't fit if the security market is in different location. Using (open time - 45min) and timezone info to support different timezone markets.
One tricky is exchange_calendars is moving from pytz to zoneinfo. It seems str() is the best function to convert timezone (expressed in both pytz and zoneinfo) to timezone string.