This class represents a variance gamma (VG) process \(\{S(t) = X(t; \theta, \sigma, \nu) : t \geq0\}\). More...
Public Member Functions | |
| VarianceGammaProcess (double s0, double theta, double sigma, double nu, RandomStream stream) | |
| Constructs a new VarianceGammaProcess with parameters \(\theta=
\mathtt{theta}\), \(\sigma= \mathtt{sigma}\), \(\nu= \mathtt{nu}\) and initial value \(S(t_0) = \mathtt{s0}\). | |
| VarianceGammaProcess (double s0, BrownianMotion BM, GammaProcess Gamma) | |
| Constructs a new VarianceGammaProcess. | |
| double | nextObservation () |
| Generates the observation for the next time. | |
| 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. | |
| void | resetStartProcess () |
| Resets the observation index and counter to 0 and applies the resetStartProcess method to the BrownianMotion and the. | |
| void | setParams (double s0, double theta, double sigma, double nu) |
| Sets the parameters \(S(t_0) =\) s0, \(\theta=\) theta,. | |
| double | getTheta () |
| Returns the value of the parameter \(\theta\). | |
| double | getSigma () |
| Returns the value of the parameter \(\sigma\). | |
| double | getNu () |
| Returns the value of the parameter \(\nu\). | |
| 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 | setStream (RandomStream stream) |
| Resets the umontreal.ssj.rng.RandomStream ’s. | |
| RandomStream | getStream () |
| Returns the random stream of the BrownianMotion process, which should be the same as for the GammaProcess. | |
| BrownianMotion | getBrownianMotion () |
| Returns a reference to the inner BrownianMotion. | |
| GammaProcess | getGammaProcess () |
| Returns a reference to the inner GammaProcess. | |
| Public Member Functions inherited from umontreal.ssj.stochprocess.StochasticProcess | |
| void | setObservationTimes (double delta, int d) |
| Sets equidistant observation times at \(t_j = j\delta\), for. | |
| double[] | getObservationTimes () |
| Returns a reference to the array that contains the observation times. | |
| int | getNumObservationTimes () |
| Returns the number \(d\) of observation times, excluding the time \(t_0\). | |
| double[] | generatePath (RandomStream stream) |
| Same as generatePath(), but first resets the stream to stream. | |
| double[] | getPath () |
| Returns a reference to the last generated sample path \(\{X(t_0), ... ,
X(t_d)\}\). | |
| void | getSubpath (double[] subpath, int[] pathIndices) |
| Returns in subpath the values of the process at a subset of the observation times, specified as the times \(t_j\) whose indices. | |
| double | getObservation (int j) |
| Returns \(X(t_j)\) from the current sample path. | |
| boolean | hasNextObservation () |
| Returns true if \(j<d\), where \(j\) is the number of observations of the current sample path generated since the last call to resetStartProcess. | |
| int | getCurrentObservationIndex () |
| Returns the value of the index \(j\) corresponding to the time. | |
| double | getCurrentObservation () |
| Returns the value of the last generated observation \(X(t_j)\). | |
| double | getX0 () |
| Returns the initial value \(X(t_0)\) for this process. | |
| void | setX0 (double s0) |
| Sets the initial value \(X(t_0)\) for this process to s0, and reinitializes. | |
| int[] | getArrayMappingCounterToIndex () |
| Returns a reference to an array that maps an integer \(k\) to \(i_k\), the index of the observation \(S(t_{i_k})\) corresponding to the. | |
This class represents a variance gamma (VG) process \(\{S(t) = X(t; \theta, \sigma, \nu) : t \geq0\}\).
This process is obtained as a subordinate of the Brownian motion process \(B(t;\theta,\sigma)\) using the operational time \(G(t;1,\nu)\) (see [60],
[9] ):
\[ X(t; \theta, \sigma, \nu) := B(G(t;1,\nu),\theta, \sigma). \tag{VGeqn} \]
See also [167], [165], [166] 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.
Definition at line 62 of file VarianceGammaProcess.java.
| umontreal.ssj.stochprocess.VarianceGammaProcess.VarianceGammaProcess | ( | double | s0, |
| double | theta, | ||
| double | sigma, | ||
| double | nu, | ||
| RandomStream | stream ) |
Constructs a new VarianceGammaProcess with parameters \(\theta= \mathtt{theta}\), \(\sigma= \mathtt{sigma}\), \(\nu= \mathtt{nu}\) and initial value \(S(t_0) = \mathtt{s0}\).
stream is used to generate both the BrownianMotion \(B\) and the GammaProcess \(G\) in ( VGeqn ).
Definition at line 79 of file VarianceGammaProcess.java.
| umontreal.ssj.stochprocess.VarianceGammaProcess.VarianceGammaProcess | ( | double | s0, |
| BrownianMotion | BM, | ||
| GammaProcess | Gamma ) |
Constructs a new VarianceGammaProcess.
The parameters
\(\theta\) and \(\sigma\) are set to the parameters \(\mu\) and \(\sigma\), respectively, of the BrownianMotion BM and the parameter \(\nu\) is set to the parameter \(\nu\) of the GammaProcess Gamma. The parameters \(\mu\) and \(x0\) of the GammaProcess are overwritten to equal 1 and 0 respectively. The initial value of the process is \(S(t_0) = {\mathtt{s0}}\).
Definition at line 94 of file VarianceGammaProcess.java.
| double[] umontreal.ssj.stochprocess.VarianceGammaProcess.generatePath | ( | ) |
Generates and returns the path.
To do so, it first generates the complete path of the inner 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.
Reimplemented from umontreal.ssj.stochprocess.StochasticProcess.
Reimplemented in umontreal.ssj.stochprocess.VarianceGammaProcessAlternate, umontreal.ssj.stochprocess.VarianceGammaProcessDiff, and umontreal.ssj.stochprocess.VarianceGammaProcessDiffPCA.
Definition at line 126 of file VarianceGammaProcess.java.
| double[] umontreal.ssj.stochprocess.VarianceGammaProcess.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 which are used to generate the path of the inner 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.
Reimplemented in umontreal.ssj.stochprocess.VarianceGammaProcessDiff, and umontreal.ssj.stochprocess.VarianceGammaProcessDiffPCA.
Definition at line 145 of file VarianceGammaProcess.java.
| BrownianMotion umontreal.ssj.stochprocess.VarianceGammaProcess.getBrownianMotion | ( | ) |
Returns a reference to the inner BrownianMotion.
Definition at line 257 of file VarianceGammaProcess.java.
| GammaProcess umontreal.ssj.stochprocess.VarianceGammaProcess.getGammaProcess | ( | ) |
Returns a reference to the inner GammaProcess.
Definition at line 264 of file VarianceGammaProcess.java.
| double umontreal.ssj.stochprocess.VarianceGammaProcess.getNu | ( | ) |
Returns the value of the parameter \(\nu\).
Definition at line 214 of file VarianceGammaProcess.java.
| double umontreal.ssj.stochprocess.VarianceGammaProcess.getSigma | ( | ) |
Returns the value of the parameter \(\sigma\).
Definition at line 207 of file VarianceGammaProcess.java.
| RandomStream umontreal.ssj.stochprocess.VarianceGammaProcess.getStream | ( | ) |
Returns the random stream of the BrownianMotion process, which should be the same as for the GammaProcess.
Reimplemented from umontreal.ssj.stochprocess.StochasticProcess.
Reimplemented in umontreal.ssj.stochprocess.VarianceGammaProcessDiff.
Definition at line 250 of file VarianceGammaProcess.java.
| double umontreal.ssj.stochprocess.VarianceGammaProcess.getTheta | ( | ) |
Returns the value of the parameter \(\theta\).
Definition at line 200 of file VarianceGammaProcess.java.
| double umontreal.ssj.stochprocess.VarianceGammaProcess.nextObservation | ( | ) |
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.
Reimplemented from umontreal.ssj.stochprocess.StochasticProcess.
Reimplemented in umontreal.ssj.stochprocess.VarianceGammaProcessDiff, and umontreal.ssj.stochprocess.VarianceGammaProcessDiffPCA.
Definition at line 109 of file VarianceGammaProcess.java.
| void umontreal.ssj.stochprocess.VarianceGammaProcess.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.
Reimplemented from umontreal.ssj.stochprocess.StochasticProcess.
Reimplemented in umontreal.ssj.stochprocess.VarianceGammaProcessDiff.
Definition at line 174 of file VarianceGammaProcess.java.
| void umontreal.ssj.stochprocess.VarianceGammaProcess.setObservationTimes | ( | double | t[], |
| int | d ) |
Sets the observation times on the VarianceGammaProcess as usual, but also sets the observation times of the underlying GammaProcess.
It furthermore sets the starting value of the GammaProcess to t[0].
Reimplemented from umontreal.ssj.stochprocess.StochasticProcess.
Reimplemented in umontreal.ssj.stochprocess.VarianceGammaProcessDiff.
Definition at line 231 of file VarianceGammaProcess.java.
| void umontreal.ssj.stochprocess.VarianceGammaProcess.setParams | ( | double | s0, |
| double | theta, | ||
| double | sigma, | ||
| double | nu ) |
Sets the parameters \(S(t_0) =\) s0, \(\theta=\) theta,.
\(\sigma=\) sigma and \(\nu=\) nu of the process. Warning: This method will recompute some quantities stored internally, which may be slow if called repeatedly.
Definition at line 188 of file VarianceGammaProcess.java.
| void umontreal.ssj.stochprocess.VarianceGammaProcess.setStream | ( | RandomStream | stream | ) |
Resets the umontreal.ssj.rng.RandomStream ’s.
Warning: this method sets both the umontreal.ssj.rng.RandomStream of the
BrownianMotion and of the GammaProcess to the same umontreal.ssj.rng.RandomStream.
Reimplemented from umontreal.ssj.stochprocess.StochasticProcess.
Reimplemented in umontreal.ssj.stochprocess.VarianceGammaProcessDiff.
Definition at line 242 of file VarianceGammaProcess.java.