博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
win10安装rqalpha开源回测框架
阅读量:4294 次
发布时间:2019-05-27

本文共 1951 字,大约阅读时间需要 6 分钟。

之前在win10开发策略时的安装笔记,有需要的可以参考下。

个人建议还是在linux或mac下开发比较好,开源软件大多对win不够友好,使用linux可以避免很多坑。

参考文档
rqalpha地址:https://rqalpha.readthedocs.io/zh_CN/latest/intro/detail_install.html#intro-detail-install
1,使用win10已安装的Anaconda2-5.3.0-Windows-x86_64.exe,参考官方文档继续安装
pip install -U pip
pip install -U setuptools

2,安装bcolz

pip install bcolz==1.2.0 -i https://pypi.douban.com/simple
报错,想到ada安装在c盘,容易由权限引发问题,卸载安装到D盘

3,换装Anaconda3-4.2.0-Windows-x86_64.exe到D盘

问题1,闪退
解决:https://blog.csdn.net/ws_developer/article/details/80953401
    第2步,CONNECTION FAILED 
    解决:https://www.aliyun.com/jiaocheng/459144.html

4,继续第二步的

pip install -U pip
    报错:Cannot open D:\Program Files\Anaconda3\Scripts\pip-script.py
    解决:easy_install pip
pip install -U setuptools
pip install bcolz==1.2.0 -i https://pypi.douban.com/simple
    报错: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
    解决:下载vs,安装2017版本
pip install -i https://pypi.douban.com/simple rqalpha
    问题:Cannot uninstall 'XlsxWriter'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
    解决:pip install --ignore-installed bcolz==1.2.0 -i https://pypi.douban.com/simple
    看起来好了,没报错,但是rqalpha version,依然报错无法找到命令
    解决:conda install bcolz -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
    看起来好,rqalpha version,还是无法找到命令
    突然看到另一偏帖子:https://www.cnblogs.com/luhouxiang/p/8443857.html(好帖子)
        "安装bcolz,安装这个组件不能用pip执行,会失败,只能用easy_install。easy_install -U bcolz"
       尝试了下
    然后pip install -i https://pypi.douban.com/simple rqalpha --ignore-installed
    看起来好了,rqalpha version也正常了

5,pip install TA-Lib

参考:https://www.cnblogs.com/ttrrpp/p/6877218.html
下载whl最简单方式

6,rqalpha update-bundle

数据下载成功: C:\Users\john\.rqalpha\bundle

7,运行范例

rqalpha run -f "d:\Program Files\Anaconda3\Lib\site-packages\rqalpha\examples/buy_and_hold.py"  -s 2017-01-01 -e 2017-06-30 --account stock 100000 --plot

你可能感兴趣的文章
VNPY- VnTrader基本使用
查看>>
VNPY - CTA策略模块策略开发
查看>>
VNPY - 事件引擎
查看>>
MongoDB基本语法和操作入门
查看>>
学习笔记_vnpy实战培训day04_作业
查看>>
OCO订单(委托)
查看>>
学习笔记_vnpy实战培训day05
查看>>
学习笔记_vnpy实战培训day06
查看>>
聚合搜索引擎
查看>>
Python super钻石继承
查看>>
回测引擎代码分析流程图
查看>>
Excel 如何制作时间轴
查看>>
股票网格交易策略
查看>>
matplotlib绘图跳过时间段的处理方案
查看>>
vnpy学习_04回测评价指标的缺陷
查看>>
ubuntu终端一次多条命令方法和区别
查看>>
python之偏函数
查看>>
vnpy学习_06回测结果可视化改进
查看>>
读书笔记_量化交易如何建立自己的算法交易01
查看>>
设计模式03_工厂
查看>>