Re: [ojAlgo-user] Markowitz optimisation
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <an...@op...> - 2008-01-17 08:25:43
|
On 17 jan 2008, at 01.38, Arthur McGibbon wrote: > Hi Anders, > > thanks for your reply and the link. > > I am indeed trying to maximise sharpe ratio (at zero risk free > rate) using your library. > > I can run the MarkowitzModel.calculatePortfolioWeights method fine > as is but I'm trying to apply weighting constraints to the assets > (limits of 5% -> 55% with 10 assets). I looked in the > MarkowitzModel code and saw that the limitation on shorting was > applied by using the setLowerLimit(ZERO) on the variables and > assumed that I could use the same method in conjunction with the > setUpperLimit (passing values of 0.05 and 0.55) however this > results in NullPointerException on certain combinations of returns. Can you give me a code example that generates a NullPointerException? > I mentioned Risk Aversion Factor before because I assumed my error > was there as some RAFs generated exceptions and some didn't but it > looks as though my assumption on how to apply weighting limits was > incorrect so could you tell me whether it's possible to apply min > and max weighting limits to the assets using ojAlgo? I don't think your assumption is wrong, and I'd like to know about those exceptions. Give me code snippets that I can run. /Anders > -----Original Message----- >> From: oja...@li... > [mailto:oja...@li...]On Behalf Of Anders > Peterson > Sent: 16 January 2008 22:41 > To: oja...@li... > Subject: Re: [ojAlgo-user] Markowitz optimisation > > > On 16 jan 2008, at 15.36, Arthur McGibbon wrote: >> Hi, >> >> I've been using the MarkowitzModel code to optimise the weighting >> across assets within a portfolio but what I ideally want is the >> weights for the maximum return/risk ratio possible with the >> constraints passed (i.e. the maximum slope on the efficient >> frontier going through the origin). >> > http://en.wikipedia.org/wiki/ > Modern_portfolio_theory#The_market_portfolio >> Is it possible to use the QuadraticModel to solve for this maximum >> given the expected returns and covariance matrices? >> If so - could you give me some pointers on how to do this? >> Also - would this lead to not using a Risk Aversion Factor as the >> maximum return/risk ratio should lead to a single point on the line >> or have I got the wrong idea about what the Risk Aversion Factor is? >> > I think you're the one who should know which (mathematical) problem > you want to solve. > > When if you have more specific questions related to ojAlgo source > code I'll be glad to try and help. > > /Anders > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > ******************************************************************** > This message and any attachment are confidential. If you are not > the intended recipient please contact the sender, delete this > message and any attachment from your system and do not disclose, > copy or distribute the contents to any other person. Beach Horizon > LLP (Beach Horizon) is not responsible for any information > contained in this email. Beach Horizon reserves the right to > monitor all email messages passing through its network. > ******************************************************************** > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |