Serving the Quantitative Finance Community

 
User avatar
Shtrauss
Topic Author
Posts: 1
Joined: October 26th, 2009, 3:06 am

Translating nonlinear to linear constraint

April 6th, 2011, 6:00 am

HIis it possible to represent the constraint(1) SUM{x(i)*I(x(i)>0)}<1in the form(2) SUM{a(i)*x(i)}<bwhere x(i) are variables on [-1,1], a(i) and b are real, and we are allowed to represent (1) with several equations of the type (2), and I(.) is an indicator function for event (.).if this is impossible, how do i show that it is impossible?background: trying to implement non-linear optimisation constraint in solve.QP in R (all long weights less than some number, e.g. 1)
Last edited by Shtrauss on April 5th, 2011, 10:00 pm, edited 1 time in total.
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Translating nonlinear to linear constraint

April 7th, 2011, 9:00 pm

If the number of possible sets L of long weights is not too outrageous, you couldstep through them one by one. For each, caclulate your objective function usingx(i) > 0; i in Lsum(i in L) x(i) < 1which meets your criteria. Then, one of these sets L* had the best objective value, so that set is the answer. For example, for N securities, I believe there are 2^N such sets to test. Also, inspection of the problem,perhaps after trying a few sets, might reduce the number of candidates considerably.
Last edited by Alan on April 6th, 2011, 10:00 pm, edited 1 time in total.
 
User avatar
Shtrauss
Topic Author
Posts: 1
Joined: October 26th, 2009, 3:06 am

Translating nonlinear to linear constraint

April 8th, 2011, 5:02 am

Excellent, will def try to implement this!! my dimension is only small, so suits the purpose perfectlyThanks a lot!!! (btw, takes 130 milliseconds in 6 dimensions)
Last edited by Shtrauss on April 18th, 2011, 10:00 pm, edited 1 time in total.