Re: [ojAlgo-user] MarkowitzModel - what is optimal?
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <an...@op...> - 2013-10-24 19:40:03
|
Have you read the javadoc for the MarkowitzModel class and its methods? I think it does specify how it optimizes. The results you describe seems "wrong" but without a test case where I can see exactly what you do I cannot comment. If you don't like the MarkowitzModel class you can build your own optimization models directly using ExpressionsBasedModel http://ojalgo.org/generated/org/ojalgo/optimisation/ExpressionsBasedModel.html /Anders On 24 okt 2013, at 11:09, Anthony Edwards <ant...@al...> wrote: > Hi > > I’m still no nearer in understanding from any of the documentation or javadocs what is optimal. When I specify a target return, I get a set of weights and various stats like ShapreRatio, Variance etc. What is the optimiser maximising/minimising to arrive at this portfolio? Is it maximising the sharp? or maximising mean return / variance? > > We are trying (with no joy at all) to compare an excel based solver with ojalgo, but cant get anywhere near the same results for the same inputs ..... > > Below is the covar and expected returns > > Covar() > 7.84% 1.09% 0.26% 0.15% -0.75% > 1.09% 1.06% 0.91% 0.76% -0.07% > 0.26% 0.91% 1.94% 0.98% 0.19% > 0.15% 0.76% 0.98% 0.80% -0.07% > -0.75% -0.07% 0.19% -0.07% 2.12% > er[0] --> 0.08468993625647991 > er[1] --> 0.05571192270463743 > er[2] --> -0.053384899277547415 > er[3] --> 0.0363486250229359 > er[4] --> -0.10226497575724715 > > The highest mean return solution we get is 4.4% with limits set at 0 to 0.5 for all 5 assets. Clearly that is wrong. There is obviously a solution at the mean of 8.4% and 5.5% with 50% in assets 1 and 2 and the other weights at zero. When I run for a higher target return there is no optimal solution (and weights that outside limits then). The covar looks ok, the expected returns look ok, all assets are limited weights from 0 to 0.5 and the only variable I can control is the targetReturn(), so I’m at a loss here to know what else I can do. > > Any ideas? Thanks in advance ... > > Tony > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |