Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking to optimize a portfolio maximizing expected return for a particular risk budget, but with absolute constraints on the individual instrument positions.

I've been experimenting with QP, but I was wondering if anyone could guide me to a suitable solution?

share|improve this question
When you say absolute constraints, what exactly do you mean? For instance, you could mean the positions are between -10% and +10% or you could mean that you take the absolute value of all the positions, sum them up and see it is equal to or less than some number. – John Aug 23 '13 at 16:22
I'm aware that the problem might be a bit unorthodox, but I mean absolute in terms of dollar market value. – user5980 Aug 27 '13 at 8:33
Your response does not clarify anything. The first thing I mentioned is completely basic (and equivalent to the absolute value of individual positions being less than 10%). It is the same as just putting lower and upper bounds on the variables and every QP optimizer I've seen allows it. The second is called a booksize constraint and requires more work to set up. You basically have to create auxiliary variables (with appropriate constraints) that represent the positive values and the negative values of the securities separately. Then just add together. – John Aug 27 '13 at 14:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.