PyAlgoTrade++是PyAlgoTrade的升级版,其在兼容原版的接口的基础上,为了适应中国股票市场的规则,增加了一些参数,具体如下:
- 交易规则相关
- 涨跌停的限制
- T+1或者T+0的可配置
- 特殊平开仓条件,提供简便的接口,避免代码多次重复编写
- 最多持仓时间参数,到期日强制平仓
- 平仓上下限,price =[low high],股价突破区间边界,强制平仓
- 指标集
- 量能
- 形态
- 强势涨停
- 交易规则
- 持有标的后可做日内假T+0的回测支持;
- 指标集
- 均线系统
PyAlgoTrade is an event driven algorithmic trading Python library. Although the initial focus was on backtesting, paper trading is now possible using:
and live trading is now possible using:
- Bitstamp for Bitcoins
To get started with PyAlgoTrade take a look at the tutorial and the full documentation.
- Event driven.
- Supports Market, Limit, Stop and StopLimit orders.
- Supports any type of time-series data in CSV format like Yahoo! Finance, Google Finance, Quandl and NinjaTrader.
- Xignite realtime feed.
- Bitcoin trading support through Bitstamp.
- Technical indicators and filters like SMA, WMA, EMA, RSI, Bollinger Bands, Hurst exponent and others.
- Performance metrics like Sharpe ratio and drawdown analysis.
- Handling Twitter events in realtime.
- Event profiler.
- TA-Lib integration.
PyAlgoTrade is developed using Python 2.7 and depends on:
- NumPy and SciPy.
- pytz.
- dateutil.
- requests.
- matplotlib for plotting support.
- ws4py for Bitstamp support.
- tornado for Bitstamp support.
- tweepy for Twitter support.
You can install PyAlgoTrade using pip like this:
pip install pyalgotrade