SSJ
V. 2.6.

umontreal.iro.lecuyer.stochprocess
Class VarianceGammaProcessDiff

java.lang.Object
  extended by umontreal.iro.lecuyer.stochprocess.StochasticProcess
      extended by umontreal.iro.lecuyer.stochprocess.VarianceGammaProcess
          extended by 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 = (( &thetas;^2 + 2σ^2/ν)1/2 + θ)/2
μn = (( &thetas;^2 + 2σ^2/ν)1/2 - θ)/2
νp = νμp2
νn = νμn2


Constructor Summary
VarianceGammaProcessDiff(double s0, double theta, double sigma, double nu, GammaProcess gpos, GammaProcess gneg)
          The parameters of the GammaProcess objects for Γ+ and Γ- are set to those of and their initial values Γ+(t0) and Γ-(t0) are set to t0.
VarianceGammaProcessDiff(double s0, double theta, double sigma, double nu, RandomStream stream)
          Constructs a new VarianceGammaProcessDiff with parameters θ = theta, σ = sigma, ν = nu and initial value S(t0) = s0.
 
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.
 RandomStream getStream()
          Returns the RandomStream 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 stream.
 
Methods inherited from class umontreal.iro.lecuyer.stochprocess.VarianceGammaProcess
getBrownianMotion, getGammaProcess, getNu, getSigma, getTheta, setParams
 
Methods inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess
generatePath, getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getSubpath, getX0, hasNextObservation, setObservationTimes, setX0
 
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 θ = theta, σ = sigma, ν = nu and initial value S(t0) = s0. stream is used by two instances of GammaProcess, Γ+ and Γ-, respectively. The other parameters are as in 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)
The parameters of the GammaProcess objects for Γ+ and Γ- are set to those of and their initial values Γ+(t0) and Γ-(t0) are set to t0. The RandomStream of the Γ- process is overwritten with the RandomStream of the Γ+ process.

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

getStream

public RandomStream getStream()
Returns the RandomStream of the Γ+ process.

Overrides:
getStream in class VarianceGammaProcess

setStream

public void setStream(RandomStream stream)
Sets the RandomStream of the two GammaProcess'es to stream.

Overrides:
setStream in class VarianceGammaProcess

SSJ
V. 2.6.

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