Re: [ojAlgo-user] Markowitz Model Problem
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Ruan W. <is0...@ma...> - 2009-01-15 05:14:34
|
<HTML> <HEAD> <META content="text/html; charset=gb2312" http-equiv=Content-Type> <META content="OPENWEBMAIL" name=GENERATOR> </HEAD> <BODY bgColor=#ffffff> <font size="2"> <p> <br />Thank you for your response. <br /> <br />Here's my model's detail: <br /> <br />[AE]={1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} </p> <p> <br />[be]={1.0} </p> <p> <br />[Q]={3.048907897157133E-4, 1.6671472561019247E-4, 4.4500080981934345E-4, -5.389129745055723E-4, -2.6090705011393183E-4, -1.2633284900760366E-4, -6.485428846447651E-7}, <br />{1.6671472561019247E-4, 2.341985572849691E-4, 2.9113916450678265E-4, -4.5760873539850514E-4, 1.3078636134987255E-5, -2.354289901013046E-5, -7.578030042426654E-7}, <br />{4.4500080981934345E-4, 2.9113916450678265E-4, 7.46023915996829E-4, -0.0010247176498305568, -2.6745504327902895E-4, -1.6563544154823496E-4, -8.293698990696063E-7}, <br />{-5.389129745055723E-4, -4.5760873539850514E-4, -0.0010247176498305568, 0.001754169535149865, 2.0293065310212377E-4, 2.1401092557826588E-4, 1.0252846778608953E-7}, <br />{-2.6090705011393183E-4, 1.3078636134987255E-5, -2.6745504327902895E-4, 2.0293065310212377E-4, 4.632320892679136E-4, 1.7969731066037214E-4, 2.4953495129362833E-8}, <br />{-1.2633284900760366E-4, -2.354289901013046E-5, -1.6563544154823496E-4, 2.1401092557826588E-4, 1.7969731066037214E-4, 8.346410612364995E-5, -7.02099350897589E-8}, <br />{-6.485428846447651E-7, -7.578030042426654E-7, -8.293698990696063E-7, 1.0252846778608953E-7, 2.4953495129362833E-8, -7.02099350897589E-8, 8.367244992498656E-9}}</p> <p>[c]={{0.010638291263564232}, <br />{0.013500370827906071}, <br />{0.011390037735101773}, <br />{0.010385042339767682}, <br />{3.812208389845893E-4}, <br />{0.002315505853720011}, <br />{0.0}} </p> <p> <br />[AI]={{1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, <br />{0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0}, <br />{0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0}, <br />{0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}, <br />{0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0}, <br />{0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0}, <br />{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0}, <br />{-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, <br />{0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0}, <br />{0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0}, <br />{0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0}, <br />{0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0}, <br />{0.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0}, <br />{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0}} <br /></p> <p>[bi]={{1.0}, <br />{1.0}, <br />{1.0}, <br />{1.0}, <br />{1.0}, <br />{1.0}, <br />{1.0}, <br />{0.0}, <br />{0.0}, <br />{0.0}, <br />{0.0}, <br />{0.0}, <br />{0.0}, <br />{0.0}} <br /></p> <p>And here's the result:</p> <p>-0.25 <br />-0.25 <br />-0.25 <br />-0.25 <br />0.75 <br />0.75 <br />0.75</p> <p>And i found that if i change the nagetive ExceptedReturn to positive, the result will be fine.</p> <p> <br />On Wed, 14 Jan 2009 09:27:53 +0100, Anders Peterson wrote <br />> How small are the negative values? <br />> <br />> Give me a unit test (something that I can easily integrate with the <br />> existing junit tests) that shows what you do, and where/how you <br />> think it goes wrong. <br />> <br />> /Anders <br />> <br />> On 14 jan 2009, at 03.58, Ruan Weichao wrote: <br />> <br />> > <br />> > Hi, <br />> > <br />> > I use the Markowitz model to calculate the optimize some assets' <br />> > weights, <br />> > <br />> > and set all the assets' lowerlimit with Zero and set all the <br />> > upperlimits with <br />> > <br />> > One, but it turns out with some negative value which are little <br />> > than Zero, it <br />> > <br />> > seems that the lowerlimit does not work. <br />> > <br />> > So I want to ask what should I do it to confirm the lowerlimit? <br />> > <br />> > -- <br />> > Best regards <br />> > <br />> > weichao <br />> > <br />> > ---------------------------------------------------------------------- <br />> > -------- <br />> > This SF.net email is sponsored by: <br />> > SourcForge Community <br />> > SourceForge wants to tell your story. <br />> > <a href="http://p.sf.net/sfu/sf-spreadtheword" target="_blank">http://p.sf.net/sfu/sf-spreadtheword</a> <br />> > _______________________________________________ <br />> > ojAlgo-user mailing list <br />> > ojA...@li... <br />> > <a href="https://lists.sourceforge.net/lists/listinfo/ojalgo-user" target="_blank">https://lists.sourceforge.net/lists/listinfo/ojalgo-user</a> <br />> > <br />> > <br />> <br />> ---------------------------------------------------------------------------- <br />-- <br />> This SF.net email is sponsored by: <br />> SourcForge Community <br />> SourceForge wants to tell your story. <br />> <a href="http://p.sf.net/sfu/sf-spreadtheword" target="_blank">http://p.sf.net/sfu/sf-spreadtheword</a> <br />> _______________________________________________ <br />> ojAlgo-user mailing list <br />> ojA...@li... <br />> <a href="https://lists.sourceforge.net/lists/listinfo/ojalgo-user" target="_blank">https://lists.sourceforge.net/lists/listinfo/ojalgo-user</a> <br /> <br /> <br />-- <br />Best regards <br /></p> </font> </BODY> </HTML> |