machine-learning-for-trading icon indicating copy to clipboard operation
machine-learning-for-trading copied to clipboard

Unable to use multiple Custom Bundles without new ingest

Open cyrbaufr opened this issue 4 years ago • 0 comments

I noticed that it is hard to use several custom bundles with Zipline. I spent a lot of time to replicate the issue so I hope it helps.

How to reproduce:

  • Create a new custom bundle like "zipline ingest -b stooq" (success)
  • Type "zipline bundles" to see the list of available bundles. We see 'stooq xxxxx xx:xx:xx.xxxxx'
  • Create another custom bundle like this "zipline ingest -b stooq_new" (success)
  • Type "zipline bundles" again.
  • Now we see 'stooq_new xxxxx xx:xx:xx.xxxxx' but not 'stooq xxxxx xx:xx:xx.xxxxx'

Main problem:

  • When using backtesting on different custom bundles, it means we must ingest again the bundle to use the bundle.
  • For exemple, let's use any backesting in Jupyter Notebook starting with line: %%zipline --start 2017-1-2 --end 2017-12-29 --capital-base 250 --bundle stooq -o buy_and_hold.pkl --trading-calendar XTKS
  • If last ingested bundle is 'stooq_new', then the backtest above will return an error: " UnknownBundle: No bundle registered with the name 'stooq' ". We need to ingest again stooq than it works.
  • If last ingested bundle is 'stooq' then there is no issue.

Expected behavior

  • Would be great to use multiple Custom Bundles but I guess it is difficult to do.

Environment

  • Using zipline-reloaded 2.0.0.post1 py38he6999da_0 ml4t
  • Windows 10

cyrbaufr avatar Jul 08 '21 21:07 cyrbaufr