• 周四. 8月 11th, 2022

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

策略日志

admin

11月 28, 2021
C:Python38python.exe F:/GZH/easyquant/test.py
easyquant 测试 DEMO
请输入你使用的券商:
1: 华泰 2: 佣金宝 3: 银河 4: 雪球模拟组合 5: 广发
:1
请输入你的帐号配置文件路径(直接回车使用 ht.json)
:F:/htzqzyb2/xiadan.exe
请输入使用行情引擎 1: sina 2: leverfun 十档 行情(目前只选择了 162411, 000002)
:1
请输入行情推送间隔(s)
:50
请输入 log 记录方式: 1: 显示在屏幕 2: 记录到指定文件
: 1
[2021-07-10 13:55:23.324143] WARNING: 测试: 券商账号信息文件 F:/htzqzyb2/xiadan.exe 不存在, easytrader 将不可用
[2021-07-10 13:55:23.499301] INFO: 测试: 启动主引擎
[2021-07-10 13:55:23.502299] INFO: 测试: 加载策略: 策略1_Demo
[2021-07-10 13:55:23.504288] INFO: 测试: 加载策略: 策略2_Demo
[2021-07-10 13:55:23.504288] WARNING: 测试: 启用了动态加载策略功能
demo1 的 log 使用自定义 log 的方式记录在 demo1.log
[2021-07-10 13:55:24.506286] INFO: 测试策略1: 

