Skip to content
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

Merged
merged 3 commits into from
Aug 24, 2016

Conversation

yankees714
Copy link
Contributor

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.

@coveralls
Copy link

coveralls commented Aug 23, 2016

Coverage Status

Coverage decreased (-0.02%) to 86.179% when pulling edc6b01 on ohlc-ratios into b9a7e2f on master.

@@ -265,7 +274,8 @@ def read(cls, rootdir):

def __init__(
self,
ohlc_ratio,
default_ohlc_ratio,
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@coveralls
Copy link

coveralls commented Aug 23, 2016

Coverage Status

Coverage decreased (-0.05%) to 86.149% when pulling affbb8c on ohlc-ratios into b9a7e2f on master.

@coveralls
Copy link

coveralls commented Aug 23, 2016

Coverage Status

Coverage decreased (-0.05%) to 86.149% when pulling affbb8c on ohlc-ratios into b9a7e2f on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 86.149% when pulling affbb8c on ohlc-ratios into b9a7e2f on master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 86.149% when pulling affbb8c on ohlc-ratios into b9a7e2f on master.

@coveralls
Copy link

coveralls commented Aug 23, 2016

Coverage Status

Coverage decreased (-0.05%) to 86.149% when pulling affbb8c on ohlc-ratios into b9a7e2f on master.

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.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 86.167% when pulling b3f1086 on ohlc-ratios into eba78ae on master.

1 similar comment
@coveralls
Copy link

coveralls commented Aug 24, 2016

Coverage Status

Coverage decreased (-0.05%) to 86.167% when pulling b3f1086 on ohlc-ratios into eba78ae on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 86.129% when pulling 706a6bb on ohlc-ratios into eba78ae on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 86.129% when pulling 706a6bb on ohlc-ratios into eba78ae on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 85.735% when pulling 8e2617e on ohlc-ratios into eba78ae on master.

@coveralls
Copy link

coveralls commented Aug 24, 2016

Coverage Status

Coverage decreased (-0.05%) to 86.167% when pulling 8e2617e on ohlc-ratios into eba78ae on master.

@yankees714 yankees714 merged commit 012888f into master Aug 24, 2016
@yankees714 yankees714 deleted the ohlc-ratios branch August 24, 2016 17:14
bartosh pushed a commit to bartosh/zipline that referenced this pull request Sep 27, 2016
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants