-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAINT: Modifies minute bars to use a dict of OHLC ratios #1428
Conversation
@@ -265,7 +274,8 @@ def read(cls, rootdir): | |||
|
|||
def __init__( | |||
self, | |||
ohlc_ratio, | |||
default_ohlc_ratio, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% sure we need to put the prefix of default
here, but not going to block on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was trying to make the distinction from ohlc_ratios_per_sid
clear in the naming, but if it's overkill I'd be happy to simplify it.
2 similar comments
affbb8c
to
e8c7f88
Compare
For scaling up pricing data before writing to bolz, the writer now accepts a dict mapping each sid to the ratio to use. It still accepts a single ratio as default_ohlc_ratio, which is used as a fallback if no mapping exists for a given sid. The default is OHLC_RATIO (1000). This allows better handling of futures pricing data, where the required precision across root symbols is not consistent.
e8c7f88
to
b3f1086
Compare
1 similar comment
1 similar comment
…1428) For scaling up pricing data before writing to bcolz, the writer now accepts a dict mapping each sid to the ratio to use. It still accepts a single ratio as default_ohlc_ratio, which is used as a fallback if no mapping exists for a given sid. The default is OHLC_RATIO (1000). This allows better handling of futures pricing data, where the required precision across root symbols is not consistent.
Instead of using a single ratio to scale up pricing for each sid before writing for bcolz, the writer now accepts a dict mapping each sid to the ratio to use. This arg is still optional, and we use the existing
OHLC_RATIO
(1000) for every sid if no dict is passed.This allows better handling of futures pricing data, where the required precision across root symbols is not consistent.