SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.stochasticprocess.univariate.integration.sde
Class Expectation

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.stochasticprocess.univariate.integration.sde.Expectation

public class Expectation
extends java.lang.Object

This class computes the expectation of a stochastic integral. It does so by Monte Carlo simulation over a discretized interval, compute the mean (the expectation) and the variance.


Field Summary
 double value
          the value of the integral
 double variance
          the variance of the integral
 
Constructor Summary
Expectation(Construction integrand, double x0, int N)
          Compute an expectation of a stochastic integral.
Expectation(SDE integrand, double T0, double T, int nT, double x0, int N)
          Compute an expectation of a stochastic integral.
 
Method Summary
 double value()
          Get the integral value.
 double variance()
          Get the integral variance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

public final double value
the value of the integral


variance

public final double variance
the variance of the integral

Constructor Detail

Expectation

public Expectation(Construction integrand,
                   double x0,
                   int N)
Compute an expectation of a stochastic integral.

Parameters:
integrand - a simulation of the integrand
x0 - the initial value
N - the number of simulations

Expectation

public Expectation(SDE integrand,
                   double T0,
                   double T,
                   int nT,
                   double x0,
                   int N)
Compute an expectation of a stochastic integral.

Parameters:
integrand - the integrand SDE
T0 - the beginning of the integral time interval
T - the ending of the integral time interval
nT - the number of sub-intervals in [T0, T], hence time interval discretization
x0 - the initial value
N - the number of simulations
Method Detail

value

public double value()
Get the integral value.

Returns:
the integral value

variance

public double variance()
Get the integral variance.

Returns:
the integral variance

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.