金融量化分析【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、日志输出
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=)
日志输出
3、运行回测
4、最大回撤
金融量化分析【day112】:双均线策略的更多相关文章
- 数据分析04 /基于pandas的DateFrame进行股票分析、双均线策略制定
数据分析04 /基于pandas的DateFrame进行股票分析.双均线策略制定 目录 数据分析04 /基于pandas的DateFrame进行股票分析.双均线策略制定 需求1:对茅台股票分析 需求2 ...
- day33 Python与金融量化分析(三)
第三部分 实现简单的量化框架 框架内容: 开始时间.结束时间.现金.持仓数据 获取历史数据 交易函数 计算并绘制收益曲线 回测主体框架 计算各项指标 用户待写代码:初始化.每日处理函数 第四部分 在线 ...
- day31 堡垒机尾声 + Python与金融量化分析(一)
堡垒机尾声: 代码案例:https://github.com/liyongsan/git_class/tree/master/day31 课堂笔记:file send: 1.选择本地文件 2.远程路径 ...
- 金融量化分析【day110】:金融基础知识
一.股票 股票: 股票是股份公司发给出资人的一种凭证,股票的持有者就是股份公司的股东. 股票的面值与市值 面值表示票面金额 市值表示市场价值 上市/IPO: 企业通过证券交易所公开向社会增发股票以募集 ...
- Python与金融量化分析----金融与量化投资
一:金融了解 金融:就是对现有资源进行重新的整合之后,进行价值和利润的等效流通. 金融工具: 股票 期货 黄金 外汇 基金 ............. 股票: 股票是股份公司发给出资人多的一种凭证,股 ...
- day32 Python与金融量化分析(二)
第一部分:金融与量化投资 股票: 股票是股份公司发给出资人的一种凭证,股票的持有者就是股份公司的股东. 股票的面值与市值 面值表示票面金额 市值表示市场价值 上市/IPO: 企业通过证券交易所公开向社 ...
- 金融量化分析-python量化分析系列之---使用python获取股票历史数据和实时分笔数据
财经数据接口包tushare的使用(一) Tushare是一款开源免费的金融数据接口包,可以用于获取股票的历史数据.年度季度报表数据.实时分笔数据.历史分笔数据,本文对tushare的用法,已经存在的 ...
- 金融量化分析【day112】:量化交易策略基本框架
摘要 策略编写的基本框架及其实现 回测的含义及其实现 初步学习解决代码错误 周期循环的开始时间 自测与自学 通过前文对量化交易有了一个基本认识之后,我们开始学习做量化交易.毕竟就像学游泳,有些东西讲是 ...
- 金融量化分析【day112】:量化平台的使用-第一个策略
一.策略代码 # 导入函数库 import jqdata #初始化函数,设定基准等等 def initialize(context): set_benchmark('000300.XSHG') g.s ...
随机推荐
- c/c++ 继承与多态 静态调用与动态调用
静态调用,与动态调用. 动态调用条件:必须用父类的引用或者指针,并且调用的必须是虚方法. #include <iostream> class Base{ public: virtual i ...
- [转] Linux Asynchronous I/O Explained
Linux Asynchronous I/O Explained (Last updated: 13 Apr 2012) *************************************** ...
- Dynamics 365 CRM 开发架构简介
Dynamics 365 CRM提供了多种编程模型,你可以灵活地按需选用最佳模式. 本文是对Dynamics 365 CRM编程模型的综述. 概览 下图表明了Dynamics 365 CRM的主要可编 ...
- 多线程——multiprocess
先看个误打误撞的写的代码 import os import time import multiprocessing def func(): print('我是func函数1','现在的father进程 ...
- 【English EMail】Compensation Planning Memo
Data Foundation 数据基础 [faʊnˈdeʃən] Interesting newsletter for data foundation practice. Annual Code ...
- supervisor management kafka zookeeper
# cat kafka.ini [program:kafka] command=/usr/local/kafka/bin/kafka-server-start.sh /usr/local/kafka/ ...
- fastjson JSON 对象为空保留null
JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(Object, SerializerFeature.WriteMapN ...
- Bokeh
超级好用的显示图像用的package哟~~ 用法自己Google哟~ 特别喜欢这个带各种颜色的Bokeh.palette https://bokeh.pydata.org/en/latest/docs ...
- (十二)Deleting Documents
Deleting a document is fairly straightforward. This example shows how to delete our previous custome ...
- Mac系统下Mysql存储数据报错 ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect string value
比如如下mysql操作插入数据: const mysql = require('mysql'); /* createConnection方法创建一个表示与Mysql数据库服务器之间连接的 Connec ...