1
- backtrader
1
+ Cytrader
2
2
==========
3
3
4
- .. image :: https://img.shields.io/pypi/v/backtrader.svg
5
- :alt: PyPi Version
6
- :scale: 100%
7
- :target: https://pypi.python.org/pypi/backtrader/
8
-
9
- .. .. image:: https://img.shields.io/pypi/dm/backtrader.svg
10
- :alt: PyPi Monthly Donwloads
11
- :scale: 100%
12
- :target: https://pypi.python.org/pypi/backtrader/
13
-
14
- .. image :: https://img.shields.io/pypi/l/backtrader.svg
4
+ .. image :: https://img.shields.io/pypi/l/cytrader.svg
15
5
:alt: License
16
6
:scale: 100%
17
- :target: https://github.com/backtrader/backtrader /blob/master/LICENSE
18
- .. image :: https://travis-ci.org/backtrader/backtrader .png?branch=master
7
+ :target: https://github.com/Saran33/cytrader /blob/master/LICENSE
8
+ .. image :: https://travis-ci.org/cytrader/cytrader .png?branch=master
19
9
:alt: Travis-ci Build Status
20
10
:scale: 100%
21
- :target: https://travis-ci.org/backtrader/backtrader
22
- .. image :: https://img.shields.io/pypi/pyversions/backtrader .svg
11
+ :target: https://travis-ci.org/cytrader/cytrader
12
+ .. image :: https://img.shields.io/pypi/pyversions/cytrader .svg
23
13
:alt: Python versions
24
14
:scale: 100%
25
- :target: https://pypi.python.org/pypi/backtrader/
15
+ :target: https://github.com/Saran33/cytrader
16
+
17
+ Cython Backtesting & Trading:
18
+ =========
19
+
20
+ Cytrader is a fork of the popular [cytrader](https://github.com/mementum/cytrader) platform, cythonized for speed.
26
21
27
22
**Yahoo API Note **:
28
23
@@ -41,18 +36,18 @@ different ways. Use the docs (and examples) Luke!
41
36
::
42
37
43
38
from datetime import datetime
44
- import backtrader as bt
39
+ import cytrader as ct
45
40
46
- class SmaCross(bt .SignalStrategy):
41
+ class SmaCross(ct .SignalStrategy):
47
42
def __init__(self):
48
- sma1, sma2 = bt .ind.SMA(period=10), bt .ind.SMA(period=30)
49
- crossover = bt .ind.CrossOver(sma1, sma2)
50
- self.signal_add(bt .SIGNAL_LONG, crossover)
43
+ sma1, sma2 = ct .ind.SMA(period=10), ct .ind.SMA(period=30)
44
+ crossover = ct .ind.CrossOver(sma1, sma2)
45
+ self.signal_add(ct .SIGNAL_LONG, crossover)
51
46
52
- cerebro = bt .Cerebro()
47
+ cerebro = ct .Cerebro()
53
48
cerebro.addstrategy(SmaCross)
54
49
55
- data0 = bt .feeds.YahooFinanceData(dataname='MSFT', fromdate=datetime(2011, 1, 1),
50
+ data0 = ct .feeds.YahooFinanceData(dataname='MSFT', fromdate=datetime(2011, 1, 1),
56
51
todate=datetime(2012, 12, 31))
57
52
cerebro.adddata(data0)
58
53
@@ -126,14 +121,14 @@ Python 2/3 Support
126
121
Installation
127
122
============
128
123
129
- ``backtrader `` is self-contained with no external dependencies (except if you
124
+ ``cytrader `` is self-contained with no external dependencies (except if you
130
125
want to plot)
131
126
132
127
From *pypi *:
133
128
134
- - ``pip install backtrader ``
129
+ - ``pip install cytrader ``
135
130
136
- - ``pip install backtrader [plotting] ``
131
+ - ``pip install cytrader [plotting] ``
137
132
138
133
If ``matplotlib `` is not installed and you wish to do some plotting
139
134
@@ -154,7 +149,7 @@ the dependencies in the documentation.
154
149
155
150
From source:
156
151
157
- - Place the *backtrader * directory found in the sources inside your project
152
+ - Place the *cytrader * directory found in the sources inside your project
158
153
159
154
Version numbering
160
155
=================
0 commit comments