增加回测用的jupyter notebook,修改strategy下的策略载入使用绝对路径

This commit is contained in:
chenxy123 2017-05-09 06:35:00 +08:00
parent 38caf8bf62
commit 415573642b
3 changed files with 357 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -20,7 +20,7 @@ for root, subdirs, files in os.walk(path):
# 只有文件名中包含strategy且非.pyc的文件才是策略文件
if 'strategy' in name and '.pyc' not in name:
# 模块名称需要上前缀
moduleName = 'ctaStrategy.strategy.' + name.replace('.py', '')
moduleName = 'vnpy.trader.ctaStrategy.strategy.' + name.replace('.py', '')
# 使用importlib动态载入模块
try:

File diff suppressed because one or more lines are too long