Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

设置允许卖空时,参数类型出错 #3

Closed
yu123ert opened this issue Aug 5, 2016 · 2 comments
Closed

设置允许卖空时,参数类型出错 #3

yu123ert opened this issue Aug 5, 2016 · 2 comments

Comments

@yu123ert
Copy link

yu123ert commented Aug 5, 2016

qq 20160805205441

def init(context):
context.short_selling_allowed = True

File "d:\python\lib\site-packages\rqalpha\strategy.py", line 158, in execute
init(strategy_context)
File "examples/buy_and_hold.py", line 7, in init
context.short_selling_allowed = True
TypeError: short_selling_allowed() takes 1 positional argument but 2 were given

在ricequant平台上策略代码测试可用

@cedricporter
Copy link
Member

目前暂时还不支持卖空,后续会加上

@wh1100717
Copy link
Member

无论是Ricequant,还是RQAlpha,都不再支持股票的做空API,因为本来就无法做空..... 而且这里面还涉及到做空成本计算和管理等虚拟出来的一些逻辑。 如果有类似的做空的需求,可以试着通过股票 + 股指 混合策略来实现。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants