Open jaepil-choi opened 4 years ago
bump
Hi, here are a few comments as I faced a similar issue.
Following the example for loading the custom bundle, firstly from the cli simply run zipline ingest
. This should download the
quantopian-quandl bundle to the zipline root folder. In windows this was "C:\Users\user.zipline" and an "extension.py" file appeared in this folder. Update the below code as advised by the how-to guide in that file and from the cli run "python extension.py" to ingest the csv data that you prepared.
Note, it is a bit tricky working between Jupyter and the cli as "zipline bundle" from the cli will show registered bundles however "bundle.bundles" when called from Jupyter will not show the same registered even when working in the same conda env. Stepping through the My First Algorithm part helped clear this up a little, accessing the custom csv bundle via cell magic worked a treat.
Cheers
import pandas as pd
from zipline.data.bundles import register
from zipline.data.bundles.csvdir import csvdir_equities
start_session = pd.Timestamp('2012-1-3', tz='utc')
end_session = pd.Timestamp('2014-12-31', tz='utc')
register(
'custom-csvdir-bundle',
csvdir_equities(
['daily'],
r'C:\temp\csvData',
),
calendar_name='NYSE', # US equities
start_session=start_session,
end_session=end_session
Dear Zipline Maintainers,
Before I tell you about my issue, let me describe my environment:
Environment
Now that you know a little about me, let me tell you about the issue I am having:
Description of Issue
What did you expect to happen? I expected the custom csv data to be ingested and my data bundle to be registered.
What happened instead? It seems the data bundle has been added to
bundle
but when I try to ingest it, it says there's no such bundle registered.Here is how you can reproduce this issue on your machine:
Reproduction Steps
pandas_datareader
data.tail()
data.head()
...
What steps have you taken to resolve this already?
I can't understand how my custom bundle could be overwritten (which indicates that it has already existed) and not have been registered at the same time.
I searched existing issues and tried this to change
C:\Users\Jaepil\Anaconda3\envs\finance35\Lib\site-packages\zipline\data\bundles\csvdir.py
However, it didn't work. @freddiev4 seems to have managed to make 'No bundle' issue go away but I didn't even get there.
...
Anything else?
On zipline's official documentation, it says:
However, it is extremely unclear how I should edit my
extension.py
. I really could use some help....
Sincerely,
$ whoami
jaepil-pc\jaepil