VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 38
声望: 0

用jupyter notebook 做策略回测时,vn.py自带的策略用如下代码句导入:
from vnpy.app.cta_strategy.strategies.atr_rsi_strategy import (RBreakQgpStrategy);
那么,存放在"C:\Users\Administrator\strategies"目录下的自编策略如何导入?

Administrator
avatar
加入于:
帖子: 4500
声望: 320

把策略文件放到你启动jupyter的目录,然后运行from test_strategy import TestStrategy即可

Member
avatar
加入于:
帖子: 38
声望: 0

用Python的交易员 wrote:

把策略文件放到你启动jupyter的目录,然后运行from test_strategy import TestStrategy即可
谢谢老师

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】