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

No margin call and backtest continue when balance touches zero #5691

Closed
4 tasks done
LouisSzeto opened this issue Jun 22, 2021 · 1 comment
Closed
4 tasks done

No margin call and backtest continue when balance touches zero #5691

LouisSzeto opened this issue Jun 22, 2021 · 1 comment
Assignees
Labels

Comments

@LouisSzeto
Copy link
Collaborator

LouisSzeto commented Jun 22, 2021

Expected Behavior

Suppose we cannot put additional cash when margin calls (at least for now), the existing positions shall all be immediately liquidated and all opening orders shall be cancelled. The portfolio return shall not be lower than -100%.

Actual Behavior

It will still proceed backtesting, execute existing open orders if rebounce up above zero at ending of the same slice .

Potential Solution

Check the portfolio value is lower than 0 not only for end of slice, but also open or low.

Reproducing the Problem

The backtest on this post in discussion

System Information

N/A

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue
@jaredbroad
Copy link
Member

Closing as relatively low impact. Use higher grain resolution to avoid the issue.

@jaredbroad jaredbroad closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants