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

More Currency Fixes #2612

Merged
merged 2 commits into from
Jan 11, 2020
Merged

More Currency Fixes #2612

merged 2 commits into from
Jan 11, 2020

Conversation

ssanderson
Copy link
Contributor

@ssanderson ssanderson commented Jan 10, 2020

  • Use the exploding-ness of fx rate reader to determine whether EquityPricingLoader.currency_aware should be True or False. This gives a more useful error message to users when they try to load currency-converted data with a loader created via EquityPricingLoader.without_fx.
  • Switch back to using object arrays with None as missing representation for outputs of currency code queries. This is the representation we want for EquityPricing.currency, and it's also easier to work with in 2/3 compat code. Also switch to using None as the code for missing currency.

This produces a nicer error message for users if currency conversion is
requested, but not available.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 87.933% when pulling 393ae91 on last-currency-fix into 3ea5916 on master.

@coveralls
Copy link

coveralls commented Jan 10, 2020

Coverage Status

Coverage decreased (-0.006%) to 88.025% when pulling 13777f9 on last-currency-fix into 3ea5916 on master.

Rather than trying to use S3s everywhere, which is annoying in Python 3 and
makes it harder to represent missing data, just use object arrays with None as
the missing value. This is the representation we want anyway for loading
currency data in pipelines, and the main downsides are performance (which
doesn't appear to be meaningfully affected) and difficulty with sorting, which
we don't need to do (at least right now).
@ssanderson ssanderson changed the title MAINT: Use exploding-ness of fx reader to determine currency-aware. More Currency Fixes Jan 11, 2020
@ssanderson ssanderson merged commit a1eb9b8 into master Jan 11, 2020
@ssanderson ssanderson deleted the last-currency-fix branch January 11, 2020 17:45
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.

None yet

2 participants