org.akutan.optimization
Class LedoitWolfSolver

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

public class LedoitWolfSolver
extends ReturnSolver
implements Solver

This class encapsulates an example of solving for the optimal portfolio using the shrinkage model described in "Honey I Shrunk the Covariance Matrix", by Ledoit and Wolf, 2003.

Since:
30 July 2007

Field Summary
protected  java.util.List<EfficientFrontier.SampleData> _samplePoints
           
protected  java.text.DecimalFormat df
           
protected  cern.colt.matrix.DoubleMatrix2D orig_V
           
 
Constructor Summary
LedoitWolfSolver(cern.colt.matrix.DoubleMatrix1D e_r, cern.colt.matrix.DoubleMatrix2D V_p, java.util.List<EfficientFrontier.SampleData> samplePoints)
          Constructs
 
Method Summary
protected  java.lang.String formatOutput(int ct, double ra, cern.colt.matrix.DoubleMatrix1D x, cern.colt.matrix.DoubleMatrix1D e_r, cern.colt.matrix.DoubleMatrix2D V)
          Override method in ActiveSet so that we can use the un-shrunk E(r) and V
protected  SolvedPoint makePoint(double ra, cern.colt.matrix.DoubleMatrix1D x, cern.colt.matrix.DoubleMatrix1D e_r, cern.colt.matrix.DoubleMatrix2D V)
          Override method in ActiveSet so that we can use the un-shrunk E(r) and V
protected  void shrink()
          Implements the shrinkage algorithm from Ledoit and Wolf, 2003.
 
Methods inherited from class org.akutan.optimization.ReturnSolver
cleanConstraints, initialGuess, solve, solveForReturn
 
Methods inherited from class org.akutan.optimization.ActiveSetSolver
algorithm, dumpConstraints, generateConstraints, generateValues, initialGuess, make2D, setMatrix, setMatrix, solve, solveSingle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.akutan.optimization.Solver
solve
 

Field Detail

df

protected final java.text.DecimalFormat df

orig_V

protected cern.colt.matrix.DoubleMatrix2D orig_V

_samplePoints

protected java.util.List<EfficientFrontier.SampleData> _samplePoints
Constructor Detail

LedoitWolfSolver

public LedoitWolfSolver(cern.colt.matrix.DoubleMatrix1D e_r,
                        cern.colt.matrix.DoubleMatrix2D V_p,
                        java.util.List<EfficientFrontier.SampleData> samplePoints)
Constructs

Method Detail

shrink

protected void shrink()
Implements the shrinkage algorithm from Ledoit and Wolf, 2003.


makePoint

protected SolvedPoint makePoint(double ra,
                                cern.colt.matrix.DoubleMatrix1D x,
                                cern.colt.matrix.DoubleMatrix1D e_r,
                                cern.colt.matrix.DoubleMatrix2D V)
Override method in ActiveSet so that we can use the un-shrunk E(r) and V

Overrides:
makePoint in class ActiveSetSolver

formatOutput

protected java.lang.String formatOutput(int ct,
                                        double ra,
                                        cern.colt.matrix.DoubleMatrix1D x,
                                        cern.colt.matrix.DoubleMatrix1D e_r,
                                        cern.colt.matrix.DoubleMatrix2D V)
Override method in ActiveSet so that we can use the un-shrunk E(r) and V

Overrides:
formatOutput in class ActiveSetSolver