Class ExpectationAtEndTime


  • public class ExpectationAtEndTime
    extends Object
    This class computes the expectation (mean) and the variance of a stochastic process, by Monte Carlo simulation, at the end of an interval: \(E(X_T)\).
    • Constructor Detail

      • ExpectationAtEndTime

        public ExpectationAtEndTime​(RandomRealizationGenerator rrg,
                                    int nSims)
        Compute the expectation of a random process at the end time.
        Parameters:
        rrg - a generator of realizations of the random process
        nSims - the number of simulations
      • ExpectationAtEndTime

        public ExpectationAtEndTime​(RandomProcess process,
                                    int size,
                                    int nSims)
        Compute the expectation of a random process at the end time.
        Parameters:
        process - a random process
        size - the size of the realizations
        nSims - the number of simulations
      • ExpectationAtEndTime

        public ExpectationAtEndTime​(SDE sde,
                                    double T0,
                                    double T,
                                    int nT,
                                    double x0,
                                    int nSims)
        Compute the expectation of a stochastic SDE at the end time.
        Parameters:
        sde - the integrand SDE
        T0 - the begin of the time interval
        T - the end of the time interval
        nT - the number of sub-intervals in [T0, T]
        x0 - the initial value
        nSims - the number of simulations
    • Method Detail

      • value

        public double value()
        Get the expectation (the mean).
        Returns:
        the expectation
      • variance

        public double variance()
        Get the variance.
        Returns:
        the variance