Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Algorithmic Trading in Python
Thomas
Wiecki
@twiecki
About me
About me
Rise of the machines
84% of all stock trades are done by computers

vs

Rationality
Speed
Capacity
Intuition
Understanding...
Pythonic Algorithmic Trading
Pipeline

Data Analysis
Generate ideas

●
●

●

Tools:
Pandas
Matplotlib
● (Seaborn)
IPython
...
Algorithmic Trading:
Backtesting

Historical stock
data
● datetime
● Price
● Volume

●
●
●

Trading Algorithm
Applies tran...
Zipline
●

Trading simulator/backtester written in Python

●

Open-Source (Apache 2.0)

●

Stream-based (prevents look-ahe...
Interoperability
Architecture
Go to: http://nbviewer.ipython.org/4631031/
Conclusions
●

●

Zipline gives you full control over you
backtest.
Copy & paste your Zipline algorithm to
Quantopian:
–

...
Come hack Wall Street.
Questions?
@twiecki
@quantopian
Upcoming SlideShare
Loading in …5
×

Nyc algo meetup_jan_16_14

1,059 views

Published on

Published in: Economy & Finance, Business
  • Be the first to comment

Nyc algo meetup_jan_16_14

  1. 1. Algorithmic Trading in Python Thomas Wiecki @twiecki
  2. 2. About me
  3. 3. About me
  4. 4. Rise of the machines 84% of all stock trades are done by computers vs Rationality Speed Capacity Intuition Understanding Speech - Cognitively biased / emotional - Human - Limited + 50 years of experience + Knows how the market works + Native speaker + Purely analytical + 1 TFLOP + Big Data - None - Depends on programming - “I'll be back”
  5. 5. Pythonic Algorithmic Trading Pipeline Data Analysis Generate ideas ● ● ● Tools: Pandas Matplotlib ● (Seaborn) IPython Backtesting Test on historical data whether idea can be exploited. ● ● Tools: Zipline ● Quantopian PyAlgoTrader optimize Forward testing Paper-trade on real-time market data. ● Tools: Quantopian Live trading Trade with real money. ● Tools: Quantopian (soon)
  6. 6. Algorithmic Trading: Backtesting Historical stock data ● datetime ● Price ● Volume ● ● ● Trading Algorithm Applies transforms (e.g. mavg) Makes trading decision Places orders ● Transaction costs ● Slippage ● Order delay Performance and Risk analysis
  7. 7. Zipline ● Trading simulator/backtester written in Python ● Open-Source (Apache 2.0) ● Stream-based (prevents look-ahead bias) ● 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://zipline.io
  8. 8. Interoperability
  9. 9. Architecture
  10. 10. Go to: http://nbviewer.ipython.org/4631031/
  11. 11. Conclusions ● ● Zipline gives you full control over you backtest. Copy & paste your Zipline algorithm to Quantopian: – Share it, get feedback. – Test it on minute data. – Forward test it. – Go live (soon!)
  12. 12. Come hack Wall Street. Questions? @twiecki @quantopian

×