From 3fabada158d1b14de1ee12eed4754fcf03e67e22 Mon Sep 17 00:00:00 2001 From: victorzsl Date: Fri, 24 Feb 2017 22:42:01 +0800 Subject: [PATCH] Bug Fix ctaDemo->strategy.strategyEmaDemo --- vn.trader/ctaAlgo/ctaBacktesting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vn.trader/ctaAlgo/ctaBacktesting.py b/vn.trader/ctaAlgo/ctaBacktesting.py index e4a1adaa..9055be79 100644 --- a/vn.trader/ctaAlgo/ctaBacktesting.py +++ b/vn.trader/ctaAlgo/ctaBacktesting.py @@ -901,7 +901,7 @@ if __name__ == '__main__': # 以下内容是一段回测脚本的演示,用户可以根据自己的需求修改 # 建议使用ipython notebook或者spyder来做回测 # 同样可以在命令模式下进行回测(一行一行输入运行) - from ctaDemo import * + from strategy.strategyEmaDemo import * # 创建回测引擎 engine = BacktestingEngine() @@ -921,7 +921,7 @@ if __name__ == '__main__': engine.setSize(300) # 股指合约大小 # 在引擎中创建策略对象 - engine.initStrategy(DoubleEmaDemo, {}) + engine.initStrategy(EmaDemoStrategy, {}) # 开始跑回测 engine.runBacktesting()