Re: [R] Constraint Optimization with constrOptim

2012-09-18 Thread Ravi Varadhan
Hi Raimund, You can use spg() in the BB package. This requires that you have a projection rule for projecting an infeasible point onto the simplex defined by: 0 = x = 1, sum(x) = 1. I show you here how to project onto the unit simplex. So, this is how your problem can be solved:

[R] Constraint Optimization with constrOptim

2012-09-17 Thread Raimund Grundböck
Hi, I am having trouble using constrOptim. My target is to do a portfolio optimization and there some constraints have to be fulfilled. 1) The weight of each share of the portfolio has to be greater than 0 2) The sum of these weights has to be 1 I am able to fulfill either the first or the