Linear formulation of an absolute value constraint used to limit portfolio turnover

310 views
Skip to first unread message

MarkusLondon

unread,
Nov 30, 2016, 5:43:00 PM11/30/16
to cvxpy
I have two types of absolute value constraints

abs(Xi) <= U  

and

sum[abs(Xi)] <= U

which represent the cases where X= w-w0 , w0  denotes the current portfolio weights and w the targeted portfolio weights, so that the amount to be traded is x= w - w0. U is a threshold. Case one limits each individual entry, case two the overall turnover.
My question now is, can I transform these constraint into a linear formulation, case one can be split in positive results and negative results so I can correct the sign but this won't work for case two, or is there a way to mix linear and non-linear constraint and use a convex and socp solver in combination for example? 

thanks in advance


Steven Diamond

unread,
Nov 30, 2016, 7:50:01 PM11/30/16
to cvxpy
I'm not sure I understand your question. cvxpy will solve any problem that satisfies the DCP rules. It doesn't matter if it's in a standard form like an LP. Have you tried just writing your problem as you present it here?

MarkusLondon

unread,
Dec 1, 2016, 3:45:44 PM12/1/16
to cvxpy
Hi Steve,

my problem is that I already have constraints in the form of 

constraints = [sum_entries(w) == 1, w >= 0, w.T * beta == 0, etc.....]

now I will have to the turnover constraint 

 sum_entries(abs(w)) <= some threshold

as well, how can I combine the linear and non-linear ones or re-formulate them in a way that it will work?

Steven Diamond

unread,
Dec 1, 2016, 4:29:32 PM12/1/16
to cvxpy
It doesn't matter if the constraints  are linear or non-linear, only whether they are convex. Just write

constraints = [sum_entries(w) == 1, w >= 0, w.T * beta == 0,  sum_entries(abs(w)) <= some threshold, etc.....]

MarkusLondon

unread,
Dec 2, 2016, 3:56:00 AM12/2/16
to cvxpy
Hi Steve,

thanks for that I will give this a try, alternatively this should workaround should work as well.

max[ sum(w-w0), sum(w0-w)] <= some threshold


Reply all
Reply to author
Forward
0 new messages