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

MPO with monotonic trade direction #36

Open
kch382001 opened this issue Sep 9, 2019 · 1 comment
Open

MPO with monotonic trade direction #36

kch382001 opened this issue Sep 9, 2019 · 1 comment

Comments

@kch382001
Copy link

I have a question. If we use MPO in liquidation context with alpha estimation. Say
if my initial position is: long symbol A and short symbol B, and I have some short-term alpha estimate.
I want o liquidate this portfolio without buying extra A or selling B in the interim period. Basically I want the trade in A going monotonic --- keep selling A, and the trade in B going monotonic --- keeping buying B, in each of the interim period until I fully liquidate the portfolio.
How can I set up constraint?

@kch382001
Copy link
Author

Looks like cvx.multiply(z[:-1], np.sign(initial_position))<=0 will do the job. (assuming initial_position does not have Cash position)

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

No branches or pull requests

1 participant