Skip to content

How to Ingesting Data from .csv Files #332

@OodiOodiOodi

Description

@OodiOodiOodi

My csv file data meets the requirements of the help document
date,open,high,low,close,volume,dividend,split
This is my extension.py code
import pandas as pd
from zipline.data.bundles import register
from zipline.data.bundles.csvdir import csvdir_equities

Define data time range

start_session = pd.Timestamp('2020-1-1', tz='UTC')
end_session = pd.Timestamp('2025-1-1', tz='UTC')

Register Bundle

register(
'my-csv-bundle',
csvdir_equities(
['daily'], # Data frequency (must be consistent with the subfolder name)
'C:/Users/86137/.zipline/data/mycsvs/daily',
),
calendar_name='SSE', # Exchange Calendar
start_session=start_session,
end_session=end_session
)
My program runs normally, but I don't have the corresponding bundle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions