org.akutan.optimization
Class BayesSteinSolver
java.lang.Object
org.akutan.optimization.ActiveSetSolver
org.akutan.optimization.ReturnSolver
org.akutan.optimization.BayesSteinSolver
- All Implemented Interfaces:
- Solver
public class BayesSteinSolver
- extends ReturnSolver
- implements Solver
This class encapsulates an example of shrinking the returns and covariance
using Bayes-Stein shrinkage as descried in Jorion, 1986.
NOTE: As near as I can tell this code is correct, however I don't see
any improvements in the results when using this algorithm.
- Since:
- 24 February 2006
|
Field Summary |
protected java.text.DecimalFormat |
df
|
protected cern.colt.matrix.DoubleMatrix1D |
orig_Er
|
protected cern.colt.matrix.DoubleMatrix2D |
orig_V
|
|
Constructor Summary |
BayesSteinSolver(cern.colt.matrix.DoubleMatrix1D e_r,
cern.colt.matrix.DoubleMatrix2D V_p)
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()
This is the method that actually does the shrinking of the mean and covariance
and replaces the original inputs with the shrunk values. |
| 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 |
df
protected final java.text.DecimalFormat df
orig_Er
protected cern.colt.matrix.DoubleMatrix1D orig_Er
orig_V
protected cern.colt.matrix.DoubleMatrix2D orig_V
BayesSteinSolver
public BayesSteinSolver(cern.colt.matrix.DoubleMatrix1D e_r,
cern.colt.matrix.DoubleMatrix2D V_p)
- Constructs
shrink
protected void shrink()
- This is the method that actually does the shrinking of the mean and covariance
and replaces the original inputs with the shrunk values.
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