mirror of
https://github.com/saymrwulf/zipline.git
synced 2026-05-14 20:58:10 +00:00
MAINT: Include missing sids when raising NoDataForSid
This commit is contained in:
parent
a7db215bbe
commit
924f81c410
1 changed files with 8 additions and 2 deletions
|
|
@ -493,8 +493,14 @@ class HDF5DailyBarReader(SessionBarReader):
|
|||
If one or more of the provided asset identifiers are not
|
||||
contained in the daily bars.
|
||||
"""
|
||||
if not np.in1d(assets, self.sids).all():
|
||||
raise NoDataForSid()
|
||||
missing_sids = np.setdiff1d(assets, self.sids)
|
||||
|
||||
if len(missing_sids):
|
||||
raise NoDataForSid(
|
||||
'Assets not contained in daily pricing file: {}'.format(
|
||||
missing_sids
|
||||
)
|
||||
)
|
||||
|
||||
def _validate_timestamp(self, ts):
|
||||
if ts.asm8 not in self.dates:
|
||||
|
|
|
|||
Loading…
Reference in a new issue