[ojAlgo-user] quadratic minimization example
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Charley S. <cha...@ya...> - 2011-06-30 00:31:29
|
I'm working on a portfolio optimization problem, using QP to find the optimal weight (allocation) of each asset in the portfolio. My objective is to minimize variance: find the optimal portfolio weights for the Minimum Variance Portfolio (MVP). Here's an example in R of what I'm trying to do in Java: http://quantivity.wordpress.com/2011/04/17/minimum-variance-portfolios/ My inputs are an n x n covariance matrix (where n is the number of assets in the portfolio), which I've calculated from the known asset returns. The two constraints are: sum of the portfolio weights must add up to 1.0 (allocate all available capital), and all weights must be >= 0 (no shorting allowed). Could someone please provide (or point me to) some Java code how to do this in ojAlgo (using its quadratic solver)? Thank you, Charley |