|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.stochprocess.StochasticProcess umontreal.iro.lecuyer.stochprocess.VarianceGammaProcess
public class VarianceGammaProcess
This class represents a variance gamma (VG) process {S(t) = X(t;θ, σ, ν) : t >= 0}. This process is obtained as a subordinate of the Brownian motion process B(t;θ, σ) using the operational time G(t;1, ν) (see):
See also for applications to modelling asset returns and option pricing.
The process is sampled as follows: when generatePath() is called, the method
generatePath() of the inner GammaProcess
is called;
its path is then used to set the observation times of the
BrownianMotion
. Finally, the method generatePath() of
the BrownianMotion
is called.
Warning: If one wants to reduced the variance as much as possible
in a QMC simulation, this way of proceeding is not optimal. Use
the method generatePath(uniform01) instead.
If one calls the nextObservation method, the operational time is generated first, followed by the corresponding brownian motion increment, which is then returned.
Note that if one wishes to use bridge sampling with the nextObservation method, both the gamma process G and the Brownian motion process B should use bridge sampling so that their observations are synchronized.
Constructor Summary | |
---|---|
VarianceGammaProcess()
|
|
VarianceGammaProcess(double s0,
BrownianMotion BM,
GammaProcess Gamma)
Constructs a new VarianceGammaProcess. |
|
VarianceGammaProcess(double s0,
double theta,
double sigma,
double nu,
RandomStream stream)
Constructs a new VarianceGammaProcess with parameters θ = |
Method Summary | |
---|---|
double[] |
generatePath()
Generates and returns 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. |
BrownianMotion |
getBrownianMotion()
Returns a reference to the inner BrownianMotion . |
GammaProcess |
getGammaProcess()
Returns a reference to the inner GammaProcess . |
double |
getNu()
Returns the value of the parameter ν. |
double |
getSigma()
Returns the value of the parameter σ. |
RandomStream |
getStream()
Returns the random stream of the BrownianMotion process, which should
be the same as for the GammaProcess . |
double |
getTheta()
Returns the value of the parameter θ. |
double |
nextObservation()
Generates the observation for the next time. |
void |
resetStartProcess()
Resets the observation index and counter to 0 and applies the resetStartProcess method to the BrownianMotion and the GammaProcess objects
used to generate this process. |
void |
setObservationTimes(double[] t,
int d)
Sets the observation times on the VarianceGammaProcess as usual, but also sets the observation times of the underlying GammaProcess . |
void |
setParams(double s0,
double theta,
double sigma,
double nu)
Sets the parameters S(t0) = s0, θ = theta, σ = sigma and ν = nu of the process. |
void |
setStream(RandomStream stream)
Resets the RandomStream 's. |
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 |
---|
public VarianceGammaProcess()
public VarianceGammaProcess(double s0, double theta, double sigma, double nu, RandomStream stream)
BrownianMotion
B and the
GammaProcess
G in.
public VarianceGammaProcess(double s0, BrownianMotion BM, GammaProcess Gamma)
BrownianMotion
BM and
the parameter ν is set to the parameter ν of the GammaProcess
Gamma. The parameters μ and x0 of the GammaProcess
are
overwritten to equal 1 and 0 respectively.
The initial value of the process is
S(t0) = 1#1.
Method Detail |
---|
public double nextObservation()
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.
nextObservation
in class StochasticProcess
public double[] generatePath()
GammaProcess
and sets the observation times of the inner BrownianMotion
to this path. This method is not optimal to reduce the variance in
QMC simulations; use generatePath(double[] uniform01) for that.
generatePath
in class StochasticProcess
public double[] generatePath(double[] uniform01)
GammaProcess
, and the even indices (in the second table) are used to
generate the path of the inner BrownianMotion
. This way of proceeding
reduces the variance as much as possible for QMC simulations.
public void resetStartProcess()
BrownianMotion
and the GammaProcess
objects
used to generate this process.
resetStartProcess
in class StochasticProcess
public void setParams(double s0, double theta, double sigma, double nu)
public double getTheta()
public double getSigma()
public double getNu()
public void setObservationTimes(double[] t, int d)
GammaProcess
. It furthermore sets the starting value
of the GammaProcess
to t[0].
setObservationTimes
in class StochasticProcess
public void setStream(RandomStream stream)
RandomStream
's.
Warning: this method sets both the
RandomStream
of the
BrownianMotion
and of the GammaProcess
to
the same RandomStream
.
setStream
in class StochasticProcess
public RandomStream getStream()
BrownianMotion
process, which should
be the same as for the GammaProcess
.
getStream
in class StochasticProcess
public BrownianMotion getBrownianMotion()
BrownianMotion
.
public GammaProcess getGammaProcess()
GammaProcess
.
|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |