Documentation of 'umontreal.iro.lecuyer.stochprocess.GeometricBrownianMotion' Java class
GeometricBrownianMotion
umontreal.iro.lecuyer.stochprocess

Class GeometricBrownianMotion



  • public class GeometricBrownianMotion
    extends StochasticProcess
    . Represents a geometric Brownian motion (GBM) process {S(t), t >= 0}, which evolves according to the stochastic differential equation

    dS(t) = μS(t)dt + σS(t)dB(t),

    where μ and σ are the drift and volatility parameters, and {B(t), t >= 0} is a standard Brownian motion (for which B(t)∼N(0, t)). This process can also be written as the exponential of a Brownian motion:

    S(t) = S(0)exp[(μ - σ2/2)t + σtB(t)] = S(0)exp[X(t)],

    where X(t) = (μ - σ2/2)t + σtB(t). The GBM process is simulated by simulating the BM process X and taking the exponential. This BM process is stored internally.
    • Constructor Detail

      • GeometricBrownianMotion

        public GeometricBrownianMotion(double s0,
                                       double mu,
                                       double sigma,
                                       RandomStream stream)
        Same as GeometricBrownianMotion (s0, mu, sigma, new BrownianMotion (0.0, 0.0, 1.0, stream)).
      • GeometricBrownianMotion

        public GeometricBrownianMotion(double s0,
                                       double mu,
                                       double sigma,
                                       BrownianMotion bm)
        Constructs a new GeometricBrownianMotion with parameters μ = mu, σ = sigma, and S(t0) = s0, using bm as the underlying BrownianMotion. The parameters of bm are automatically reset to μ - σ2/2 and σ, regardless of the original parameters of bm. The observation times are the same as those of bm. The generation method depends on that of bm (sequential, bridge sampling, PCA, etc.).
    • Method Detail

      • setObservationTimes

        public void setObservationTimes(double[] t,
                                        int d)
        Description copied from class: StochasticProcess
        Sets the observation times of the process to a copy of T, with t0 = T[0] and td = T[d]. The size of T must be d + 1.
        Overrides:
        setObservationTimes in class StochasticProcess
      • nextObservation

        public double nextObservation()
        Description copied from class: StochasticProcess
        Generates and returns the next observation X(tj) of the stochastic process. The processes are usually sampled sequentially, i.e. if the last observation generated was for time tj-1, the next observation returned will be for time tj. In some cases, subclasses extending this abstract class may use non-sequential sampling algorithms (such as bridge sampling). The order of generation of the tj's is then specified by the subclass. All the processes generated using principal components analysis (PCA) do not have this method.
        Overrides:
        nextObservation in class StochasticProcess
      • generatePath

        public double[] generatePath()
        Description copied from class: StochasticProcess
        Generates, returns, and saves the sample path {X(t0), X(t1),…, X(td)}. It can then be accessed via getPath, getSubpath, or getObservation. The generation method depends on the process type.
        Specified by:
        generatePath in class StochasticProcess
      • resetStartProcess

        public void resetStartProcess()
        Same as in StochasticProcess, but also invokes resetStartProcess for the underlying BrownianMotion object.
        Overrides:
        resetStartProcess in class StochasticProcess
      • setParams

        public void setParams(double s0,
                              double mu,
                              double sigma)
        Sets the parameters S(t0) = s0, μ = mu and σ = sigma of the process. Warning: This method will recompute some quantities stored internally, which may be slow if called repeatedly.
      • getMu

        public double getMu()
        Returns the value of μ.
      • getSigma

        public double getSigma()
        Returns the value of σ.
      • getBrownianMotion

        public BrownianMotion getBrownianMotion()
        Returns a reference to the BrownianMotion object used to generate the process.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.