zipline
zipline copied to clipboard
AssertionError when loading csv data

Before I tell you about my issue, let me describe my environment:
Environment
- Operating System: Mac Catalina
- Python Version: python for my venv is 3.5.6
- Python Bitness: 64 bits
- How did you install Zipline: conda
- Python packages: - see my previous issue
Description of Issue
I want on ingest personal data, on the screenshot you see that it does work for several stocks but then I get this AssertionError regarding the data. What does it mean, how can I fix this?
What steps have you taken to resolve this already?
It works, but then I have to keep deleting the csv file. But I dont want to do that/
Sincerely, Cem.
It is probably because of the trading calendar. According to the calendar you specified in "extension.py" it is expected that 7606 non-holiday days are existed, but there are 8949 rows (days) in your data source file.
Thats the thing, when i compare the indicies of my stocks and compare them with the NYSE trading days, almost all match up.
@cemal95 It looks like the start date for all the built-in trading calendars is '1990-01-01'
, so the zipline ingestion is complaining that your csv has data prior to that date (including e.g. 1984-09-07). Can you remove those rows from your csv file?
@richafrank I think I could, however, I have more than 12.000 securities. Wouldnt be more feasible if I change the setting in Zipline to 1984-01-01?
Good question. That might take some workarounds. @llllllllll What do you think about the csv bundle ingest clipping the data at the calendar bounds (with a warning)?