ricequant / rqalpha

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

回测里有相关的A股做空函数用于因子收益检验吗 #902

Closed JL-ghcoder closed 40 minutes ago

JL-ghcoder commented 5 hours ago

想利用rqalpha的框架搭配rqdatac来完成因子收益的检验,这要求要同时进行多空

但我发现似乎没有A股的做空接口(虽然我知道这个市场不能做空) order_target_percent()等函数在开负数仓位的时候都会先确保仓位里有相关股票才能卖出

有没有什么办法可以在不影响其他功能的前提下,快速引入这个做空的接口呢?

zxcpp commented 5 hours ago

您好,您的邮件已收到,我会尽快给您回复。 祝您工作顺利,生活愉快!

Cuizi7 commented 40 minutes ago

命令行加入 --short-stock 参数或者 config 中加入 {"mod": {"sys_accounts": {"validate_stock_position": False}}}即可卖空。不过因子检验更推荐您看看我司的 RQFactor 产品。