org.akutan.optimization.test
Class PortOptTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.akutan.optimization.test.PortOptTest
All Implemented Interfaces:
junit.framework.Test

public class PortOptTest
extends junit.framework.TestCase

This JUnit test uses a simple test case from Fabozzi's book on Robust Optimization, p353, to test my ActiveSet and InteriorPoint solvers.

Since:
7 Nov 2007

Constructor Summary
PortOptTest(java.lang.String name)
          Constructs
 
Method Summary
protected  cern.colt.matrix.DoubleMatrix1D getReturns()
          Returns the test case asset mean returns
protected  cern.colt.matrix.DoubleMatrix2D getVariances()
          Returns the test case asset covariance matrix
protected  void setUp()
           
protected  void tearDown()
           
 void testActiveSet()
          Test case for the active set target return optimizer
 void testActiveSetUtility()
          This test case for the Active Set fixed utility optimization code.
 void testInteriorPoints()
          Test case for my quadratix interior points optimization
 void testInteriorPointUtility()
          This test case from the Fabozzi book on Robust Optimization, p353, but needed to be modified so that we solve for a fixed utility - 5.061
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortOptTest

public PortOptTest(java.lang.String name)
Constructs

Parameters:
name - The name of the JUnit tests
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

getReturns

protected cern.colt.matrix.DoubleMatrix1D getReturns()
Returns the test case asset mean returns

Returns:
Test returns

getVariances

protected cern.colt.matrix.DoubleMatrix2D getVariances()
Returns the test case asset covariance matrix

Returns:
Test variances

testActiveSet

public void testActiveSet()
Test case for the active set target return optimizer


testActiveSetUtility

public void testActiveSetUtility()
This test case for the Active Set fixed utility optimization code. Note that this case had to be computed from the fixed return solution.


testInteriorPoints

public void testInteriorPoints()
Test case for my quadratix interior points optimization


testInteriorPointUtility

public void testInteriorPointUtility()
This test case from the Fabozzi book on Robust Optimization, p353, but needed to be modified so that we solve for a fixed utility - 5.061