Skip to content

Instantly share code, notes, and snippets.

@scubamut
Last active March 18, 2023 09:11
Show Gist options
  • Save scubamut/7e3b0495fdae6dfd3f8f884ed88a0b53 to your computer and use it in GitHub Desktop.
Save scubamut/7e3b0495fdae6dfd3f8f884ed88a0b53 to your computer and use it in GitHub Desktop.
How to print symbols in the zipline bundle
# 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