Ingesting A Zipline Data Bundle

  1. Update Users/NAME/.zipline/extension.py (needs to be updated every time you are ingesting a bundle)
    • To locate you will need to unhide files, Command + Shift + Dot (.) on mac
    • Update the start_session & end_session to match the trading start date and end date
    • Update bundle name and ensure file location is correct
  2. Update csvdir.py (one time fix)
    • Line 183 – replace ‘in fname][0]’ with ‘== fname][0]’
    • Line 228 – add div[‘pay_date’] = div[‘ex_date’]
      • Dividends will now be read in correctly
  3. Ingest the CSV files as a new bundle using the terminal
    • conda activate zip35 – activate correct environment
    • zipline bundles – view all bundles currently ingested
    • zipline ingest -b custom-bundle
      • Files are now located in Users/NAME/.zipline/data/bundlename/datecreated/
        • view files via SQLlite (free download)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: