Libor.LiborProcess
Class JR_FactorLoadingTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byLibor.LiborProcess.JR_FactorLoadingTest
All Implemented Interfaces:
junit.framework.Test

public class JR_FactorLoadingTest
extends junit.framework.TestCase

Class of unit tests for the class CS_FactorLoading in the jUnit testing framework.


Constructor Summary
JR_FactorLoadingTest(java.lang.String testName)
          Constructor.
 
Method Summary
static junit.framework.Test factorLoadingTestSuite()
          Returns the test suite object which is then run in one of the test suite runners juint.textui.TestRunner or junit.swingui.TestRunner.
static void main(java.lang.String[] args)
          run the tests in a Swing GUI
protected  void setUp()
          Set up the test fixture.
protected  void tearDown()
          Do nothing on tearDown since none of the tests alters the basic data.
 void testCholeskyRootMatrixSequence()
          Sets up the array L[t] of Cholesky roots of the log-covariation-matrices.
 void testCorrelationMatrix()
          Test if the correlation matrix is symmetric and positive definite
 void testCovariationIntegrals()
          Test the analytic covariation integrals against QMC numerical values.
 void testCovariationMatrixSequence()
          Sets up the array CV[t] of log-covariation-matrices.
 void testLogCovariationMatrices()
          Tests if the log-covariation-matrix is symmetric and positive definite.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JR_FactorLoadingTest

public JR_FactorLoadingTest(java.lang.String testName)
Constructor.

Method Detail

setUp

protected void setUp()
Set up the test fixture.


tearDown

protected void tearDown()
Do nothing on tearDown since none of the tests alters the basic data.


factorLoadingTestSuite

public static junit.framework.Test factorLoadingTestSuite()
Returns the test suite object which is then run in one of the test suite runners juint.textui.TestRunner or junit.swingui.TestRunner.


testCorrelationMatrix

public void testCorrelationMatrix()
Test if the correlation matrix is symmetric and positive definite


testCovariationIntegrals

public void testCovariationIntegrals()
Test the analytic covariation integrals against QMC numerical values.


testLogCovariationMatrices

public void testLogCovariationMatrices()
Tests if the log-covariation-matrix is symmetric and positive definite.


testCovariationMatrixSequence

public void testCovariationMatrixSequence()

Sets up the array CV[t] of log-covariation-matrices. Checks the matrix CV[t] for t=n/2.

Note: this test takes about 25 seconds (n=40). Setting up the covariation matrix array is the culprit.


testCholeskyRootMatrixSequence

public void testCholeskyRootMatrixSequence()

Sets up the array L[t] of Cholesky roots of the log-covariation-matrices. Checks the matrix L[t] for t=n/2.

Note: this test takes about 30 seconds (n=40). Setting up the Cholesky root matrix array is the culprit.


main

public static void main(java.lang.String[] args)
run the tests in a Swing GUI