Before I tell you about my issue, let me describe my environment:
I am a beginner on Zipline and need help on non US stock data ingestion.
MacOs
Zipline 1.3.0
Custom CSV Bundle
Non US Equities
Custom Trading Calendar
Conda Environment installation
Now that you know a little about me, let me tell you about the issue I am
having:
I am a beginner on Zipline and need help on non US stock data ingestion.
Description
I need to make a single Sunday(30-10-2016) as a Trading day. I have registered this trading Calendar as in calendar_utils.py and have no problem with it. I have even got the adhoc_holidays() working.
This is the Trading calendar for Indian Stock market. India has few regualr holidays which fall on the same day every year and many holidays are irregular. Based on the same list of irregular holidays since Oct 2016 i have made my custom trading calendar. Yes, i am now dealing with data after October 2016 to current date only.
I want to point to special_opens where the issue is. I have a data in my csv for 30-10-2016 as it was a special trading day on Sunday.
This is the valid exception which i get. #helpwanted.
(/Users/praj3/anaconda3/envs/ZipPallavi) bash-3.2$ zipline ingest -b csvdir
<string>:22: UserWarning: Overwriting bundle with name 'csvdir'
Loading custom pricing data: [############------------------------] 33% | DWARIKESH: sid 0
Merging daily equity files: [------------------------------------] 0
Traceback (most recent call last):
File "/Users/praj3/anaconda3/envs/ZipPallavi/bin/zipline", line 11, in <module>
load_entry_point('zipline==1.3.0', 'console_scripts', 'zipline')()
File "/Users/praj3/anaconda3/envs/ZipPallavi/lib/python3.5/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/praj3/anaconda3/envs/ZipPallavi/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/praj3/anaconda3/envs/ZipPallavi/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/praj3/anaconda3/envs/ZipPallavi/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/praj3/anaconda3/envs/ZipPallavi/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/praj3/anaconda3/envs/ZipPallavi/lib/python3.5/site-packages/zipline/__main__.py", line 348, in ingest
show_progress,
File "/Users/praj3/anaconda3/envs/ZipPallavi/lib/python3.5/site-packages/zipline/data/bundles/core.py", line 451, in ingest
pth.data_path([name, timestr], environ=environ),
File "/Users/praj3/anaconda3/envs/ZipPallavi/lib/python3.5/site-packages/zipline/data/bundles/csvdir.py", line 94, in ingest
self.csvdir)
File "/Users/praj3/anaconda3/envs/ZipPallavi/lib/python3.5/site-packages/zipline/data/bundles/csvdir.py", line 156, in csvdir_bundle
show_progress=show_progress)
File "/Users/praj3/anaconda3/envs/ZipPallavi/lib/python3.5/site-packages/zipline/data/us_equity_pricing.py", line 257, in write
return self._write_internal(it, assets)
File "/Users/praj3/anaconda3/envs/ZipPallavi/lib/python3.5/site-packages/zipline/data/us_equity_pricing.py", line 378, in _write_internal
).difference(asset_sessions).tolist(),
AssertionError: Got 497 rows for daily bars table with first day=2016-10-20, last day=2018-10-19, expected 496 rows.
Missing sessions: []
Extra sessions: [Timestamp('2016-10-30 00:00:00+0000', tz='UTC')]
Dear Zipline Maintainers,
Before I tell you about my issue, let me describe my environment: I am a beginner on Zipline and need help on non US stock data ingestion.
MacOs Zipline 1.3.0 Custom CSV Bundle Non US Equities Custom Trading Calendar Conda Environment installation
Now that you know a little about me, let me tell you about the issue I am having: I am a beginner on Zipline and need help on non US stock data ingestion.
Description
I need to make a single Sunday(30-10-2016) as a Trading day. I have registered this trading Calendar as in calendar_utils.py and have no problem with it. I have even got the adhoc_holidays() working.
This is the Trading calendar for Indian Stock market. India has few regualr holidays which fall on the same day every year and many holidays are irregular. Based on the same list of irregular holidays since Oct 2016 i have made my custom trading calendar. Yes, i am now dealing with data after October 2016 to current date only.
I want to point to special_opens where the issue is. I have a data in my csv for 30-10-2016 as it was a special trading day on Sunday.
Below is my NSEExchange trading calendar.
This is the valid exception which i get. #helpwanted.
Edit: I even tried adding
But this too throws the same exception that, This is not a Trading day.
I am missing something in my special_opens, not sure how to get this working. #help
Sincerely, Punith
helpwanted #pleasehelp