Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/source/whatsnew/skeleton.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ None
Bug Fixes
~~~~~~~~~

None
- Fix ``DataPortal._first_trading_minute`` set to ``(None, None)`` tuple instead
of ``None`` when no first trading day is configured (:issue:`xxx`).
- Fix ``DataPortal._get_daily_spot_value`` passing ``"minute"`` instead of
``"daily"`` as data frequency to ``get_adjusted_value`` (:issue:`xxx`).

Performance
~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions src/zipline/data/data_portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def __init__(
self._first_trading_minute = (
self.trading_calendar.session_first_minute(self._first_trading_day)
if self._first_trading_day is not None
else (None, None)
else None
)

# Store the locs of the first day and first minute
Expand Down Expand Up @@ -734,7 +734,7 @@ def _get_daily_spot_value(self, asset, column, dt):
else:
# adjust if needed
return self.get_adjusted_value(
asset, column, found_dt, dt, "minute", spot_value=value
asset, column, found_dt, dt, "daily", spot_value=value
)
else:
found_dt -= self.trading_calendar.day
Expand Down