try this (it's not GA):

https://r-forge.r-project.org/projects/deoptim/

Markowitz portfolio sample:

https://r-forge.r-project.org/scm/viewvc.php/*checkout*/pkg/DEoptim/inst/doc/SSRN_ID1590456.pdf?revision=22&root=deoptim

<https://r-forge.r-project.org/scm/viewvc.php/*checkout*/pkg/DEoptim/inst/doc/SSRN_ID1590456.pdf?revision=22&root=deoptim>Best
regards,
daniel



2011/1/22 Lui ## <lui.r.project@googlemail.com>

> Dear group,
>
> I was just wondering whether some of you have some experience with the
> package "rgenoud" which does provide genetic algorithms for complex
> optimization problems. How did you efficiently solve the constraints
> (sum of all weights <1, variance < target)? Setting the solution
> "infeasible" through if-clauses did not seem to be so promising ...
> The example below shows what I mean:
>
> (penalty-term)
>
> if (variance > targetvariance){
> penatly = -999999
> }
>
> "result" is to be maximized, the variance should not exceed a certain
> threeshold. To me, it seemed much better to add a penalty term like
>
> penalty = ( (abs(variance-targetvariance)/targetvariance)*100)^50
>
> What is your general experience? Did you ever try solving the
> Markowitz portfolio with the rgenoud package?
> I know that there are good solvers around for the qudratic programming
> problem of the markowitz portfolio, but I want to go into a different
> direction which translates into a quadratic problem with quadratic
> constraints (and I havent found a good solver for that...).
>
> I am interested in your replies! Have a good weekend!
>
> Lui
>
> _______________________________________________
> R-SIG-Finance@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]]

