cvxportfolio icon indicating copy to clipboard operation
cvxportfolio copied to clipboard

MPO with monotonic trade direction

Open kch382001 opened this issue 5 years ago • 1 comments

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 avatar Sep 09 '19 22:09 kch382001

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

kch382001 avatar Sep 18 '19 02:09 kch382001