org.akutan.faj.covariance
Class Stambaugh

java.lang.Object
  extended by org.akutan.faj.covariance.Stambaugh

public class Stambaugh
extends java.lang.Object

This class implements the method of Stambaugh for adjusting the mean and covariance of a shorter return series based on that series beta to one or more longer return series. TODO Add a reference to Stambaugh's paper and to FAJ

Since:
26 September 2006

Constructor Summary
Stambaugh()
           
 
Method Summary
static void main(java.lang.String[] args)
          Provides a simple test case of the Stambaugh algorithm TODO add results which are supposed to be generated
protected static void stambuagh(int n, cern.colt.list.DoubleArrayList[] returns, cern.colt.matrix.DoubleMatrix1D naiveMean, cern.colt.matrix.DoubleMatrix2D naiveCovar, cern.colt.matrix.DoubleMatrix1D improvedMean, cern.colt.matrix.DoubleMatrix2D improvedCovar)
          Implements the method of Stambaugh to process a set of return series of different lengths in order to create a robust mean and covariance matrix for all the series.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stambaugh

public Stambaugh()
Method Detail

stambuagh

protected static void stambuagh(int n,
                                cern.colt.list.DoubleArrayList[] returns,
                                cern.colt.matrix.DoubleMatrix1D naiveMean,
                                cern.colt.matrix.DoubleMatrix2D naiveCovar,
                                cern.colt.matrix.DoubleMatrix1D improvedMean,
                                cern.colt.matrix.DoubleMatrix2D improvedCovar)
Implements the method of Stambaugh to process a set of return series of different lengths in order to create a robust mean and covariance matrix for all the series. It essentially uses a shrinkage approach to adjust the mean/covariance of the shorter series based on their beta to the longer series. It is a simple stateless algorithm so it has been implemented as a single static entry point. The naive mean is computed for the time series using each point in the series. The naive covariance is computed using the valid pairs.

Parameters:
n -
returns -
naiveMean - Contains the naive input vector of returns
naiveCovar - Contains the naive input covariance matrix
improvedMean - Contains the vector of updated means
improvedCovar - Contains the output covariance matrix

main

public static void main(java.lang.String[] args)
Provides a simple test case of the Stambaugh algorithm TODO add results which are supposed to be generated

Parameters:
args -