Last active
March 18, 2023 09:11
-
-
Save scubamut/7e3b0495fdae6dfd3f8f884ed88a0b53 to your computer and use it in GitHub Desktop.
How to print symbols in the zipline bundle
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
# HOW TO PRINT BUNDLE SYMBOLS | |
import os | |
from pandas import Timestamp | |
from zipline.data.bundles import load | |
now = Timestamp.utcnow() | |
bundle = load('US_stock_bundle', os.environ, now) | |
symbols = set(str(asset.symbol) | |
for asset in bundle.asset_finder.retrieve_all( | |
bundle.asset_finder.equities_sids)) | |
print(symbols) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment