live trading with zipline

565 views
Skip to first unread message

Robbin Lindon

unread,
Aug 27, 2016, 8:57:15 AM8/27/16
to Zipline Python Opensource Backtester
Hello, there,

According to this, live trading is supported by zipline.

Zipline is a Pythonic algorithmic trading library. It is an event-driven system that supports both backtesting and live-trading.

Zipline is currently used in production as the backtesting and live-trading engine poweringQuantopian – a free, community-centered, hosted platform for building and executing trading strategies.


But how to do live trading with zipline? I'm running a daily strategy. I run zipline every day once. How to make zipline to run incrementally, that it will load old positions and run with new coming data?

Message has been deleted

Kamil Szynkarczuk

unread,
Sep 14, 2016, 12:44:14 PM9/14/16
to Zipline Python Opensource Backtester
*bump*

Hi,

I'm also interested in this myself.

I'm wondering how best to run Zipline live. I'll need to run the algorithm fairly frequently (minutely or tick updates), but trade less frequently (~once per day):
  1. I plan to link Zipline to use historical and live data from a very large database. Do I need to create an instance of the "DataPortal" object, create functions to wrap my database and pass this object into the data variable of the "run_algorithm" function? Or is there a better way of continuously "ingesting" the data?
  2. Is there a way to have a push process run the handle_data function rather than keeping it on a timer?
  3. Is there a way to schedule functions to run at specific times? (for example at the beginning or end of the trading day)
  4. Is there functionality to keep track of P&L for products other than stocks, such as foreign exchange and incorporating the carry and financing cost?
  5. How is it best to modify the "order" and related functions, so that instead of simulating results, it sends live orders?
  6. How is it best to modify the "run_algorithm" function, so that it runs continually?

Thanks for the help!
Kamil 
Reply all
Reply to author
Forward
0 new messages