yutiansut / QUANTAXIS

QUANTAXIS 支持任务调度 分布式部署的 股票/期货/期权 数据/回测/模拟/交易/可视化/多账户 纯本地量化解决方案
https://yutiansut.github.io/QUANTAXIS/
MIT License
8.11k stars 2.95k forks source link

windowns 10 非docker安装 #1444

Open chenz855 opened 4 years ago

chenz855 commented 4 years ago

安装QA基础服务

1 mongod安装 运行mongodb-win32-x86_64-2008plus-ssl-v3.4-latest-signed.msi
进入安装目录 (建库).\mongod.exe --dbpath E:\data\mongo\data --logpath E:\data\mongo\log\mongo.log --httpinterface --rest --serviceName 'MongoDB' --install .\mongod.exe --remove --serviceName 'MongoDB' 服务启动 net start MongoDB

2 Python安装 Anaconda3-2018.12-Windows-x86_64.exe
sudo pip install --default-timeout=100 future pip install pip-19.3.1-py2.py3-none-any.whl 升级pandas到0.24.0 ,相当重要! pip install pandas==0.24.0 -U pip install matplotlib -U 3.7

3 安装quantaxis 环境 python -m pip install -r requirements.txt -i https://pypi.doubanio.com/simple python -m pip install tushare -i https://pypi.doubanio.com/simple python -m pip install pytdx -i https://pypi.doubanio.com/simple python -m pip install Tabulate -i https://pypi.doubanio.com/simple python -m pip install flask_socketio -i https://pypi.doubanio.com/simple python -m pip install Delegator -i https://pypi.doubanio.com/simple python -m pip install pypandoc -i https://pypi.doubanio.com/simple python -m pip install delegator.py -i https://pypi.doubanio.com/simple 3.7 python -m pip install TA_Lib-0.4.17-cp37-cp37m-win_amd64.whl

4 Jupyter notebook
e:>Jupyter notebook 在安装源码目录下启动 需要改notebook启动配置 C:\Users\Administrator.jupyter\jupyter_notebook_config.py

c.NotebookApp.allow_credentials = True c.NotebookApp.allow_origin = '*' c.NotebookApp.allow_origin_pat = '' c.NotebookApp.allow_remote_access = True c.NotebookApp.tornado_settings = { 'headers': { 'Content-Security-Policy': "" }} c.NotebookApp.notebook_dir = 'E:\src'

6 安装quantaxis
git clone https://github.com/yutiansut/quantaxis --depth 1
python -m pip install -e .

7 安装quantaxis_webserver https://github.com/quantaxis/quantaxis_webserver
pip install https://github.com/yutiansut/tornado_http2/archive/master.zip -i https://pypi.doubanio.com/simple
pip install tornado==5.1.1 -i https://pypi.doubanio.com/simple
pip install quantaxis_webserver -i https://pypi.doubanio.com/simple

命令行>quantaxis_webserver 文档:https://github.com/QUANTAXIS/QUANTAXIS_WEBSERVER/blob/master/backendapi.md

8 web客户端安装 下载https://github.com/yutiansut/QADESK_BASIC 本地运行index用Google浏览器

9 数据准备 命令行>quantaxis 命令行>> save 保存股票\指数的代码和日线数据以及财务等必要数据到数据库

10 运行服务使用web客户端 命令行>quantaxis_webserver 命令行>jupyter notebook

网页点击 E:\src\quantaxis\QADESK_BASIC-master\index.heml

9 开始股票回测

https://github.com/QUANTAXIS/QUANTAXIS/tree/master/EXAMPLE 有大量回测demo 运行完,在web客户端可以看到回测结果

yutiansut commented 4 years ago

wow 非常详细 点个赞呐

szsa commented 4 years ago

赞!