How do I register a custom bundle with zipline?

Viewed 3644

I am following the tutorial here:

http://www.prokopyshen.com/create-custom-zipline-data-bundle

and trying to set up a custom bundle to get price from custom, non US financial assets. I am stuck on the line that says:

Advise zipline of our bundle by registering it via .zipline/extension.py

My extension.py file is located in the .zipline/ directiory and has the following code:

from zipline.data.bundles import register
from zipline.data.bundles.viacsv import viacsv
eqSym = {
    "CBA"
}

register(
    'CBA.csv',    # name this whatever you like
    viacsv(eqSym),
)

I don't get what it means to register the bundle via .zipline/extension.py though? I thought it might mean to just run the extension.py file from my terminal via a:

python extenion.py

but that fails and says:

ImportError: No module named viacsv

How do i register this bundle?

3 Answers
Related