一、双均线策略
1、什么是双均线策略?
2、实现代码
def initialize(context):
set_benchmark('601318.XSHG')
set_option('use_real_price',True)
set_order_cost(OrderCost(open_tax=0, close_tax=0.001, open_commission=0.0003, close_commission=0.0003,close_today_commission=0, min_commission=5),type='stock') g.security = ['601318.XSHG']
g.p1 = 5
g.p2 = 60 def handle_data(context, data):
for stock in g.security:
# 金叉:如果5日均线大于10日均线并且不持仓
# 死叉:如果5日均线小于10日均线并且持仓
df = attribute_history(stock, g.p2)
ma10 = df['close'].mean()
ma5 = df['close'][-5:].mean() if ma10 > ma5 and stock in context.portfolio.positions:
# 死叉
order_target(stock, 0)
if ma10 < ma5 and stock not in context.portfolio.positions:
# 金叉
order_value(stock, context.portfolio.available_cash * 0.8)
二、非股灾时期测试
1、编译运行
2、日志输出
日志
错误
2014-06-03 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 2002000: Order(security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=None) 2014-06-03 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533202 security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-03 09:30:00 error=) 2014-06-03 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540533202 security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-03 09:30:00 error=开仓数量必须是100的整数倍,调整为 2002000) 2014-06-03 09:30:00 - INFO - order StockOrder(entrust_id=1540533202 security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-03 09:30:00 error=开仓数量必须是100的整数倍,调整为 2002000) trade price: 40.01, amount:2002000, commission: 24030.01 2014-06-03 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533202 security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-03 09:30:00 error=开仓数量必须是100的整数倍,调整为 2002000) 2014-06-27 09:29:00 - INFO - Security(code=601318.XSHG) 在 2014-06-27 发生了分红:每股税前分红0.45, 税后分红0.36, 每股变成1.0股。 2014-06-27 09:29:00 - INFO - 分红前,price=39.26, avg_cost=40.01, acc_avg_cost=40.022003002, amount=2002000 2014-06-27 09:29:00 - INFO - 分红后,price=38.81, avg_cost=39.56, acc_avg_cost=39.572003002, amount=2002000 2014-06-30 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533203 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-30 09:30:00 error=) 2014-06-30 09:30:00 - INFO - order StockOrder(entrust_id=1540533203 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-30 09:30:00 error=) trade price: 38.86, amount:2002000, commission: 101137.04 2014-06-30 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533203 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-30 09:30:00 error=) 2014-07-04 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 1988200: Order(security=601318.XSHG mode=OrderValue: _value=78634602.36 style=MarketOrderStyle side=long margin=False entrust_time=None) 2014-07-04 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533204 security=601318.XSHG mode=OrderValue: _value=78634602.36 style=MarketOrderStyle side=long margin=False entrust_time=2014-07-04 09:30:00 error=) 2014-07-04 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540533204 security=601318.XSHG mode=OrderValue: _value=78634602.36 style=MarketOrderStyle side=long margin=False entrust_time=2014-07-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 1988200) 2014-07-04 09:30:00 - INFO - order StockOrder(entrust_id=1540533204 security=601318.XSHG mode=OrderValue: _value=78634602.36 style=MarketOrderStyle side=long margin=False entrust_time=2014-07-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 1988200) trade price: 39.6, amount:1988200, commission: 23619.82 2014-07-04 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533204 security=601318.XSHG mode=OrderValue: _value=78634602.36 style=MarketOrderStyle side=long margin=False entrust_time=2014-07-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 1988200) 2014-09-12 09:29:00 - INFO - Security(code=601318.XSHG) 在 2014-09-12 发生了分红:每股税前分红0.25, 税后分红0.2, 每股变成1.0股。 2014-09-12 09:29:00 - INFO - 分红前,price=42.74, avg_cost=39.6, acc_avg_cost=39.611880002, amount=1988200 2014-09-12 09:29:00 - INFO - 分红后,price=42.49, avg_cost=39.35, acc_avg_cost=39.361880002, amount=1988200 2014-09-23 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533205 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2014-09-23 09:30:00 error=) 2014-09-23 09:30:00 - INFO - order StockOrder(entrust_id=1540533205 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2014-09-23 09:30:00 error=) trade price: 41.02, amount:1988200, commission: 106022.75 2014-09-23 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533205 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2014-09-23 09:30:00 error=) 2014-11-04 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 1888800: Order(security=601318.XSHG mode=OrderValue: _value=81107595.504 style=MarketOrderStyle side=long margin=False entrust_time=None) 2014-11-04 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533206 security=601318.XSHG mode=OrderValue: _value=81107595.504 style=MarketOrderStyle side=long margin=False entrust_time=2014-11-04 09:30:00 error=) 2014-11-04 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540533206 security=601318.XSHG mode=OrderValue: _value=81107595.504 style=MarketOrderStyle side=long margin=False entrust_time=2014-11-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 1888800) 2014-11-04 09:30:00 - INFO - order StockOrder(entrust_id=1540533206 security=601318.XSHG mode=OrderValue: _value=81107595.504 style=MarketOrderStyle side=long margin=False entrust_time=2014-11-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 1888800) trade price: 42.99, amount:1888800, commission: 24359.85 2014-11-04 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533206 security=601318.XSHG mode=OrderValue: _value=81107595.504 style=MarketOrderStyle side=long margin=False entrust_time=2014-11-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 1888800) 2015-03-06 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533207 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-06 09:30:00 error=) 2015-03-06 09:30:00 - INFO - order StockOrder(entrust_id=1540533207 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-06 09:30:00 error=) trade price: 65.17, amount:1888800, commission: 160021.02 2015-03-06 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533207 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-06 09:30:00 error=) 2015-03-18 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 1513600: Order(security=601318.XSHG mode=OrderValue: _value=114474958.008 style=MarketOrderStyle side=long margin=False entrust_time=None) 2015-03-18 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533208 security=601318.XSHG mode=OrderValue: _value=114474958.008 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-18 09:30:00 error=) 2015-03-18 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540533208 security=601318.XSHG mode=OrderValue: _value=114474958.008 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-18 09:30:00 error=开仓数量必须是100的整数倍,调整为 1513600) 2015-03-18 09:30:00 - INFO - order StockOrder(entrust_id=1540533208 security=601318.XSHG mode=OrderValue: _value=114474958.008 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-18 09:30:00 error=开仓数量必须是100的整数倍,调整为 1513600) trade price: 75.72, amount:1513600, commission: 34382.94 2015-03-18 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533208 security=601318.XSHG mode=OrderValue: _value=114474958.008 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-18 09:30:00 error=开仓数量必须是100的整数倍,调整为 1513600)
日志输出
3、运行回测
4、最大回撤
三、股灾时期的
1、编译运行
2、日志输出
2015-06-10 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 906000: Order(security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=None) 2015-06-10 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533744 security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=2015-06-10 09:30:00 error=) 2015-06-10 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540533744 security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=2015-06-10 09:30:00 error=开仓数量必须是100的整数倍,调整为 906000) 2015-06-10 09:30:00 - INFO - order StockOrder(entrust_id=1540533744 security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=2015-06-10 09:30:00 error=开仓数量必须是100的整数倍,调整为 906000) trade price: 88.41, amount:906000, commission: 24029.84 2015-06-10 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533744 security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=2015-06-10 09:30:00 error=开仓数量必须是100的整数倍,调整为 906000) 2015-06-23 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533745 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2015-06-23 09:30:00 error=) 2015-06-23 09:30:00 - INFO - order StockOrder(entrust_id=1540533745 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2015-06-23 09:30:00 error=) trade price: 80.9, amount:906000, commission: 95284.02 2015-06-23 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533745 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2015-06-23 09:30:00 error=) 2015-10-19 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 2270100: Order(security=601318.XSHG mode=OrderValue: _value=74461300.912 style=MarketOrderStyle side=long margin=False entrust_time=None) 2015-10-19 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533746 security=601318.XSHG mode=OrderValue: _value=74461300.912 style=MarketOrderStyle side=long margin=False entrust_time=2015-10-19 09:30:00 error=) 2015-10-19 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540533746 security=601318.XSHG mode=OrderValue: _value=74461300.912 style=MarketOrderStyle side=long margin=False entrust_time=2015-10-19 09:30:00 error=开仓数量必须是100的整数倍,调整为 2270100) 2015-10-19 09:30:00 - INFO - order StockOrder(entrust_id=1540533746 security=601318.XSHG mode=OrderValue: _value=74461300.912 style=MarketOrderStyle side=long margin=False entrust_time=2015-10-19 09:30:00 error=开仓数量必须是100的整数倍,调整为 2270100) trade price: 32.84, amount:2270100, commission: 22365.03 2015-10-19 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533746 security=601318.XSHG mode=OrderValue: _value=74461300.912 style=MarketOrderStyle side=long margin=False entrust_time=2015-10-19 09:30:00 error=开仓数量必须是100的整数倍,调整为 2270100) 2016-01-08 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533747 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-01-08 09:30:00 error=) 2016-01-08 09:30:00 - INFO - order StockOrder(entrust_id=1540533747 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-01-08 09:30:00 error=) trade price: 33.96, amount:2270100, commission: 100220.37 2016-01-08 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533747 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-01-08 09:30:00 error=) 2016-03-22 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 2339800: Order(security=601318.XSHG mode=OrderValue: _value=76397242.192 style=MarketOrderStyle side=long margin=False entrust_time=None) 2016-03-22 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533748 security=601318.XSHG mode=OrderValue: _value=76397242.192 style=MarketOrderStyle side=long margin=False entrust_time=2016-03-22 09:30:00 error=) 2016-03-22 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540533748 security=601318.XSHG mode=OrderValue: _value=76397242.192 style=MarketOrderStyle side=long margin=False entrust_time=2016-03-22 09:30:00 error=开仓数量必须是100的整数倍,调整为 2339800) 2016-03-22 09:30:00 - INFO - order StockOrder(entrust_id=1540533748 security=601318.XSHG mode=OrderValue: _value=76397242.192 style=MarketOrderStyle side=long margin=False entrust_time=2016-03-22 09:30:00 error=开仓数量必须是100的整数倍,调整为 2339800) trade price: 32.69, amount:2339800, commission: 22946.42 2016-03-22 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533748 security=601318.XSHG mode=OrderValue: _value=76397242.192 style=MarketOrderStyle side=long margin=False entrust_time=2016-03-22 09:30:00 error=开仓数量必须是100的整数倍,调整为 2339800) 2016-05-13 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533749 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-13 09:30:00 error=) 2016-05-13 09:30:00 - INFO - order StockOrder(entrust_id=1540533749 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-13 09:30:00 error=) trade price: 31.51, amount:2339800, commission: 95845.23 2016-05-13 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533749 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-13 09:30:00 error=) 2016-05-17 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 2344700: Order(security=601318.XSHG mode=OrderValue: _value=74093437.672 style=MarketOrderStyle side=long margin=False entrust_time=None) 2016-05-17 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533750 security=601318.XSHG mode=OrderValue: _value=74093437.672 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-17 09:30:00 error=) 2016-05-17 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540533750 security=601318.XSHG mode=OrderValue: _value=74093437.672 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-17 09:30:00 error=开仓数量必须是100的整数倍,调整为 2344700) 2016-05-17 09:30:00 - INFO - order StockOrder(entrust_id=1540533750 security=601318.XSHG mode=OrderValue: _value=74093437.672 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-17 09:30:00 error=开仓数量必须是100的整数倍,调整为 2344700) trade price: 31.64, amount:2344700, commission: 22255.89 2016-05-17 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533750 security=601318.XSHG mode=OrderValue: _value=74093437.672 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-17 09:30:00 error=开仓数量必须是100的整数倍,调整为 2344700) 2016-05-30 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533751 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-30 09:30:00 error=) 2016-05-30 09:30:00 - INFO - order StockOrder(entrust_id=1540533751 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-30 09:30:00 error=) trade price: 31.71, amount:2344700, commission: 96655.57 2016-05-30 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533751 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-30 09:30:00 error=) 2016-06-01 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 2267600: Order(security=601318.XSHG mode=OrderValue: _value=74129611.704 style=MarketOrderStyle side=long margin=False entrust_time=None) 2016-06-01 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540533752 security=601318.XSHG mode=OrderValue: _value=74129611.704 style=MarketOrderStyle side=long margin=False entrust_time=2016-06-01 09:30:00 error=) 2016-06-01 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540533752 security=601318.XSHG mode=OrderValue: _value=74129611.704 style=MarketOrderStyle side=long margin=False entrust_time=2016-06-01 09:30:00 error=开仓数量必须是100的整数倍,调整为 2267600) 2016-06-01 09:30:00 - INFO - order StockOrder(entrust_id=1540533752 security=601318.XSHG mode=OrderValue: _value=74129611.704 style=MarketOrderStyle side=long margin=False entrust_time=2016-06-01 09:30:00 error=开仓数量必须是100的整数倍,调整为 2267600) trade price: 32.73, amount:2267600, commission: 22265.56 2016-06-01 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540533752 security=601318.XSHG mode=OrderValue: _value=74129611.704 style=MarketOrderStyle side=long margin=False entrust_time=2016-06-01 09:30:00 error=开仓数量必须是100的整数倍,调整为 2267600)
日志输出
3、运行回测
4、最大回撤
四、长线
1、编译运行
2、日志输出
2014-06-03 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 2002000: Order(security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=None) 2014-06-03 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534196 security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-03 09:30:00 error=) 2014-06-03 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534196 security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-03 09:30:00 error=开仓数量必须是100的整数倍,调整为 2002000) 2014-06-03 09:30:00 - INFO - order StockOrder(entrust_id=1540534196 security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-03 09:30:00 error=开仓数量必须是100的整数倍,调整为 2002000) trade price: 40.01, amount:2002000, commission: 24030.01 2014-06-03 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534196 security=601318.XSHG mode=OrderValue: _value=80000000.0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-03 09:30:00 error=开仓数量必须是100的整数倍,调整为 2002000) 2014-06-27 09:29:00 - INFO - Security(code=601318.XSHG) 在 2014-06-27 发生了分红:每股税前分红0.45, 税后分红0.36, 每股变成1.0股。 2014-06-27 09:29:00 - INFO - 分红前,price=39.26, avg_cost=40.01, acc_avg_cost=40.022003002, amount=2002000 2014-06-27 09:29:00 - INFO - 分红后,price=38.81, avg_cost=39.56, acc_avg_cost=39.572003002, amount=2002000 2014-06-30 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534197 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-30 09:30:00 error=) 2014-06-30 09:30:00 - INFO - order StockOrder(entrust_id=1540534197 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-30 09:30:00 error=) trade price: 38.86, amount:2002000, commission: 101137.04 2014-06-30 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534197 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2014-06-30 09:30:00 error=) 2014-07-04 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 1988200: Order(security=601318.XSHG mode=OrderValue: _value=78634602.36 style=MarketOrderStyle side=long margin=False entrust_time=None) 2014-07-04 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534198 security=601318.XSHG mode=OrderValue: _value=78634602.36 style=MarketOrderStyle side=long margin=False entrust_time=2014-07-04 09:30:00 error=) 2014-07-04 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534198 security=601318.XSHG mode=OrderValue: _value=78634602.36 style=MarketOrderStyle side=long margin=False entrust_time=2014-07-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 1988200) 2014-07-04 09:30:00 - INFO - order StockOrder(entrust_id=1540534198 security=601318.XSHG mode=OrderValue: _value=78634602.36 style=MarketOrderStyle side=long margin=False entrust_time=2014-07-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 1988200) trade price: 39.6, amount:1988200, commission: 23619.82 2014-07-04 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534198 security=601318.XSHG mode=OrderValue: _value=78634602.36 style=MarketOrderStyle side=long margin=False entrust_time=2014-07-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 1988200) 2014-09-12 09:29:00 - INFO - Security(code=601318.XSHG) 在 2014-09-12 发生了分红:每股税前分红0.25, 税后分红0.2, 每股变成1.0股。 2014-09-12 09:29:00 - INFO - 分红前,price=42.74, avg_cost=39.6, acc_avg_cost=39.611880002, amount=1988200 2014-09-12 09:29:00 - INFO - 分红后,price=42.49, avg_cost=39.35, acc_avg_cost=39.361880002, amount=1988200 2014-09-23 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534199 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2014-09-23 09:30:00 error=) 2014-09-23 09:30:00 - INFO - order StockOrder(entrust_id=1540534199 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2014-09-23 09:30:00 error=) trade price: 41.02, amount:1988200, commission: 106022.75 2014-09-23 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534199 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2014-09-23 09:30:00 error=) 2014-11-04 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 1888800: Order(security=601318.XSHG mode=OrderValue: _value=81107595.504 style=MarketOrderStyle side=long margin=False entrust_time=None) 2014-11-04 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534200 security=601318.XSHG mode=OrderValue: _value=81107595.504 style=MarketOrderStyle side=long margin=False entrust_time=2014-11-04 09:30:00 error=) 2014-11-04 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534200 security=601318.XSHG mode=OrderValue: _value=81107595.504 style=MarketOrderStyle side=long margin=False entrust_time=2014-11-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 1888800) 2014-11-04 09:30:00 - INFO - order StockOrder(entrust_id=1540534200 security=601318.XSHG mode=OrderValue: _value=81107595.504 style=MarketOrderStyle side=long margin=False entrust_time=2014-11-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 1888800) trade price: 42.99, amount:1888800, commission: 24359.85 2014-11-04 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534200 security=601318.XSHG mode=OrderValue: _value=81107595.504 style=MarketOrderStyle side=long margin=False entrust_time=2014-11-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 1888800) 2015-03-06 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534201 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-06 09:30:00 error=) 2015-03-06 09:30:00 - INFO - order StockOrder(entrust_id=1540534201 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-06 09:30:00 error=) trade price: 65.17, amount:1888800, commission: 160021.02 2015-03-06 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534201 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-06 09:30:00 error=) 2015-03-18 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 1513600: Order(security=601318.XSHG mode=OrderValue: _value=114474958.008 style=MarketOrderStyle side=long margin=False entrust_time=None) 2015-03-18 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534202 security=601318.XSHG mode=OrderValue: _value=114474958.008 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-18 09:30:00 error=) 2015-03-18 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534202 security=601318.XSHG mode=OrderValue: _value=114474958.008 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-18 09:30:00 error=开仓数量必须是100的整数倍,调整为 1513600) 2015-03-18 09:30:00 - INFO - order StockOrder(entrust_id=1540534202 security=601318.XSHG mode=OrderValue: _value=114474958.008 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-18 09:30:00 error=开仓数量必须是100的整数倍,调整为 1513600) trade price: 75.72, amount:1513600, commission: 34382.94 2015-03-18 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534202 security=601318.XSHG mode=OrderValue: _value=114474958.008 style=MarketOrderStyle side=long margin=False entrust_time=2015-03-18 09:30:00 error=开仓数量必须是100的整数倍,调整为 1513600) 2015-06-23 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534203 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2015-06-23 09:30:00 error=) 2015-06-23 09:30:00 - INFO - order StockOrder(entrust_id=1540534203 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2015-06-23 09:30:00 error=) trade price: 80.9, amount:1513600, commission: 159185.31 2015-06-23 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534203 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2015-06-23 09:30:00 error=) 2015-10-19 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 3676500: Order(security=601318.XSHG mode=OrderValue: _value=120592461.808 style=MarketOrderStyle side=long margin=False entrust_time=None) 2015-10-19 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534204 security=601318.XSHG mode=OrderValue: _value=120592461.808 style=MarketOrderStyle side=long margin=False entrust_time=2015-10-19 09:30:00 error=) 2015-10-19 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534204 security=601318.XSHG mode=OrderValue: _value=120592461.808 style=MarketOrderStyle side=long margin=False entrust_time=2015-10-19 09:30:00 error=开仓数量必须是100的整数倍,调整为 3676500) 2015-10-19 09:30:00 - INFO - order StockOrder(entrust_id=1540534204 security=601318.XSHG mode=OrderValue: _value=120592461.808 style=MarketOrderStyle side=long margin=False entrust_time=2015-10-19 09:30:00 error=开仓数量必须是100的整数倍,调整为 3676500) trade price: 32.84, amount:3676500, commission: 36220.88 2015-10-19 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534204 security=601318.XSHG mode=OrderValue: _value=120592461.808 style=MarketOrderStyle side=long margin=False entrust_time=2015-10-19 09:30:00 error=开仓数量必须是100的整数倍,调整为 3676500) 2016-01-08 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534205 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-01-08 09:30:00 error=) 2016-01-08 09:30:00 - INFO - order StockOrder(entrust_id=1540534205 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-01-08 09:30:00 error=) trade price: 33.96, amount:3676500, commission: 162310.12 2016-01-08 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534205 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-01-08 09:30:00 error=) 2016-03-22 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 3789500: Order(security=601318.XSHG mode=OrderValue: _value=123727781.008 style=MarketOrderStyle side=long margin=False entrust_time=None) 2016-03-22 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534206 security=601318.XSHG mode=OrderValue: _value=123727781.008 style=MarketOrderStyle side=long margin=False entrust_time=2016-03-22 09:30:00 error=) 2016-03-22 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534206 security=601318.XSHG mode=OrderValue: _value=123727781.008 style=MarketOrderStyle side=long margin=False entrust_time=2016-03-22 09:30:00 error=开仓数量必须是100的整数倍,调整为 3789500) 2016-03-22 09:30:00 - INFO - order StockOrder(entrust_id=1540534206 security=601318.XSHG mode=OrderValue: _value=123727781.008 style=MarketOrderStyle side=long margin=False entrust_time=2016-03-22 09:30:00 error=开仓数量必须是100的整数倍,调整为 3789500) trade price: 32.69, amount:3789500, commission: 37163.63 2016-03-22 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534206 security=601318.XSHG mode=OrderValue: _value=123727781.008 style=MarketOrderStyle side=long margin=False entrust_time=2016-03-22 09:30:00 error=开仓数量必须是100的整数倍,调整为 3789500) 2016-05-13 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534207 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-13 09:30:00 error=) 2016-05-13 09:30:00 - INFO - order StockOrder(entrust_id=1540534207 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-13 09:30:00 error=) trade price: 31.51, amount:3789500, commission: 155229.29 2016-05-13 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534207 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-13 09:30:00 error=) 2016-05-17 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 3797300: Order(security=601318.XSHG mode=OrderValue: _value=119996578.672 style=MarketOrderStyle side=long margin=False entrust_time=None) 2016-05-17 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534208 security=601318.XSHG mode=OrderValue: _value=119996578.672 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-17 09:30:00 error=) 2016-05-17 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534208 security=601318.XSHG mode=OrderValue: _value=119996578.672 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-17 09:30:00 error=开仓数量必须是100的整数倍,调整为 3797300) 2016-05-17 09:30:00 - INFO - order StockOrder(entrust_id=1540534208 security=601318.XSHG mode=OrderValue: _value=119996578.672 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-17 09:30:00 error=开仓数量必须是100的整数倍,调整为 3797300) trade price: 31.64, amount:3797300, commission: 36043.97 2016-05-17 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534208 security=601318.XSHG mode=OrderValue: _value=119996578.672 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-17 09:30:00 error=开仓数量必须是100的整数倍,调整为 3797300) 2016-05-30 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534209 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-30 09:30:00 error=) 2016-05-30 09:30:00 - INFO - order StockOrder(entrust_id=1540534209 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-30 09:30:00 error=) trade price: 31.71, amount:3797300, commission: 156536.1 2016-05-30 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534209 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-05-30 09:30:00 error=) 2016-06-01 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 3672500: Order(security=601318.XSHG mode=OrderValue: _value=120055163.416 style=MarketOrderStyle side=long margin=False entrust_time=None) 2016-06-01 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534210 security=601318.XSHG mode=OrderValue: _value=120055163.416 style=MarketOrderStyle side=long margin=False entrust_time=2016-06-01 09:30:00 error=) 2016-06-01 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534210 security=601318.XSHG mode=OrderValue: _value=120055163.416 style=MarketOrderStyle side=long margin=False entrust_time=2016-06-01 09:30:00 error=开仓数量必须是100的整数倍,调整为 3672500) 2016-06-01 09:30:00 - INFO - order StockOrder(entrust_id=1540534210 security=601318.XSHG mode=OrderValue: _value=120055163.416 style=MarketOrderStyle side=long margin=False entrust_time=2016-06-01 09:30:00 error=开仓数量必须是100的整数倍,调整为 3672500) trade price: 32.73, amount:3672500, commission: 36060.28 2016-06-01 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534210 security=601318.XSHG mode=OrderValue: _value=120055163.416 style=MarketOrderStyle side=long margin=False entrust_time=2016-06-01 09:30:00 error=开仓数量必须是100的整数倍,调整为 3672500) 2016-06-28 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534211 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-06-28 09:30:00 error=) 2016-06-28 09:30:00 - INFO - order StockOrder(entrust_id=1540534211 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-06-28 09:30:00 error=) trade price: 31.53, amount:3672500, commission: 150532.1 2016-06-28 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534211 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-06-28 09:30:00 error=) 2016-07-04 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 3623200: Order(security=601318.XSHG mode=OrderValue: _value=116380289.512 style=MarketOrderStyle side=long margin=False entrust_time=None) 2016-07-04 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534212 security=601318.XSHG mode=OrderValue: _value=116380289.512 style=MarketOrderStyle side=long margin=False entrust_time=2016-07-04 09:30:00 error=) 2016-07-04 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534212 security=601318.XSHG mode=OrderValue: _value=116380289.512 style=MarketOrderStyle side=long margin=False entrust_time=2016-07-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 3623200) 2016-07-04 09:30:00 - INFO - order StockOrder(entrust_id=1540534212 security=601318.XSHG mode=OrderValue: _value=116380289.512 style=MarketOrderStyle side=long margin=False entrust_time=2016-07-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 3623200) trade price: 32.16, amount:3623200, commission: 34956.63 2016-07-04 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534212 security=601318.XSHG mode=OrderValue: _value=116380289.512 style=MarketOrderStyle side=long margin=False entrust_time=2016-07-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 3623200) 2016-07-05 09:29:00 - INFO - Security(code=601318.XSHG) 在 2016-07-05 发生了分红:每股税前分红0.35, 税后分红0.28, 每股变成1.0股。 2016-07-05 09:29:00 - INFO - 分红前,price=32.09, avg_cost=32.16, acc_avg_cost=32.169647999, amount=3623200 2016-07-05 09:29:00 - INFO - 分红后,price=31.74, avg_cost=31.81, acc_avg_cost=31.819647999, amount=3623200 2016-09-05 09:29:00 - INFO - Security(code=601318.XSHG) 在 2016-09-05 发生了分红:每股税前分红0.2, 税后分红0.16, 每股变成1.0股。 2016-09-05 09:29:00 - INFO - 分红前,price=34.66, avg_cost=31.81, acc_avg_cost=31.819647999, amount=3623200 2016-09-05 09:29:00 - INFO - 分红后,price=34.46, avg_cost=31.61, acc_avg_cost=31.619647999, amount=3623200 2016-12-22 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534213 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-12-22 09:30:00 error=) 2016-12-22 09:30:00 - INFO - order StockOrder(entrust_id=1540534213 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-12-22 09:30:00 error=) trade price: 34.62, amount:3623200, commission: 163065.74 2016-12-22 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534213 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2016-12-22 09:30:00 error=) 2017-01-04 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 3491900: Order(security=601318.XSHG mode=OrderValue: _value=124627695.616 style=MarketOrderStyle side=long margin=False entrust_time=None) 2017-01-04 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534214 security=601318.XSHG mode=OrderValue: _value=124627695.616 style=MarketOrderStyle side=long margin=False entrust_time=2017-01-04 09:30:00 error=) 2017-01-04 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534214 security=601318.XSHG mode=OrderValue: _value=124627695.616 style=MarketOrderStyle side=long margin=False entrust_time=2017-01-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 3491900) 2017-01-04 09:30:00 - INFO - order StockOrder(entrust_id=1540534214 security=601318.XSHG mode=OrderValue: _value=124627695.616 style=MarketOrderStyle side=long margin=False entrust_time=2017-01-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 3491900) trade price: 35.73, amount:3491900, commission: 37429.68 2017-01-04 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534214 security=601318.XSHG mode=OrderValue: _value=124627695.616 style=MarketOrderStyle side=long margin=False entrust_time=2017-01-04 09:30:00 error=开仓数量必须是100的整数倍,调整为 3491900) 2017-01-12 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534215 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2017-01-12 09:30:00 error=) 2017-01-12 09:30:00 - INFO - order StockOrder(entrust_id=1540534215 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2017-01-12 09:30:00 error=) trade price: 35.26, amount:3491900, commission: 160061.71 2017-01-12 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534215 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2017-01-12 09:30:00 error=) 2017-01-18 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 3414300: Order(security=601318.XSHG mode=OrderValue: _value=123156748.104 style=MarketOrderStyle side=long margin=False entrust_time=None) 2017-01-18 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534216 security=601318.XSHG mode=OrderValue: _value=123156748.104 style=MarketOrderStyle side=long margin=False entrust_time=2017-01-18 09:30:00 error=) 2017-01-18 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534216 security=601318.XSHG mode=OrderValue: _value=123156748.104 style=MarketOrderStyle side=long margin=False entrust_time=2017-01-18 09:30:00 error=开仓数量必须是100的整数倍,调整为 3414300) 2017-01-18 09:30:00 - INFO - order StockOrder(entrust_id=1540534216 security=601318.XSHG mode=OrderValue: _value=123156748.104 style=MarketOrderStyle side=long margin=False entrust_time=2017-01-18 09:30:00 error=开仓数量必须是100的整数倍,调整为 3414300) trade price: 36.11, amount:3414300, commission: 36987.11 2017-01-18 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534216 security=601318.XSHG mode=OrderValue: _value=123156748.104 style=MarketOrderStyle side=long margin=False entrust_time=2017-01-18 09:30:00 error=开仓数量必须是100的整数倍,调整为 3414300) 2017-03-08 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534217 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2017-03-08 09:30:00 error=) 2017-03-08 09:30:00 - INFO - order StockOrder(entrust_id=1540534217 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2017-03-08 09:30:00 error=) trade price: 35.86, amount:3414300, commission: 159167.84 2017-03-08 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534217 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2017-03-08 09:30:00 error=) 2017-03-17 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 3386400: Order(security=601318.XSHG mode=OrderValue: _value=122316964.144 style=MarketOrderStyle side=long margin=False entrust_time=None) 2017-03-17 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534218 security=601318.XSHG mode=OrderValue: _value=122316964.144 style=MarketOrderStyle side=long margin=False entrust_time=2017-03-17 09:30:00 error=) 2017-03-17 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534218 security=601318.XSHG mode=OrderValue: _value=122316964.144 style=MarketOrderStyle side=long margin=False entrust_time=2017-03-17 09:30:00 error=开仓数量必须是100的整数倍,调整为 3386400) 2017-03-17 09:30:00 - INFO - order StockOrder(entrust_id=1540534218 security=601318.XSHG mode=OrderValue: _value=122316964.144 style=MarketOrderStyle side=long margin=False entrust_time=2017-03-17 09:30:00 error=开仓数量必须是100的整数倍,调整为 3386400) trade price: 36.16, amount:3386400, commission: 36735.67 2017-03-17 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534218 security=601318.XSHG mode=OrderValue: _value=122316964.144 style=MarketOrderStyle side=long margin=False entrust_time=2017-03-17 09:30:00 error=开仓数量必须是100的整数倍,调整为 3386400) 2017-04-17 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534219 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2017-04-17 09:30:00 error=) 2017-04-17 09:30:00 - INFO - order StockOrder(entrust_id=1540534219 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2017-04-17 09:30:00 error=) trade price: 35.77, amount:3386400, commission: 157470.99 2017-04-17 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534219 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2017-04-17 09:30:00 error=) 2017-04-27 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 3230300: Order(security=601318.XSHG mode=OrderValue: _value=121105042.016 style=MarketOrderStyle side=long margin=False entrust_time=None) 2017-04-27 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534220 security=601318.XSHG mode=OrderValue: _value=121105042.016 style=MarketOrderStyle side=long margin=False entrust_time=2017-04-27 09:30:00 error=) 2017-04-27 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534220 security=601318.XSHG mode=OrderValue: _value=121105042.016 style=MarketOrderStyle side=long margin=False entrust_time=2017-04-27 09:30:00 error=开仓数量必须是100的整数倍,调整为 3230300) 2017-04-27 09:30:00 - INFO - order StockOrder(entrust_id=1540534220 security=601318.XSHG mode=OrderValue: _value=121105042.016 style=MarketOrderStyle side=long margin=False entrust_time=2017-04-27 09:30:00 error=开仓数量必须是100的整数倍,调整为 3230300) trade price: 37.54, amount:3230300, commission: 36379.64 2017-04-27 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534220 security=601318.XSHG mode=OrderValue: _value=121105042.016 style=MarketOrderStyle side=long margin=False entrust_time=2017-04-27 09:30:00 error=开仓数量必须是100的整数倍,调整为 3230300) 2017-07-11 09:29:00 - INFO - Security(code=601318.XSHG) 在 2017-07-11 发生了分红:每股税前分红0.55, 税后分红0.44, 每股变成1.0股。 2017-07-11 09:29:00 - INFO - 分红前,price=50.59, avg_cost=37.54, acc_avg_cost=37.5512620004, amount=3230300 2017-07-11 09:29:00 - INFO - 分红后,price=50.04, avg_cost=36.99, acc_avg_cost=37.0012620004, amount=3230300 2017-09-04 09:29:00 - INFO - Security(code=601318.XSHG) 在 2017-09-04 发生了分红:每股税前分红0.5, 税后分红0.4, 每股变成1.0股。 2017-09-04 09:29:00 - INFO - 分红前,price=55.66, avg_cost=36.99, acc_avg_cost=37.0012620004, amount=3230300 2017-09-04 09:29:00 - INFO - 分红后,price=55.16, avg_cost=36.49, acc_avg_cost=36.5012620004, amount=3230300 2018-02-09 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534221 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2018-02-09 09:30:00 error=) 2018-02-09 09:30:00 - INFO - order StockOrder(entrust_id=1540534221 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2018-02-09 09:30:00 error=) trade price: 66.42, amount:3230300, commission: 278923.48 2018-02-09 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534221 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2018-02-09 09:30:00 error=) 2018-03-22 09:30:00 - WARNING - 开仓数量必须是100的整数倍,调整为 2688800: Order(security=601318.XSHG mode=OrderValue: _value=197656412.32 style=MarketOrderStyle side=long margin=False entrust_time=None) 2018-03-22 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534222 security=601318.XSHG mode=OrderValue: _value=197656412.32 style=MarketOrderStyle side=long margin=False entrust_time=2018-03-22 09:30:00 error=) 2018-03-22 09:30:00 - WARNING - 下单检查标的数量: StockOrder(entrust_id=1540534222 security=601318.XSHG mode=OrderValue: _value=197656412.32 style=MarketOrderStyle side=long margin=False entrust_time=2018-03-22 09:30:00 error=开仓数量必须是100的整数倍,调整为 2688800) 2018-03-22 09:30:00 - INFO - order StockOrder(entrust_id=1540534222 security=601318.XSHG mode=OrderValue: _value=197656412.32 style=MarketOrderStyle side=long margin=False entrust_time=2018-03-22 09:30:00 error=开仓数量必须是100的整数倍,调整为 2688800) trade price: 73.6, amount:2688800, commission: 59368.7 2018-03-22 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534222 security=601318.XSHG mode=OrderValue: _value=197656412.32 style=MarketOrderStyle side=long margin=False entrust_time=2018-03-22 09:30:00 error=开仓数量必须是100的整数倍,调整为 2688800) 2018-03-27 09:30:00 - INFO - 订单已提交: StockOrder(entrust_id=1540534223 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2018-03-27 09:30:00 error=) 2018-03-27 09:30:00 - INFO - order StockOrder(entrust_id=1540534223 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2018-03-27 09:30:00 error=) trade price: 69.49, amount:2688800, commission: 242898.13 2018-03-27 09:30:00 - INFO - 订单已委托: StockOrder(entrust_id=1540534223 security=601318.XSHG mode=OrderTargetAmount: _amount=0 style=MarketOrderStyle side=long margin=False entrust_time=2018-03-27 09:30:00 error=)
日志输出