策略1触发
[2021-07-10 13:55:24.506286] INFO: 测试策略1: 行情数据: 万科价格: {'name': 'A股指数', 'open': 3681.2108, 'close': 3695.1409, 'now': 3693.639, 'high': 3699.1278, 'low': 3652.7015, 'buy': 0.0, 'sell': 0.0, 'turnover': 349623710, 'volume': 492807104295.0, 'bid1_volume': 0, 'bid1': 0.0, 'bid2_volume': 0, 'bid2': 0.0, 'bid3_volume': 0, 'bid3': 0.0, 'bid4_volume': 0, 'bid4': 0.0, 'bid5_volume': 0, 'bid5': 0.0, 'ask1_volume': 0, 'ask1': 0.0, 'ask2_volume': 0, 'ask2': 0.0, 'ask3_volume': 0, 'ask3': 0.0, 'ask4_volume': 0, 'ask4': 0.0, 'ask5_volume': 0, 'ask5': 0.0, 'date': '2021-07-09', 'time': '15:02:22'}
[2021-07-10 13:55:24.506286] INFO: 测试策略1: 检查持仓
[2021-07-10 13:55:24.508286] ERROR: 测试策略1: ['Traceback (most recent call last):
', '  File "F:\GZH\easyquant\easyquant\strategy\strategyTemplate.py", line 58, in run
    self.strategy(event)
', '  File "F:\GZH\easyquant\strategies\策略1_Demo.py", line 66, in strategy
    self.log.info(self.user.balance)
', "AttributeError: 'NoneType' object has no attribute 'balance'
"]
[2021-07-10 13:55:24.508286] INFO: 测试: 

策略2触发
[2021-07-10 13:55:24.508286] INFO: 测试: 行情数据: 华宝油气 {'name': '华宝油气', 'open': 0.444, 'close': 0.44, 'now': 0.447, 'high': 0.447, 'low': 0.442, 'buy': 0.446, 'sell': 0.447, 'turnover': 83294223, 'volume': 37012931.481, 'bid1_volume': 1641404, 'bid1': 0.446, 'bid2_volume': 1069700, 'bid2': 0.445, 'bid3_volume': 528400, 'bid3': 0.444, 'bid4_volume': 860000, 'bid4': 0.443, 'bid5_volume': 1313500, 'bid5': 0.442, 'ask1_volume': 1545453, 'ask1': 0.447, 'ask2_volume': 2270200, 'ask2': 0.448, 'ask3_volume': 1546400, 'ask3': 0.449, 'ask4_volume': 910200, 'ask4': 0.45, 'ask5_volume': 30800, 'ask5': 0.451, 'date': '2021-07-09', 'time': '15:00:03'}
[2021-07-10 13:55:24.508286] INFO: 测试: 检查持仓
[2021-07-10 13:55:24.510285] ERROR: 测试: ['Traceback (most recent call last):
', '  File "F:\GZH\easyquant\easyquant\strategy\strategyTemplate.py", line 58, in run
    self.strategy(event)
', '  File "F:\GZH\easyquant\strategies\策略2_Demo.py", line 11, in strategy
    self.log.info(self.user.balance)
', "AttributeError: 'NoneType' object has no attribute 'balance'
"]
demo1 的 log 使用自定义 log 的方式记录在 demo1.log
[2021-07-10 13:56:16.725849] INFO: 测试策略1: 

策略1触发
[2021-07-10 13:56:16.726849] INFO: 测试策略1: 行情数据: 万科价格: {'name': 'A股指数', 'open': 3681.2108, 'close': 3695.1409, 'now': 3693.639, 'high': 3699.1278, 'low': 3652.7015, 'buy': 0.0, 'sell': 0.0, 'turnover': 349623710, 'volume': 492807104295.0, 'bid1_volume': 0, 'bid1': 0.0, 'bid2_volume': 0, 'bid2': 0.0, 'bid3_volume': 0, 'bid3': 0.0, 'bid4_volume': 0, 'bid4': 0.0, 'bid5_volume': 0, 'bid5': 0.0, 'ask1_volume': 0, 'ask1': 0.0, 'ask2_volume': 0, 'ask2': 0.0, 'ask3_volume': 0, 'ask3': 0.0, 'ask4_volume': 0, 'ask4': 0.0, 'ask5_volume': 0, 'ask5': 0.0, 'date': '2021-07-09', 'time': '15:02:22'}
[2021-07-10 13:56:16.726849] INFO: 测试策略1: 检查持仓
[2021-07-10 13:56:16.727852] ERROR: 测试策略1: ['Traceback (most recent call last):
', '  File "F:\GZH\easyquant\easyquant\strategy\strategyTemplate.py", line 58, in run
    self.strategy(event)
', '  File "F:\GZH\easyquant\strategies\策略1_Demo.py", line 66, in strategy
    self.log.info(self.user.balance)
', "AttributeError: 'NoneType' object has no attribute 'balance'
"]
[2021-07-10 13:56:16.727852] INFO: 测试: 

策略2触发
[2021-07-10 13:56:16.727852] INFO: 测试: 行情数据: 华宝油气 {'name': '华宝油气', 'open': 0.444, 'close': 0.44, 'now': 0.447, 'high': 0.447, 'low': 0.442, 'buy': 0.446, 'sell': 0.447, 'turnover': 83294223, 'volume': 37012931.481, 'bid1_volume': 1641404, 'bid1': 0.446, 'bid2_volume': 1069700, 'bid2': 0.445, 'bid3_volume': 528400, 'bid3': 0.444, 'bid4_volume': 860000, 'bid4': 0.443, 'bid5_volume': 1313500, 'bid5': 0.442, 'ask1_volume': 1545453, 'ask1': 0.447, 'ask2_volume': 2270200, 'ask2': 0.448, 'ask3_volume': 1546400, 'ask3': 0.449, 'ask4_volume': 910200, 'ask4': 0.45, 'ask5_volume': 30800, 'ask5': 0.451, 'date': '2021-07-09', 'time': '15:00:03'}
[2021-07-10 13:56:16.727852] INFO: 测试: 检查持仓
[2021-07-10 13:56:16.728851] ERROR: 测试: ['Traceback (most recent call last):
', '  File "F:\GZH\easyquant\easyquant\strategy\strategyTemplate.py", line 58, in run
    self.strategy(event)
', '  File "F:\GZH\easyquant\strategies\策略2_Demo.py", line 11, in strategy
    self.log.info(self.user.balance)
', "AttributeError: 'NoneType' object has no attribute 'balance'
"]

  输入同一盘符路径报错,

请输入你的帐号配置文件路径(直接回车使用 ht.json)
:F:/htzqzyb2/xiadan.exe

C:Python38python.exe F:/GZH/easyquant/test.pyeasyquant 测试 DEMO请输入你使用的券商:1: 华泰 2: 佣金宝 3: 银河 4: 雪球模拟组合 5: 广发:1请输入你的帐号配置文件路径(直接回车使用 ht.json):F:/htzqzyb2/xiadan.exe请输入使用行情引擎 1: sina 2: leverfun 十档 行情(目前只选择了 162411, 000002):1请输入行情推送间隔(s):50请输入 log 记录方式: 1: 显示在屏幕 2: 记录到指定文件: 1[2021-07-10 13:55:23.324143] WARNING: 测试: 券商账号信息文件 F:/htzqzyb2/xiadan.exe 不存在, easytrader 将不可用[2021-07-10 13:55:23.499301] INFO: 测试: 启动主引擎[2021-07-10 13:55:23.502299] INFO: 测试: 加载策略: 策略1_Demo[2021-07-10 13:55:23.504288] INFO: 测试: 加载策略: 策略2_Demo[2021-07-10 13:55:23.504288] WARNING: 测试: 启用了动态加载策略功能demo1 的 log 使用自定义 log 的方式记录在 demo1.log[2021-07-10 13:55:24.506286] INFO: 测试策略1: 
策略1触发[2021-07-10 13:55:24.506286] INFO: 测试策略1: 行情数据: 万科价格: {‘name’: ‘A股指数’, ‘open’: 3681.2108, ‘close’: 3695.1409, ‘now’: 3693.639, ‘high’: 3699.1278, ‘low’: 3652.7015, ‘buy’: 0.0, ‘sell’: 0.0, ‘turnover’: 349623710, ‘volume’: 492807104295.0, ‘bid1_volume’: 0, ‘bid1’: 0.0, ‘bid2_volume’: 0, ‘bid2’: 0.0, ‘bid3_volume’: 0, ‘bid3’: 0.0, ‘bid4_volume’: 0, ‘bid4’: 0.0, ‘bid5_volume’: 0, ‘bid5’: 0.0, ‘ask1_volume’: 0, ‘ask1’: 0.0, ‘ask2_volume’: 0, ‘ask2’: 0.0, ‘ask3_volume’: 0, ‘ask3’: 0.0, ‘ask4_volume’: 0, ‘ask4’: 0.0, ‘ask5_volume’: 0, ‘ask5’: 0.0, ‘date’: ‘2021-07-09’, ‘time’: ’15:02:22′}[2021-07-10 13:55:24.506286] INFO: 测试策略1: 检查持仓[2021-07-10 13:55:24.508286] ERROR: 测试策略1: [‘Traceback (most recent call last):
‘, ‘  File “F:\GZH\easyquant\easyquant\strategy\strategyTemplate.py”, line 58, in run
    self.strategy(event)
‘, ‘  File “F:\GZH\easyquant\strategies\策略1_Demo.py”, line 66, in strategy
    self.log.info(self.user.balance)
‘, “AttributeError: ‘NoneType’ object has no attribute ‘balance’
“][2021-07-10 13:55:24.508286] INFO: 测试: 
策略2触发[2021-07-10 13:55:24.508286] INFO: 测试: 行情数据: 华宝油气 {‘name’: ‘华宝油气’, ‘open’: 0.444, ‘close’: 0.44, ‘now’: 0.447, ‘high’: 0.447, ‘low’: 0.442, ‘buy’: 0.446, ‘sell’: 0.447, ‘turnover’: 83294223, ‘volume’: 37012931.481, ‘bid1_volume’: 1641404, ‘bid1’: 0.446, ‘bid2_volume’: 1069700, ‘bid2’: 0.445, ‘bid3_volume’: 528400, ‘bid3’: 0.444, ‘bid4_volume’: 860000, ‘bid4’: 0.443, ‘bid5_volume’: 1313500, ‘bid5’: 0.442, ‘ask1_volume’: 1545453, ‘ask1’: 0.447, ‘ask2_volume’: 2270200, ‘ask2’: 0.448, ‘ask3_volume’: 1546400, ‘ask3’: 0.449, ‘ask4_volume’: 910200, ‘ask4’: 0.45, ‘ask5_volume’: 30800, ‘ask5’: 0.451, ‘date’: ‘2021-07-09’, ‘time’: ’15:00:03′}[2021-07-10 13:55:24.508286] INFO: 测试: 检查持仓[2021-07-10 13:55:24.510285] ERROR: 测试: [‘Traceback (most recent call last):
‘, ‘  File “F:\GZH\easyquant\easyquant\strategy\strategyTemplate.py”, line 58, in run
    self.strategy(event)
‘, ‘  File “F:\GZH\easyquant\strategies\策略2_Demo.py”, line 11, in strategy
    self.log.info(self.user.balance)
‘, “AttributeError: ‘NoneType’ object has no attribute ‘balance’
“]demo1 的 log 使用自定义 log 的方式记录在 demo1.log[2021-07-10 13:56:16.725849] INFO: 测试策略1: 
策略1触发[2021-07-10 13:56:16.726849] INFO: 测试策略1: 行情数据: 万科价格: {‘name’: ‘A股指数’, ‘open’: 3681.2108, ‘close’: 3695.1409, ‘now’: 3693.639, ‘high’: 3699.1278, ‘low’: 3652.7015, ‘buy’: 0.0, ‘sell’: 0.0, ‘turnover’: 349623710, ‘volume’: 492807104295.0, ‘bid1_volume’: 0, ‘bid1’: 0.0, ‘bid2_volume’: 0, ‘bid2’: 0.0, ‘bid3_volume’: 0, ‘bid3’: 0.0, ‘bid4_volume’: 0, ‘bid4’: 0.0, ‘bid5_volume’: 0, ‘bid5’: 0.0, ‘ask1_volume’: 0, ‘ask1’: 0.0, ‘ask2_volume’: 0, ‘ask2’: 0.0, ‘ask3_volume’: 0, ‘ask3’: 0.0, ‘ask4_volume’: 0, ‘ask4’: 0.0, ‘ask5_volume’: 0, ‘ask5’: 0.0, ‘date’: ‘2021-07-09’, ‘time’: ’15:02:22′}[2021-07-10 13:56:16.726849] INFO: 测试策略1: 检查持仓[2021-07-10 13:56:16.727852] ERROR: 测试策略1: [‘Traceback (most recent call last):
‘, ‘  File “F:\GZH\easyquant\easyquant\strategy\strategyTemplate.py”, line 58, in run
    self.strategy(event)
‘, ‘  File “F:\GZH\easyquant\strategies\策略1_Demo.py”, line 66, in strategy
    self.log.info(self.user.balance)
‘, “AttributeError: ‘NoneType’ object has no attribute ‘balance’
“][2021-07-10 13:56:16.727852] INFO: 测试: 
策略2触发[2021-07-10 13:56:16.727852] INFO: 测试: 行情数据: 华宝油气 {‘name’: ‘华宝油气’, ‘open’: 0.444, ‘close’: 0.44, ‘now’: 0.447, ‘high’: 0.447, ‘low’: 0.442, ‘buy’: 0.446, ‘sell’: 0.447, ‘turnover’: 83294223, ‘volume’: 37012931.481, ‘bid1_volume’: 1641404, ‘bid1’: 0.446, ‘bid2_volume’: 1069700, ‘bid2’: 0.445, ‘bid3_volume’: 528400, ‘bid3’: 0.444, ‘bid4_volume’: 860000, ‘bid4’: 0.443, ‘bid5_volume’: 1313500, ‘bid5’: 0.442, ‘ask1_volume’: 1545453, ‘ask1’: 0.447, ‘ask2_volume’: 2270200, ‘ask2’: 0.448, ‘ask3_volume’: 1546400, ‘ask3’: 0.449, ‘ask4_volume’: 910200, ‘ask4’: 0.45, ‘ask5_volume’: 30800, ‘ask5’: 0.451, ‘date’: ‘2021-07-09’, ‘time’: ’15:00:03′}[2021-07-10 13:56:16.727852] INFO: 测试: 检查持仓[2021-07-10 13:56:16.728851] ERROR: 测试: [‘Traceback (most recent call last):
‘, ‘  File “F:\GZH\easyquant\easyquant\strategy\strategyTemplate.py”, line 58, in run
    self.strategy(event)
‘, ‘  File “F:\GZH\easyquant\strategies\策略2_Demo.py”, line 11, in strategy
    self.log.info(self.user.balance)
‘, “AttributeError: ‘NoneType’ object has no attribute ‘balance’
“]

发表评论

您的电子邮箱地址不会被公开。