Skip to content

Commit 393ae91

Browse files
author
Scott Sanderson
committed
MAINT: Use exploding-ness of fx reader to determine currency-aware.
This produces a nicer error message for users if currency conversion is requested, but not available.
1 parent 09fb188 commit 393ae91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zipline/pipeline/loaders/equity_pricing_loader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ def load_adjusted_array(self, domain, columns, dates, sids, mask):
141141
@property
142142
def currency_aware(self):
143143
# Tell the pipeline engine that this loader supports currency
144-
# conversion.
145-
return True
144+
# conversion if we have a non-dummy fx rates reader.
145+
return not isinstance(self.fx_reader, ExplodingFXRateReader)
146146

147147
def _inplace_currency_convert(self, columns, arrays, dates, sids):
148148
"""

0 commit comments

Comments
 (0)