From: Jim McLoughlin <jimmcloughlin_at_earthlink.net>

Date: Tue 03 May 2005 - 06:06:28 EST

*>>> hi,
*

*>>>
*

>>> i want to execute the following opimization problem:

*>>> max r*w
*

*>>> s.t.: w*z=1 # sum of w is 1
*

*>>> r, w are [nx1] vectors, z is a [nx1] vector consisting of 1
*

*>>> so far so good, works fine with lp
*

*>>>
*

*>>> the problem arises with the additional restriction
*

*>>> w' * V * w
*

*>>> where V is a [nxn] matrix
*

*>>> how can i include this restriction since w arises twice?
*

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue May 03 06:13:24 2005

Date: Tue 03 May 2005 - 06:06:28 EST

The form of the problem looks like you are trying to do a mean-variance portfolio optimization. If that is the case, you should not be dealing with variance as a restriction, but as part of the objective function:

max (r'*w - rho*w'*V*w)

s.t. sum(w) == 1

where rho is a risk aversion parameter.

You can solve this as a quadratic programming problem using either 1) solve.QP from the quadprog package; 2) portfolio.optim in package tseries

see http://tolstoy.newcastle.edu.au/R/help/05/01/10505.html for details on how to use the two.

>> On Sunday 01 May 2005 19:21, Gottfried Gruber wrote:

>>> i want to execute the following opimization problem:

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue May 03 06:13:24 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:31:32 EST
*