org.akutan.optimization
Class StatePreference

java.lang.Object
  extended by org.akutan.optimization.StatePreference

public class StatePreference
extends java.lang.Object


Nested Class Summary
 class StatePreference.Summary
          Class which holds a summary of the state of a simulation.
 
Constructor Summary
StatePreference(int bin)
          Constructs
 
Method Summary
protected  cern.colt.matrix.DoubleMatrix1D getReturns()
          Returns the expected return vector
protected  cern.colt.matrix.DoubleMatrix1D getStdDev()
          Returns the measured standard deviation vector
static void main(java.lang.String[] args)
          Tests the StatePreference concept given the data from Satchell and Scowcroft chaptrer 12
 cern.colt.matrix.DoubleMatrix2D simulate(int num, cern.colt.matrix.DoubleMatrix1D er, cern.colt.matrix.DoubleMatrix2D covar)
          Called to simulate some results, note that we do not have a covariance matrix for this example so we are basically assuming a correlation of 0 between the various elements.
 StatePreference.Summary summarize(cern.colt.matrix.DoubleMatrix2D assetStates)
          Given the raw simulation data, we compute mean vector and covariance matrix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatePreference

public StatePreference(int bin)
Constructs

Parameters:
bin - Number of bins
Method Detail

getReturns

protected cern.colt.matrix.DoubleMatrix1D getReturns()
Returns the expected return vector

Returns:
Expected returns vector for example

getStdDev

protected cern.colt.matrix.DoubleMatrix1D getStdDev()
Returns the measured standard deviation vector

Returns:
Standard Deviation vector for example

simulate

public cern.colt.matrix.DoubleMatrix2D simulate(int num,
                                                cern.colt.matrix.DoubleMatrix1D er,
                                                cern.colt.matrix.DoubleMatrix2D covar)
Called to simulate some results, note that we do not have a covariance matrix for this example so we are basically assuming a correlation of 0 between the various elements.

Parameters:
num - Number of simulations
er - Vector of mean expected returns
covar - Matrix of covariances of the asset returns
Returns:
Matrix of the results, num x er.size

summarize

public StatePreference.Summary summarize(cern.colt.matrix.DoubleMatrix2D assetStates)
Given the raw simulation data, we compute mean vector and covariance matrix

Parameters:
assetStates - Matrix of assetStates # of simulations x # of assets
Returns:
Summary information for the simulated asset states

main

public static void main(java.lang.String[] args)
Tests the StatePreference concept given the data from Satchell and Scowcroft chaptrer 12

Parameters:
args - Command line arguments (ignored)