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 independentGammaProcess'es (see): where X(0) is a constant corresponding to the initial value of the process and
-
-
Constructor Summary
Constructors Constructor and Description VarianceGammaProcessDiff(double s0, double theta, double sigma, double nu, GammaProcess gpos, GammaProcess gneg)The parameters of theGammaProcessobjects 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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description 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.GammaProcessgetGneg()Returns a reference to theGammaProcessobject gneg used to generate the Γ- component of the process.GammaProcessgetGpos()Returns a reference to theGammaProcessobject gpos used to generate the Γ+ component of the process.RandomStreamgetStream()Returns the RandomStream of the Γ+ process.doublenextObservation()Generates the observation for the next time.voidresetStartProcess()Sets the observation times on the VarianceGammaProcessDiff as usual, but also applies the resetStartProcess method to the twoGammaProcessobjects used to generate this process.voidsetObservationTimes(double[] t, int d)Sets the observation times on the VarianceGammaProcesDiff as usual, but also sets the observation times of the underlyingGammaProcess'es.voidsetStream(RandomStream stream)Sets theRandomStreamof the twoGammaProcess'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
-
-
-
-
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 ofGammaProcess, Γ+ and Γ-, respectively. The other parameters are as in the classVarianceGammaProcess. TheGammaProcessobjects 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 theGammaProcessobjects 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:VarianceGammaProcessGenerates the observation for the next time. It also works with bridge sampling; however bothBrownianMotionBridgeandGammaProcessBridgemust 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:
nextObservationin classVarianceGammaProcess
-
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:
generatePathin classVarianceGammaProcess
-
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:
generatePathin classVarianceGammaProcess
-
resetStartProcess
public void resetStartProcess()
Sets the observation times on the VarianceGammaProcessDiff as usual, but also applies the resetStartProcess method to the twoGammaProcessobjects used to generate this process.- Overrides:
resetStartProcessin classVarianceGammaProcess
-
getGpos
public GammaProcess getGpos()
Returns a reference to theGammaProcessobject gpos used to generate the Γ+ component of the process.
-
getGneg
public GammaProcess getGneg()
Returns a reference to theGammaProcessobject 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 underlyingGammaProcess'es.- Overrides:
setObservationTimesin classVarianceGammaProcess
-
getStream
public RandomStream getStream()
Returns the RandomStream of the Γ+ process.- Overrides:
getStreamin classVarianceGammaProcess
-
setStream
public void setStream(RandomStream stream)
Sets theRandomStreamof the twoGammaProcess'es to stream.- Overrides:
setStreamin classVarianceGammaProcess
-
-
DMelt 3.0 © DataMelt by jWork.ORG