@@ -8,14 +8,13 @@ Zipline
8
8
|Coverage Status |
9
9
|Code quality |
10
10
11
- Zipline is a Pythonic algorithmic trading library. The system is
12
- fundamentally event-driven and a close approximation of how live-trading
13
- systems operate.
11
+ Zipline is a Pythonic algorithmic trading library. It is an event-driven
12
+ system that supports both backtesting and live-trading.
14
13
15
- Zipline is currently used in production as the backtesting engine
16
- powering `Quantopian Inc. <https://www.quantopian.com >`__ -- a free,
17
- community-centered platform that allows development and real-time
18
- backtesting of trading algorithms in the web browser .
14
+ Zipline is currently used in production as the backtesting and live-trading
15
+ engine powering `Quantopian <https://www.quantopian.com >`__ -- a free,
16
+ community-centered, hosted platform for building and executing trading
17
+ strategies .
19
18
20
19
`Join our
21
20
community! <https://groups.google.com/forum/#!forum/zipline> `__
@@ -29,74 +28,57 @@ below.
29
28
Features
30
29
========
31
30
32
- - Ease of use: Zipline tries to get out of your way so that you can
33
- focus on algorithm development. See below for a code example.
31
+ - Ease of use: Zipline tries to get out of your way so that you can
32
+ focus on algorithm development. See below for a code example.
33
+ - Zipline comes "batteries included" as many common statistics like
34
+ moving average and linear regression can be readily accessed from
35
+ within a user-written algorithm.
36
+ - Input of historical data and output of performance statistics are
37
+ based on Pandas DataFrames to integrate nicely into the existing
38
+ PyData eco-system.
39
+ - Statistic and machine learning libraries like matplotlib, scipy,
40
+ statsmodels, and sklearn support development, analysis, and
41
+ visualization of state-of-the-art trading systems.
34
42
35
- - Zipline comes "batteries included" as many common statistics like
36
- moving average and linear regression can be readily accessed from
37
- within a user-written algorithm.
43
+ Installation
44
+ ============
45
+
46
+ pip
47
+ ---
38
48
39
- - Input of historical data and output of performance statistics is
40
- based on Pandas DataFrames to integrate nicely into the existing
41
- Python eco-system.
49
+ You can install Zipline via the ``pip `` command:
50
+ ::
42
51
43
- - Statistic and machine learning libraries like matplotlib, scipy,
44
- statsmodels, and sklearn support development, analysis and
45
- visualization of state-of-the-art trading systems.
52
+ $ pip install zipline
46
53
47
- Installation
48
- ============
49
54
50
- The easiest way to install Zipline is via ``conda `` which comes as part
55
+ conda
56
+ -----
57
+
58
+ Another way to install Zipline is via ``conda `` which comes as part
51
59
of `Anaconda <http://continuum.io/downloads >`__ or can be installed via
52
60
``pip install conda ``.
53
61
54
- Once set up, you can install Zipline from our Quantopian channel:
62
+ Once set up, you can install Zipline from our `` Quantopian `` channel:
55
63
56
64
::
57
65
58
66
conda install -c Quantopian zipline
59
67
60
68
Currently supported platforms include:
61
69
62
- - Windows 32-bit (can be 64-bit Windows but has to be 32-bit Anaconda)
63
-
70
+ - GNU/Linux 64-bit
64
71
- OSX 64-bit
65
72
66
- - Linux 64-bit
67
-
68
- PIP
69
- ---
70
-
71
- Alternatively you can install Zipline via the more traditional ``pip ``
72
- command. Since zipline is pure-python code it should be very easy to
73
- install and set up:
73
+ .. note ::
74
74
75
- ::
76
-
77
- pip install numpy # Pre-install numpy to handle dependency chain quirk
78
- pip install zipline
79
-
80
- If there are problems installing the dependencies or zipline we
81
- recommend installing these packages via some other means. For Windows,
82
- the `Enthought Python
83
- Distribution <http://www.enthought.com/products/epd.php> `__ includes
84
- most of the necessary dependencies. On OSX, the `Scipy
85
- Superpack <http://fonnesbeck.github.com/ScipySuperpack/> `__ works very
86
- well.
75
+ Windows may work; however, it is currently untested.
87
76
88
77
Dependencies
89
78
------------
90
79
91
- - Python (2.7 or 3.3)
92
- - numpy (>= 1.6.0)
93
- - pandas (>= 0.9.0)
94
- - pytz
95
- - Logbook
96
- - requests
97
- - `python-dateutil <https://pypi.python.org/pypi/python-dateutil >`__
98
- (>= 2.1)
99
- - ta-lib
80
+ See our `requirements file
81
+ <https://github.com/quantopian/zipline/blob/master/etc/requirements.txt> `__
100
82
101
83
Quickstart
102
84
==========
@@ -108,15 +90,20 @@ The following code implements a simple dual moving average algorithm.
108
90
109
91
.. code :: python
110
92
111
- from zipline.api import order_target, record, symbol, history, add_history
93
+ from zipline.api import (
94
+ add_history,
95
+ history,
96
+ order_target,
97
+ record,
98
+ symbol,
99
+ )
112
100
113
101
114
102
def initialize (context ):
115
103
# Register 2 histories that track daily prices,
116
104
# one with a 100 window and one with a 300 day window
117
105
add_history(100 , ' 1d' , ' price' )
118
106
add_history(300 , ' 1d' , ' price' )
119
-
120
107
context.i = 0
121
108
122
109
0 commit comments