Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.stochprocess
Class VarianceGammaProcessDiff

    java.lang.Object
      umontreal.iro.lecuyer.stochprocess.StochasticProcess
          umontreal.iro.lecuyer.stochprocess.VarianceGammaProcess
              umontreal.iro.lecuyer.stochprocess.VarianceGammaProcessDiff

Direct Known Subclasses:
  VarianceGammaProcessDiffPCA

    public class VarianceGammaProcessDiff

extends VarianceGammaProcess

This class represents a variance gamma (VG) process {S(t) = X(t;θ, σ, ν) : t >= 0}. This process is generated using difference of gamma sampling (see), which uses the representation of the VG process as the difference of two independent `GammaProcess`'es (see):

X(t;θ, σ, ν) : = X(0) + Γ+(t;μp, νp) - Γ-(t;μn, νn)

where X(0) is a constant corresponding to the initial value of the process and

μp | = | (1/2)( &thetas;^2 + 2σ^2/ν)1/2 + θ/2
μn | = | (1/2)( &thetas;^2 + 2σ^2/ν)1/2 - θ/2
νp | = | ((1/2)(&thetas;^2 + 2σ^2/ν)1/2 + θ/2)2ν
νn | = | ((1/2)(&thetas;^2 - 2σ^2/ν)1/2 + θ/2)2ν

Field Summary

Fields inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess
`path`

Constructor Summary
`VarianceGammaProcessDiff(double s0, double theta, double sigma, double nu, GammaProcess gpos, GammaProcess gneg)` Same as above.
`VarianceGammaProcessDiff(double s0, double theta, double sigma, double nu, RandomStream stream)` .

Method Summary
`double[]` | `generatePath()` Generates, returns and saves the path.
`double[]` | `generatePath(double[] uniform01)` Similar to the usual `generatePath()`, but here the uniform random numbers used for the simulation must be provided to the method.
`GammaProcess` | `getGneg()` Returns a reference to the `GammaProcess` object `gneg` used to generate the Γ- component of the process.
`GammaProcess` | `getGpos()` Returns a reference to the `GammaProcess` object `gpos` used to generate the Γ+ component of the process.
`double` | `nextObservation()` Generates the observation for the next time.
`void` | `resetStartProcess()` Sets the observation times on the `VarianceGammaProcessDiff` as usual, but also applies the `resetStartProcess` method to the two `GammaProcess` objects used to generate this process.
`void` | `setObservationTimes(double[] t, int d)` Sets the observation times on the `VarianceGammaProcesDiff` as usual, but also sets the observation times of the underlying `GammaProcess`'es.
`void` | `setStream(RandomStream stream)` Sets the `RandomStream` of the two `GammaProcess`'es to the same `stream`.

Methods inherited from class umontreal.iro.lecuyer.stochprocess.VarianceGammaProcess
`getBrownianMotion, getGammaProcess, getNu, getSigma, getStream, getTheta, setParams`

Methods inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess
`generatePath, getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getSubpath, getX0, hasNextObservation, setObservationTimes`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### VarianceGammaProcessDiff

    public VarianceGammaProcessDiff(double s0,
                                    double theta,
                                    double sigma,
                                    double nu,
                                    RandomStream stream)

  . Constructs a new `VarianceGammaProcessDiff` with parameters θ = , σ = , ν = and initial value S(t0) = . `stream` is used by two instances of `GammaProcess`, Γ+ and Γ-, respectively. The other parameters are as for the class `VarianceGammaProcess`. The `GammaProcess` objects for Γ+ and Γ- are constructed using the parameters from and their initial values Γ+(t0) and Γ-(t0) are set to 0.

### VarianceGammaProcessDiff

    public VarianceGammaProcessDiff(double s0,
                                    double theta,
                                    double sigma,
                                    double nu,
                                    GammaProcess gpos,
                                    GammaProcess gneg)

  Same as above. To avoid confusion, the parameters of the `GammaProcess` objects for Γ+ and Γ- are set to those of and their initial values Γ+(t0) and Γ-(t0) are set to 0. Also, since there is only one `RandomStream` in the other constructor, only the `RandomStream` included in the `GammaProcess` `gpos` is kept, as the `RandomStream` of `gneg` is the same.

Method Detail

### nextObservation

    public double nextObservation()

  Description copied from class: `VarianceGammaProcess`
  Generates the observation for the next time. It also works with bridge sampling; however both `BrownianMotionBridge` and `GammaProcessBridge` must be used in the constructor in that case. Furthermore, for bridge sampling, the order of the observations is that of the bridge, not sequential order.

  Overrides:
    `nextObservation` in class `VarianceGammaProcess`

### generatePath

    public double[] generatePath()

  Generates, returns and saves the path. To do so, the path of Γ+ is first generated and then the path of Γ-. This is not the optimal way of proceeding in order to reduce the variance in QMC simulations; for that, use `generatePath(double[] uniform01)` instead.

  Overrides:
    `generatePath` in class `VarianceGammaProcess`

### generatePath

    public double[] generatePath(double[] uniform01)

  Similar to the usual `generatePath()`, but here the uniform random numbers used for the simulation must be provided to the method. This allows to properly use the uniform random variates in QMC simulations. This method divides the table of uniform random numbers `uniform01` in two smaller tables, the first one containing the odd indices of `uniform01` are used to generate the path of Γ+ and the even indices are used to generate the path of Γ-. This way of proceeding further reduces the variance for QMC simulations.

  Overrides:
    `generatePath` in class `VarianceGammaProcess`

### resetStartProcess

    public void resetStartProcess()

  Sets the observation times on the `VarianceGammaProcessDiff` as usual, but also applies the `resetStartProcess` method to the two `GammaProcess` objects used to generate this process.

  Overrides:
    `resetStartProcess` in class `VarianceGammaProcess`

### getGpos

    public GammaProcess getGpos()

  Returns a reference to the `GammaProcess` object `gpos` used to generate the Γ+ component of the process.

### getGneg

    public GammaProcess getGneg()

  Returns a reference to the `GammaProcess` object `gneg` used to generate the Γ- component of the process.

### setObservationTimes

    public void setObservationTimes(double[] t,
                                    int d)

  Sets the observation times on the `VarianceGammaProcesDiff` as usual, but also sets the observation times of the underlying `GammaProcess`'es.

  Overrides:
    `setObservationTimes` in class `VarianceGammaProcess`

### setStream

    public void setStream(RandomStream stream)

  Sets the `RandomStream` of the two `GammaProcess`'es to the same `stream`.

  Overrides:
    `setStream` in class `VarianceGammaProcess`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.