Re: [ojAlgo-user] Markowitz Problem
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <an...@op...> - 2014-01-16 21:42:40
|
I see the same behavior. It alternates between to different "solutions". You can't set "target return" to more than what any individual asset returns. In your case the assets return 4% and 13%, but you set the target return to 20%. You should call getOptimisatinState() to check the validity of the solution. In this case it returns APPROXIMATE which indicates that the solution may not be feasible. One of the solutions doesn't reach the target return (which is a constraint) and the other violates the asset class limits (but does reach the target return). /Anders On 16 jan 2014, at 21:23, Cristian Bissattini <cri...@ho...> wrote: > > Using Markowitz model, I have a problem with this simple portfolio. Sometimes the algorithm doesn’t respect the asset class limits (lower and upper limit). The correlation matric is of course positive defined. > > org.ojalgo.matrix.PrimitiveMatrix < 2 x 2 > > { { 0.0036, -0.0054 }, > { -0.0054, 0.0324 } } > Return Matrix:org.ojalgo.matrix.PrimitiveMatrix < 2 x 1 > > { { 0.04 }, > { 0.13 } } > =======result==================== > -0.7778 > 1.7778 > =======result==================== > 0.200002 > 0.119514408912 > > This problem seems to appear randomly… sometimes it works correctly and sometimes doesn’t work. > > Please find enclosed the java example. > > Could you give me more info? > > Best Regards, > Cristian > > > > <TestEquilibrium.java>------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |