Hello, I am using yfinance
to download data and store into CSV files. I am also using zipline_bundles to put data into zipline-reloaded
.
I have set the environmental variable, %env YAHOO_CSVDIR=C:\trading-evolved\csv
. I then run command !zipline ingest -b yahoo_csv
. It gives the following:
Merging daily equity files:
Loading csv files:
[2022-09-11 21:39:37.975000] INFO: zipline.data.bundles.core: Ingesting yahoo_csv.
[2022-09-11 21:39:37.975000] INFO: zipline.data.bundles.ingester: symbols are: ['DBC', 'GLD', 'IEF', 'SPY', 'TLT']
[2022-09-11 21:39:37.976000] INFO: zipline.data.bundles.ingester: writing data...
[2022-09-11 21:39:37.978000] INFO: zipline.data.bundles.ingester: csv directory is set to 'C:\trading-evolved\csv'
[2022-09-11 21:39:38.135000] INFO: zipline.data.bundles.ingester: meta data:
start_date end_date auto_close_date symbol exchange
0 2007-01-03 2018-12-28 2018-12-29 DBC YAHOO
1 2007-01-03 2018-12-28 2018-12-29 GLD YAHOO
2 2007-01-03 2018-12-28 2018-12-29 IEF YAHOO
3 2007-01-03 2018-12-28 2018-12-29 SPY YAHOO
4 2007-01-03 2018-12-28 2018-12-29 TLT YAHOO
[2022-09-11 21:39:38.356000] INFO: zipline.data.bundles.ingester: writing completed
If I run command !zipline bundles
I get the following:
binance_daily <no ingestions>
binance_min <no ingestions>
csvdir <no ingestions>
iex <no ingestions>
quandl 2022-09-11 21:40:45.036000
quandl 2022-09-10 06:56:12.852400
quandl 2022-09-10 06:52:25.536400
quandl 2022-09-10 06:51:32.997400
quandl 2022-09-10 06:50:33.038400
quantopian-quandl <no ingestions>
yahoo_csv 2022-09-11 21:39:37.490000
yahoo_csv 2022-09-11 21:31:07.251000
yahoo_csv 2022-09-11 21:30:59.062000
yahoo_csv 2022-09-11 21:28:06.887000
yahoo_csv 2022-09-11 21:27:22.824000
yahoo_direct <no ingestions>
My code to run backtest is the following:
result = run_algorithm(
start = start_date,
end = end_date,
initialize = initialize,
analyze = analyze,
capital_base = 10000,
data_frequency = 'daily',
bundle = 'yahoo_csv'
)
But when the code runs, it will say UnknownBundle: No bundle registered with the name 'yahoo_csv'
.
Do you have any idea to troubleshoot? Thank you.