Skip to content

Calendar hardcoded to US stock market #2434

@willianpaixao

Description

@willianpaixao

Hi fellow maintainers,

I've been trying to ingest non-USA CSV bundles with Zipline, but it proved much harder than I calculated.
Turns out that there are some hardcoded variables that bind the process to only NYSE and UTC data.
Follow some lines I had to change in order to have a successful (without crashes) bundle ingestion:

metadata['exchange'] = "CSVDIR"

register_calendar_alias("CSVDIR", "NYSE")

When I tried to fix the values, I've got an error here:

File "zipline/data/bundles/csvdir.py", line 161, in csvdir_bundle      
    metadata['exchange'] = calendar_name                                                                                 

NameError: name 'calendar_name' is not defined

It looked weird but I didn't have time to follow up and debug it.

My current state is simply change the hardcoded values from 'NYSE' to 'BVMF' and it works.
Any suggestions on how to fix it for the long term?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions