Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Zipline: Simulated Algorithmic trading in Python

Thomas Wiecki
January 25, 2013
1.5k

Zipline: Simulated Algorithmic trading in Python

Presented at the Boston Python Meetup 2013

Thomas Wiecki

January 25, 2013
Tweet

Transcript

  1. Algorithmic Trading: Backtesting Historical stock data • datetime • Price

    • Volume Trading Algorithm • Applies transforms (e.g. mavg) • Makes trading decision • Places orders Performance and Risk analysis
  2. Existing backtesting software • Proprietary solutions exist, but: – $$$

    – No transparency – Lack of community • Excel, Matlab, etc – Transaction costs – Availability of stock (do we find buyers/sellers?) – Market impact of own orders
  3. The scientific python ecosystem • Machine Learning (scikit-learn, PyBrain) •

    Statistics (scikit-statsmodels, PyMC) • Neuroscience (Brian, Spyke, PyMVPA) • Astronomy (astropython) • Computer Vision (scikit-image) • Quantitative Finance: Zipline!
  4. Introducing: Zipline • Trading simulator/backtester • Open-Source (Apache 2.0) •

    Event-driven • Batteries included – Moving average, Sharpe, alpha, beta... • Used in production on Quantopian.com – Contribute back to community – Linus' law: "given enough eyeballs, all bugs are shallow" • http://github.com/quantopian/zipline
  5. Conclusions • Zipline enables fast exploration of algorithmic trading strategies.

    • Quantopian offers a community, daily updated historical data, and computing on the cloud. For free. • To come: – Universe selection – Live trading