|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.akutan.optimization.SimulationSolver
public class SimulationSolver
This class encapsulates the simulation method described in the Farrely article from Journal of Investing, Winter 2006. It basically simulates the assets, compares portfolios to efficient frontiers and then builds a new efficient frontier.
| Field Summary | |
|---|---|
protected int |
_scenarios
|
protected java.text.DecimalFormat |
df
|
protected cern.colt.matrix.DoubleMatrix1D |
e_rx
|
protected cern.colt.matrix.DoubleMatrix2D |
V
|
| Constructor Summary | |
|---|---|
SimulationSolver(int scenarios,
cern.colt.matrix.DoubleMatrix1D e_r,
cern.colt.matrix.DoubleMatrix2D V_p)
Constructs |
|
| Method Summary | |
|---|---|
double |
distance(cern.colt.matrix.DoubleMatrix1D eR,
cern.colt.matrix.DoubleMatrix1D rW,
cern.colt.matrix.DoubleMatrix1D w,
double lambda)
Computes the distance between a reference portfolio (rW) and a test portfolio (w) for a given set of returns (eR) and a given lambda value. |
cern.colt.matrix.DoubleMatrix1D |
getOneReturn()
Called to get the return vector for one simulated return scenario, given that the returns are normally distributed with mean e_rx and variance V. |
java.util.List<SolvedPoint> |
solve(java.util.List<Constraint> constraints,
org.akutan.optimization.ProgressIndicator progress)
Evaluates the objective function across scenarios for a specific candidate solution. |
java.util.List<SolvedPoint> |
solveScenario(java.util.List<Constraint> constraints,
org.akutan.optimization.ProgressIndicator progress)
Called to solve for the efficient frontier for a given scenario |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.text.DecimalFormat df
protected int _scenarios
protected cern.colt.matrix.DoubleMatrix1D e_rx
protected cern.colt.matrix.DoubleMatrix2D V
| Constructor Detail |
|---|
public SimulationSolver(int scenarios,
cern.colt.matrix.DoubleMatrix1D e_r,
cern.colt.matrix.DoubleMatrix2D V_p)
scenarios - Number of scenarios to usee_r - vector of asset expected returnsV_p - Covariance matrix for assets| Method Detail |
|---|
public double distance(cern.colt.matrix.DoubleMatrix1D eR,
cern.colt.matrix.DoubleMatrix1D rW,
cern.colt.matrix.DoubleMatrix1D w,
double lambda)
eR - Expected returnsrW - Reference portfolio weightsw - Test portfolio weightslambda - exponent
public cern.colt.matrix.DoubleMatrix1D getOneReturn()
public java.util.List<SolvedPoint> solveScenario(java.util.List<Constraint> constraints,
org.akutan.optimization.ProgressIndicator progress)
constraints - List of constraints to be applied to the problem
public java.util.List<SolvedPoint> solve(java.util.List<Constraint> constraints,
org.akutan.optimization.ProgressIndicator progress)
solve in interface Solverconstraints - List of constraints to be applied to the problem
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||