All Projects → zhanghan1990 → Zipline Chinese

zhanghan1990 / Zipline Chinese

Licence: apache-2.0
zipline 是开源量化平台,但是当前zipline 并不支持A股的测试,很多在线平台如优矿,聚宽等都是基于zipline,本项目改进zipline,使得zipline支持A股测试

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Zipline Chinese

Fooltrader
quant framework for stock
Stars: ✭ 960 (+86.41%)
Mutual labels:  stock-market, quant
Financial Machine Learning
A curated list of practical financial machine learning tools and applications.
Stars: ✭ 2,172 (+321.75%)
Mutual labels:  stock-market, quant
Finance Python
python tools for Finance with the functionality of indicator calculation, business day calculation and so on.
Stars: ✭ 238 (-53.79%)
Mutual labels:  chinese, stock-market
Awesome Ai In Finance
🔬 A curated list of awesome machine learning strategies & tools in financial market.
Stars: ✭ 910 (+76.7%)
Mutual labels:  stock-market, quant
Quantdom
Python-based framework for backtesting trading strategies & analyzing financial markets [GUI ]
Stars: ✭ 449 (-12.82%)
Mutual labels:  stock-market, quant
Zvt
modular quant framework.
Stars: ✭ 1,801 (+249.71%)
Mutual labels:  stock-market, quant
Beibo
🤖 Predict the stock market with AI 用AI预测股票市场
Stars: ✭ 46 (-91.07%)
Mutual labels:  stock-market, quant
Trady
Trady is a handy library for computing technical indicators, and it targets to be an automated trading system that provides stock data feeding, indicator computing, strategy building and automatic trading. It is built based on .NET Standard 2.0.
Stars: ✭ 433 (-15.92%)
Mutual labels:  quant
Chinesenre
中文实体关系抽取,pytorch,bilstm+attention
Stars: ✭ 463 (-10.1%)
Mutual labels:  chinese
rasa chatbot
A Chinese task oriented chatbot in IVR(Interactive Voice Response) domain, implement by rasa. This is a demo with toy dataset, more data should be added for performance.
Stars: ✭ 428 (-16.89%)
Mutual labels:  chinese
Deep Learning Resources
由淺入深的深度學習資源 Collection of deep learning materials for everyone
Stars: ✭ 422 (-18.06%)
Mutual labels:  chinese
Rqalpha
A extendable, replaceable Python algorithmic backtest && trading framework supporting multiple securities
Stars: ✭ 4,425 (+759.22%)
Mutual labels:  quant
Security 101 For Saas Startups
security tips for startups
Stars: ✭ 4,385 (+751.46%)
Mutual labels:  chinese
Chinese Calendar
📅 中国农历(阴历)与阳历(公历)转换与查询工具
Stars: ✭ 428 (-16.89%)
Mutual labels:  chinese
Microservices
Microservices from Design to Deployment 中文版 《微服务:从设计到部署》
Stars: ✭ 4,637 (+800.39%)
Mutual labels:  chinese
Deepstock
Technical experimentations to beat the stock market using deep learning 📈
Stars: ✭ 422 (-18.06%)
Mutual labels:  stock-market
Ystockquote
Fetch stock quote data from Yahoo Finance
Stars: ✭ 502 (-2.52%)
Mutual labels:  stock-market
Most Frequent Technology English Words
程序员工作中常见的英语词汇
Stars: ✭ 4,711 (+814.76%)
Mutual labels:  chinese
Manim Tutorial Cn
manim中文入门教程
Stars: ✭ 448 (-13.01%)
Mutual labels:  chinese
Pylivetrader
Python live trade execution library with zipline interface.
Stars: ✭ 470 (-8.74%)
Mutual labels:  quant

Zipline-一个正在成长的项目

Zipline:当前在线的量化平台基本都是基于zipline进行开发,使用这些平台,首先,自己的 策略会泄密,其次,这些平台速度慢,而且不够灵活。 然而,A股并不能直接使用zipline,需要对数据,基准,交易日期,手续费等部分做修改。 本项目修改zipline平台,以使得其能适用于A股市场。

项目文档:

https://github.com/zhanghan1990/zipline/wiki

安装方法

运行环境:linux, OSX,建议不要使用windows,因为zipline涉及到gcc的编译,windows可能编译过程中有一些问题。

(1)windows 用户可以下载virtual box,在这个镜像中,集成了数据,和开发环境,以及ipython notebook,virtual box 虚拟机地址: https://pan.baidu.com/s/1bp5roxL

虚拟机密码为:zipline

具体使用方法:打开virtual box ,输入以下命令

  • service mongodb start

  • source zipline/zip_env/bin/activate

  • sudo jupyter notebook

  • ifconfig

得到虚拟机的IP 地址,例如IP为:192.168.1.120,则在windows浏览器输入 192.168.1.120:8888

(2)对于本地安装,以ubuntu 为例:

  • git clone https://github.com/zhanghan1990/zipline
  • cd zipline
  • sudo apt-get install python-pip
  • sudo apt-get install mongodb
  • sudo pip install virtualenv
  • sudo apt-get install python-tk
  • virtualenv zipline_env
  • source zipline_env/bin/activate
  • pip install -r requirements.txt
  • python setup.py install
  • sudo service mongodb start
  • pip install xlrd
  • pip3 install jupyter

version_1.0 完成的主要工作

  • 交易日历纠正,从1990年开始的所有有效交易日都包含其中,剔除非交易时段
  • A股数据源,把数据写入mongodb中,每次从mongodb中读取需要的数据
  • benchmark,使用A股的几个标准(HS300指数等)
  • return 计算,计算alpha和beta当前使用中国国债作为基准
  • 手续费模型设定

关于数据

  • 您可以使用自己的数据,也可以使用我配置的数据源,数据源我已经配置好,如果自己配置,需要修改文件 data/constants.py 下的IP和PORT
  • 我的机器的IP为166.111.68.233 PORT为27017
  • 本版本的数据源,只更新到2017.02.28,后面我会每天更新数据

本地数据导入

关于例子

-在examples下面有3个例子,这3个例子可以满足基本的回测需求,这三个例子我和joinquant做了比对,差距很小(ps,完全一样还是很难,手续费那里有问题,我会继续修改)

联系方式

欢迎感兴趣的朋友加入到这个项目来,有问题请给我发邮件: [email protected]

加入我们

欢迎有兴趣的朋友伙伴加入我们的开源讨论群:

QQ群:556125593

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].