Alpaca Zipline Integration

I am new to Alpaca but experienced in algo trading. I am interested to learn about your current and continued support for Zipline integration.

I see two Alpaca GitHub projects related to Zipline

It looks like the first is under continued development and the second is not. I am interested in using Alpaca to both backtest and live trade a Zipline-flavored strategy. Can you provide guidance and best practices given your two packages for how to operate a research-to-production workflow:

  1. backtest a Zipline-flavored strategy locally versus a local data bundle
  2. transition to live-trading the same strategy without changing any of the strategy code (i.e., just flipping command line flags)

In order for that to work properly, the historical data in both cases must be the same. Meaning a data.history() call for multiple days of history should draw on the same source for historical data, but append the live price in the case of live trading. Is the alpaca-bundle still supported and would that serve as a proper historical data source in both cases? In the case of the backtest, the daily state is carried over from T-1 whereas in live trading it comes from the start-of-day update.

Thank you, and fantastic work to-date on Alpaca!

I am interested in the same topics as @marketneutral. Maybe I can make my question more specific. I would like to backtest a strategy with Zipline, is there a way to get the historical data of the universe that I could trade in Alpaca? If it is available as a .csv, that would be fine I could write a loader to create a Zipline bundle, and I’d be happy to share that here.

I am interested in daily data, so what I am really looking for is:
-daily data for every ticker you can access in Alpaca for the last 5 years.

Is that possible to get?

The alpaca-zipline project can do what both live and historical Zipline trading. Although it has not been updated in over a year, I have no reason to believe it doesn’t work. The bundle data still works.

1 Like

Correct, alpaca-zipline was initially developed to extend zipline-live with bundle, but we found it is too much for our initial target, which made us build pylivetrader.

Is the zipline bundle stored on S3 still updated every day?

No, unfortunately. We are not actively developing alpaca-zipline for now.