Skip to content

这个怎么卖空啊 #65

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

Closed
wx2480 opened this issue May 9, 2020 · 3 comments
Closed

这个怎么卖空啊 #65

wx2480 opened this issue May 9, 2020 · 3 comments
Labels
invalid This is not a (valid) bug report

Comments

@wx2480
Copy link

wx2480 commented May 9, 2020

Expected Behavior

Actual Behavior

Steps to Reproduce

Additional info

  • Backtesting version:
@kernc
Copy link
Owner

kernc commented May 9, 2020

Please add more information to your issue report, preferably in English. 😬

@wx2480
Copy link
Author

wx2480 commented May 10, 2020

How do you short a stock,and if i want to use a fifth of the money to buy stocks, how can i achieve it?

@kernc
Copy link
Owner

kernc commented Jul 15, 2020

With #47 merged and 0.2.0 released, you can short using one fifth of equity with:

class MyStrategy(Strategy):
   ...
   def next(self):
       ...
       self.sell(size=.2)

@kernc kernc closed this as completed Jul 15, 2020
@kernc kernc added invalid This is not a (valid) bug report question Not a bug, but a FAQ entry labels Jul 15, 2020
@kernc kernc removed the question Not a bug, but a FAQ entry label Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This is not a (valid) bug report
Projects
None yet
Development

No branches or pull requests

2 participants