ricequant / rqalpha

A extendable, replaceable Python algorithmic backtest && trading framework supporting multiple securities
http://rqalpha.io
Other
5.39k stars 1.62k forks source link

信号模式下,超过涨跌停板的时候仍然被拒单,期货涨跌停的数据是不是有错啊? #203

Closed easongfan closed 6 years ago

easongfan commented 7 years ago

已经配置了信号模式,但是超过涨跌停的时候,下单失败,如果想继续下单怎么办? 还有,我做的是期货主连的开源版本的日线数据,举一个例子: 2007-07-03 WARN 涨停价:65790.0,最高价:66430.0 2007-07-03 WARN 订单被拒单: 订单价格 66054.0 超过当天涨停板价格 65790.0。

当天的数据最高价,都超过涨停价了,这不对吧。

1. RQAlpha的版本

3.0.6

2. Python的版本

Python 2.7.13 :: Anaconda custom (x86_64)

3. 是Windows/Linux/MacOS or others?

MacOS

4. 您出现问题对应的源码/或者能复现问题的简易代码 以及对应的配置

"mod": { "sys_progress": { "enabled": True, "show": False, }, "sys_simulation": { "signal": True, "price_limit": False, "volume_limit": False, }

5. 您出现的错误堆栈日志信息

2007-07-03 WARN 涨停价:65790.0,最高价:66430.0 2007-07-03 WARN 订单被拒单: 订单价格 66054.0 超过当天涨停板价格 65790.0。

hzliu commented 7 years ago

哪个合约?可能确实是数据有问题

easongfan commented 7 years ago

期货主连 2007-07-03 ERROR 合约:CU88,涨停价:65790.0,最高价:66430.0 2007-08-06 ERROR 合约:CU88,跌停价:65820.0,最低价:65160.0 2007-12-24 ERROR 合约:RU88,涨停价:23375.0,最高价:23600.0 2008-01-22 ERROR 合约:RU88,跌停价:23040.0,最低价:22800.0 2008-02-26 ERROR 合约:RU88,跌停价:24015.0,最低价:23765.0 2008-03-04 ERROR 合约:RU88,跌停价:23890.0,最低价:23640.0 2008-05-12 ERROR 合约:RU88,涨停价:23090.0,最高价:23315.0 2008-07-03 ERROR 合约:RU88,跌停价:27085.0,最低价:26805.0 2008-08-05 ERROR 合约:RU88,跌停价:24135.0,最低价:23885.0 2008-08-13 ERROR 合约:M88,涨停价:3376.0,最高价:3408.0 2008-08-20 ERROR 合约:Y88,涨停价:9226.0,最高价:9312.0 2008-12-22 ERROR 合约:Y88,涨停价:5958.0,最高价:6014.0 2009-01-23 ERROR 合约:L88,涨停价:8700.0,最高价:8780.0 2009-02-09 ERROR 合约:CU88,涨停价:28950.0,最高价:29510.0 2009-04-16 ERROR 合约:TA88,涨停价:7114.0,最高价:7210.0 2009-05-04 ERROR 合约:Y88,涨停价:7332.0,最高价:7332.0 2009-06-01 ERROR 合约:RU88,涨停价:15165.0,最高价:15570.0 2009-06-25 ERROR 合约:RU88,涨停价:15180.0,最高价:15365.0 2009-07-20 ERROR 合约:ZN88,涨停价:13855.0,最高价:13890.0 2009-07-29 ERROR 合约:ZN88,跌停价:13855.0,最低价:13710.0 2009-07-31 ERROR 合约:CU88,涨停价:44310.0,最高价:45170.0 2009-08-17 ERROR 合约:L88,跌停价:11305.0,最低价:11190.0 2009-09-04 ERROR 合约:ZN88,涨停价:15655.0,最高价:15805.0 2009-09-14 ERROR 合约:ZN88,跌停价:14665.0,最低价:14515.0 2010-01-07 ERROR 合约:L88,跌停价:12125.0,最低价:12000.0 2010-01-28 ERROR 合约:RU88,跌停价:23235.0,最低价:22760.0 2010-04-28 ERROR 合约:AL88,跌停价:15970.0,最低价:15660.0 2010-07-23 ERROR 合约:RU88,涨停价:22260.0,最高价:22615.0 2010-09-20 ERROR 合约:CF88,涨停价:20600.0,最高价:20600.0 2010-11-12 ERROR 合约:TA88,跌停价:10688.0,最低价:10576.0 2010-11-12 ERROR 合约:AL88,跌停价:16710.0,最低价:16380.0 2010-11-15 ERROR 合约:L88,跌停价:12425.0,最低价:12295.0 2010-11-17 ERROR 合约:P88,跌停价:8592.0,最低价:8592.0 2010-11-17 ERROR 合约:Y88,跌停价:9396.0,最低价:9396.0 2010-11-17 ERROR 合约:AL88,跌停价:16275.0,最低价:15940.0 2011-01-19 ERROR 合约:RU88,涨停价:39195.0,最高价:39980.0 2011-02-22 ERROR 合约:ZN88,跌停价:19490.0,最低价:19150.0 2011-03-08 ERROR 合约:CU88,跌停价:72020.0,最低价:70260.0 2011-08-05 ERROR 合约:RU88,跌停价:34535.0,最低价:33605.0 2011-08-05 ERROR 合约:ZN88,跌停价:17530.0,最低价:17165.0 2011-09-19 ERROR 合约:CU88,跌停价:63580.0,最低价:63310.0 2011-09-19 ERROR 合约:RU88,跌停价:32485.0,最低价:31825.0 2011-09-19 ERROR 合约:L88,跌停价:10285.0,最低价:10175.0 2011-10-10 ERROR 合约:CU88,涨停价:55100.0,最高价:55740.0 2011-10-24 ERROR 合约:L88,涨停价:8970.0,最高价:9055.0 2012-01-05 ERROR 合约:SR88,涨停价:6273.0,最高价:6319.0 2012-04-18 ERROR 合约:RU88,涨停价:27265.0,最高价:27650.0 2012-08-13 ERROR 合约:RU88,跌停价:21745.0,最低价:21585.0 2012-10-09 ERROR 合约:RU88,涨停价:25320.0,最高价:25790.0 2013-04-24 ERROR 合约:RU88,涨停价:19125.0,最高价:19285.0

这个是我采集下的log

可能还蛮多的。 有没有忽略涨跌停的办法呢,请教下

hzliu commented 7 years ago

关掉 sys_risk 中的 validate_price

cedricporter commented 6 years ago

回测关闭涨跌停限制需要关闭「事前风控的涨跌停限制」和「模拟撮合引擎的涨跌停限制 」。可以加上参数:

-mc sys_risk.validate_price false -mc sys_simulation.price_limit false