org.akutan.optimization
Class UnconstrainedSolver
java.lang.Object
org.akutan.optimization.UnconstrainedSolver
- All Implemented Interfaces:
- Solver
public class UnconstrainedSolver
- extends java.lang.Object
- implements Solver
Created on Nov 3, 2005
Unconstrained solution to mean variance portfolio optimization.
Started with code from the applet at Campbell Harvey's website.
|
Field Summary |
protected cern.colt.matrix.DoubleMatrix1D |
_Er
|
protected cern.colt.matrix.DoubleMatrix2D |
_V
|
protected java.text.DecimalFormat |
df
|
|
Constructor Summary |
UnconstrainedSolver(cern.colt.matrix.DoubleMatrix1D e_r,
cern.colt.matrix.DoubleMatrix2D V)
Constructs |
|
Method Summary |
java.util.List<SolvedPoint> |
solve(java.util.List<Constraint> extraConstraints,
org.akutan.optimization.ProgressIndicator progress)
Solves for the efficient frontier given the returns and covariances
specified. |
cern.colt.matrix.DoubleMatrix1D |
solveForReturn(double r_e)
This method is called to solve the mostly unconstrained optimization problem
for a specific return. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
df
protected java.text.DecimalFormat df
_Er
protected cern.colt.matrix.DoubleMatrix1D _Er
_V
protected cern.colt.matrix.DoubleMatrix2D _V
UnconstrainedSolver
public UnconstrainedSolver(cern.colt.matrix.DoubleMatrix1D e_r,
cern.colt.matrix.DoubleMatrix2D V)
- Constructs
- Parameters:
e_r - Vector of asset mean expected returnsV - Matrix of asset covariance of returns
solve
public java.util.List<SolvedPoint> solve(java.util.List<Constraint> extraConstraints,
org.akutan.optimization.ProgressIndicator progress)
- Solves for the efficient frontier given the returns and covariances
specified.
- Specified by:
solve in interface Solver
- Parameters:
extraConstraints - Ignored (required for Solver)
- Returns:
- List of points on the efficient frontier
solveForReturn
public cern.colt.matrix.DoubleMatrix1D solveForReturn(double r_e)
- This method is called to solve the mostly unconstrained optimization problem
for a specific return.
- Parameters:
r_e - Expected return to solve for.
- Returns:
- Vector of the asset weights for the portfolio with return r_e.