org.akutan.optimization
Class UtilitySolver

java.lang.Object
  extended by org.akutan.optimization.ActiveSetSolver
      extended by org.akutan.optimization.UtilitySolver
All Implemented Interfaces:
Solver

public class UtilitySolver
extends ActiveSetSolver
implements Solver

Subclass of ActiveSetSolver that solves the mean variance portfolio optimization problem by minimizing the utility for a given risk aversion parameter. The utility function is the standard mean variance one.

Since:
3 Nov 2005

Field Summary
protected  cern.colt.matrix.DoubleMatrix1D _e_rx
           
protected  cern.colt.matrix.DoubleMatrix2D _V
           
 
Fields inherited from class org.akutan.optimization.ActiveSetSolver
df
 
Constructor Summary
UtilitySolver(cern.colt.matrix.DoubleMatrix1D e_r, cern.colt.matrix.DoubleMatrix2D V_p)
          Constructs the solver
 
Method Summary
 java.util.List<SolvedPoint> solve(java.util.List<Constraint> extraConstraints, org.akutan.optimization.ProgressIndicator progress)
          Called to return a list of points on the efficient frontier.
 SolvedPoint solveSingle(double lambda, cern.colt.matrix.DoubleMatrix1D e_rx, cern.colt.matrix.DoubleMatrix2D Vx, java.util.List<Constraint> constraints, java.util.Set<java.lang.Integer> equality, java.util.Set<java.lang.Integer> active, java.util.Set<java.lang.Integer> inactive)
          Active set code to optimize a single portfolio for a fixed return
 
Methods inherited from class org.akutan.optimization.ActiveSetSolver
algorithm, dumpConstraints, formatOutput, generateConstraints, generateValues, initialGuess, make2D, makePoint, setMatrix, setMatrix, solve, solveSingle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_e_rx

protected cern.colt.matrix.DoubleMatrix1D _e_rx

_V

protected cern.colt.matrix.DoubleMatrix2D _V
Constructor Detail

UtilitySolver

public UtilitySolver(cern.colt.matrix.DoubleMatrix1D e_r,
                     cern.colt.matrix.DoubleMatrix2D V_p)
Constructs the solver

Parameters:
e_r - Vector of Expected returns
V_p - Covariance matrix
Method Detail

solve

public java.util.List<SolvedPoint> solve(java.util.List<Constraint> extraConstraints,
                                         org.akutan.optimization.ProgressIndicator progress)
Called to return a list of points on the efficient frontier. Adds no short positions and budget constraints to the problem specified by the client.

Specified by:
solve in interface Solver
Parameters:
extraConstraints - Additional constraints applied by the client
Returns:
An ordered list of points on the efficient frontier, ordered from high risk to low risk.

solveSingle

public SolvedPoint solveSingle(double lambda,
                               cern.colt.matrix.DoubleMatrix1D e_rx,
                               cern.colt.matrix.DoubleMatrix2D Vx,
                               java.util.List<Constraint> constraints,
                               java.util.Set<java.lang.Integer> equality,
                               java.util.Set<java.lang.Integer> active,
                               java.util.Set<java.lang.Integer> inactive)
Active set code to optimize a single portfolio for a fixed return

Parameters:
lambda - Parameter which scales the risk aversion, but is specified linearly
e_rx - Expected returns vector
Vx - Covariance matrix
constraints - List of constraints
equality - Set of equality constraints
active - Set of initially active inequality constraints
inactive - Set of initially inactive inequality constraints
Returns:
The single point while has the maximum utility for this level of risk aversion