-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve price performance for 1000+ asset universes. (#2108)
PERF: Optimize price for liquid assets. When using `price`, the call to `last_traded_dt` for every value retrieved became a noticeable bottleneck in algorithms which used over 1000 assets. Instead of calling `last_traded_dt` before every retrieval of a `close` for the `price` field, assume that `close` will retrieve a non-empty value, and then forward fill if it is empty. This change optimizes for the case of a tradeable universe which is predominately composed of liquid assets.
- Loading branch information
Showing
1 changed file
with
30 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters