金融量化分析【day112】:双均线策略

 一、双均线策略

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、日志输出

 1 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)
 2 
 3 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=)
 4 
 5 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)
 6 
 7 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
 8 
 9 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)
10 
11 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=)
12 
13 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
14 
15 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=)
16 
17 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)
18 
19 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=)
20 
21 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)
22 
23 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
24 
25 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)
26 
27 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=)
28 
29 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
30 
31 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=)
32 
33 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)
34 
35 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=)
36 
37 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)
38 
39 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
40 
41 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)
42 
43 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=)
44 
45 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
46 
47 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=)
48 
49 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)
50 
51 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=)
52 
53 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)
54 
55 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
56 
57 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)
58 
59 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=)
60 
61 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
62 
63 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=)
64 
65 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)
66 
67 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=)
68 
69 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)
70 
71 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
72 
73 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、日志输出

  1 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)
  2 
  3 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=)
  4 
  5 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)
  6 
  7 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
  8 
  9 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)
 10 
 11 2014-06-27 09:29:00 - INFO  - Security(code=601318.XSHG) 在 2014-06-27 发生了分红:每股税前分红0.45, 税后分红0.36, 每股变成1.0股。
 12 
 13 2014-06-27 09:29:00 - INFO  - 分红前,price=39.26, avg_cost=40.01, acc_avg_cost=40.022003002, amount=2002000
 14 
 15 2014-06-27 09:29:00 - INFO  - 分红后,price=38.81, avg_cost=39.56, acc_avg_cost=39.572003002, amount=2002000
 16 
 17 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=)
 18 
 19 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
 20 
 21 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=)
 22 
 23 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)
 24 
 25 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=)
 26 
 27 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)
 28 
 29 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
 30 
 31 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)
 32 
 33 2014-09-12 09:29:00 - INFO  - Security(code=601318.XSHG) 在 2014-09-12 发生了分红:每股税前分红0.25, 税后分红0.2, 每股变成1.0股。
 34 
 35 2014-09-12 09:29:00 - INFO  - 分红前,price=42.74, avg_cost=39.6, acc_avg_cost=39.611880002, amount=1988200
 36 
 37 2014-09-12 09:29:00 - INFO  - 分红后,price=42.49, avg_cost=39.35, acc_avg_cost=39.361880002, amount=1988200
 38 
 39 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=)
 40 
 41 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
 42 
 43 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=)
 44 
 45 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)
 46 
 47 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=)
 48 
 49 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)
 50 
 51 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
 52 
 53 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)
 54 
 55 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=)
 56 
 57 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
 58 
 59 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=)
 60 
 61 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)
 62 
 63 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=)
 64 
 65 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)
 66 
 67 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
 68 
 69 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)
 70 
 71 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=)
 72 
 73 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
 74 
 75 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=)
 76 
 77 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)
 78 
 79 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=)
 80 
 81 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)
 82 
 83 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
 84 
 85 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)
 86 
 87 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=)
 88 
 89 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
 90 
 91 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=)
 92 
 93 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)
 94 
 95 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=)
 96 
 97 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)
 98 
 99 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
100 
101 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)
102 
103 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=)
104 
105 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
106 
107 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=)
108 
109 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)
110 
111 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=)
112 
113 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)
114 
115 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
116 
117 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)
118 
119 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=)
120 
121 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
122 
123 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=)
124 
125 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)
126 
127 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=)
128 
129 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)
130 
131 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
132 
133 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)
134 
135 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=)
136 
137 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
138 
139 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=)
140 
141 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)
142 
143 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=)
144 
145 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)
146 
147 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
148 
149 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)
150 
151 2016-07-05 09:29:00 - INFO  - Security(code=601318.XSHG) 在 2016-07-05 发生了分红:每股税前分红0.35, 税后分红0.28, 每股变成1.0股。
152 
153 2016-07-05 09:29:00 - INFO  - 分红前,price=32.09, avg_cost=32.16, acc_avg_cost=32.169647999, amount=3623200
154 
155 2016-07-05 09:29:00 - INFO  - 分红后,price=31.74, avg_cost=31.81, acc_avg_cost=31.819647999, amount=3623200
156 
157 2016-09-05 09:29:00 - INFO  - Security(code=601318.XSHG) 在 2016-09-05 发生了分红:每股税前分红0.2, 税后分红0.16, 每股变成1.0股。
158 
159 2016-09-05 09:29:00 - INFO  - 分红前,price=34.66, avg_cost=31.81, acc_avg_cost=31.819647999, amount=3623200
160 
161 2016-09-05 09:29:00 - INFO  - 分红后,price=34.46, avg_cost=31.61, acc_avg_cost=31.619647999, amount=3623200
162 
163 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=)
164 
165 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
166 
167 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=)
168 
169 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)
170 
171 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=)
172 
173 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)
174 
175 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
176 
177 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)
178 
179 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=)
180 
181 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
182 
183 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=)
184 
185 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)
186 
187 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=)
188 
189 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)
190 
191 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
192 
193 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)
194 
195 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=)
196 
197 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
198 
199 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=)
200 
201 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)
202 
203 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=)
204 
205 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)
206 
207 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
208 
209 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)
210 
211 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=)
212 
213 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
214 
215 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=)
216 
217 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)
218 
219 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=)
220 
221 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)
222 
223 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
224 
225 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)
226 
227 2017-07-11 09:29:00 - INFO  - Security(code=601318.XSHG) 在 2017-07-11 发生了分红:每股税前分红0.55, 税后分红0.44, 每股变成1.0股。
228 
229 2017-07-11 09:29:00 - INFO  - 分红前,price=50.59, avg_cost=37.54, acc_avg_cost=37.5512620004, amount=3230300
230 
231 2017-07-11 09:29:00 - INFO  - 分红后,price=50.04, avg_cost=36.99, acc_avg_cost=37.0012620004, amount=3230300
232 
233 2017-09-04 09:29:00 - INFO  - Security(code=601318.XSHG) 在 2017-09-04 发生了分红:每股税前分红0.5, 税后分红0.4, 每股变成1.0股。
234 
235 2017-09-04 09:29:00 - INFO  - 分红前,price=55.66, avg_cost=36.99, acc_avg_cost=37.0012620004, amount=3230300
236 
237 2017-09-04 09:29:00 - INFO  - 分红后,price=55.16, avg_cost=36.49, acc_avg_cost=36.5012620004, amount=3230300
238 
239 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=)
240 
241 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
242 
243 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=)
244 
245 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)
246 
247 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=)
248 
249 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)
250 
251 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
252 
253 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)
254 
255 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=)
256 
257 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
258 
259 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=)
日志输出

3、运行回测

4、最大回撤

 

转载于:https://www.cnblogs.com/luoahong/p/9856049.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值