Hi all, I am working on a large scale portfolio optimization problem with up to 500 assets. My objective function is simple w*returns - 1/2 * 1/constant * w * Matrix * w subject to sum(w) == 1 and w is a vector of weights with 0 <= w[i] <= 1 for all i = 1, ..., n. I have tried quadprog, alabama and DEoptim. What are your experiences with those and possibly other options? Thanks in advance!
Best optimizer for large scale problems
5 messages · Bastian Offermann, Dominykas Grigonis, Alexios Ghalanos +2 more
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20130606/e7debc4d/attachment.pl>
For quadratic problems you really should use quadprog. You can also try the 'parma' package which provides a nice interface to frame your problem and constraints and then solve it using either an LP, QP, NLP (with analytic derivatives) or GNLP formulation (depending on the intersection of problem and constraint type). Regards, Alexios
On 06/06/2013 08:58, Dominykas Grigonis wrote:
ROI::ROI_solve( problem, solver, control, ... ) DEoptim::DEoptim() # differential evolution! Rsolnp # general non-linear optimisation This is from my R conspects. Can try to take a look at those. For your problem quadprog might be the best option regarding speed. I like DEoptim a lot, but I use it for more complicated problems when I can not find simpler solution. Try adjusting parameters of it, it has 5 or 6 different approaches to the problem. Adding jitter helps in some cases(might slow process a bit, but not sure). I used it when I was optimising with respect to non-linear functions of portfolio evolution as drawdown. Kind regards,-- Dominykas Grigonis On Thursday, 6 June 2013 at 07:55, Bastian Offermann wrote:
Hi all, I am working on a large scale portfolio optimization problem with up to 500 assets. My objective function is simple w*returns - 1/2 * 1/constant * w * Matrix * w subject to sum(w) == 1 and w is a vector of weights with 0 <= w[i] <= 1 for all i = 1, ..., n. I have tried quadprog, alabama and DEoptim. What are your experiences with those and possibly other options? Thanks in advance!
_______________________________________________ R-SIG-Finance at r-project.org (mailto:R-SIG-Finance at r-project.org) mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
[[alternative HTML version deleted]]
_______________________________________________ R-SIG-Finance at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
On Thu, 06 Jun 2013, Bastian Offermann <bastian2507hk at yahoo.co.uk> writes:
Hi all, I am working on a large scale portfolio optimization problem with up to 500 assets. My objective function is simple w*returns - 1/2 * 1/constant * w * Matrix * w subject to sum(w) == 1 and w is a vector of weights with 0 <= w[i] <= 1 for all i = 1, ..., n. I have tried quadprog, alabama and DEoptim. What are your experiences with those and possibly other options? Thanks in advance!
You say you "have tried" these packages, so did you encounter any
specific problems? If yes, you should post some examples that
demonstrate these problems.
quadprog sounds reasonable, but if your covariance matrix is not
full-rank, quadprog's solve.QP will not work. (Which is actually more
an empirical than a computational problem. For example, there might be
no unique solution.) Other methods, such as Differential Evolution, do
not have such a constraint.
Regards,
Enrico
Enrico Schumann Lucerne, Switzerland http://enricoschumann.net
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20130606/779009c9/attachment.pl>