This class represents a variance gamma (VG) process \(\{S(t) = X(t; \theta, \sigma, \nu) : t \geq0\}\). More...
Public Member Functions | |
| VarianceGammaProcessDiff (double s0, double theta, double sigma, double nu, RandomStream stream) | |
| Constructs a new VarianceGammaProcessDiff with parameters. | |
| VarianceGammaProcessDiff (double s0, double theta, double sigma, double nu, GammaProcess gpos, GammaProcess gneg) | |
The parameters of the GammaProcess objects for \(\Gamma^+\) and \(\Gamma^-\) are set to those of ( dblGammaParams ) and their initial values \(\Gamma^+(t_0)\) and. | |
| double | nextObservation () |
| Generates the observation for the next time. | |
| 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. | |
| void | resetStartProcess () |
| Sets the observation times on the VarianceGammaProcessDiff as usual, but also applies the resetStartProcess method to the two. | |
| GammaProcess | getGpos () |
| Returns a reference to the GammaProcess object gpos used to generate the \(\Gamma^+\) component of the process. | |
| GammaProcess | getGneg () |
| Returns a reference to the GammaProcess object gneg used to generate the \(\Gamma^-\) component of the 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. | |
| RandomStream | getStream () |
| Returns the RandomStream of the \(\Gamma^+\) process. | |
| void | setStream (RandomStream stream) |
| Sets the umontreal.ssj.rng.RandomStream of the two. | |
| Public Member Functions inherited from 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}\). | |
| VarianceGammaProcess (double s0, BrownianMotion BM, GammaProcess Gamma) | |
| Constructs a new VarianceGammaProcess. | |
| 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\). | |
| 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 generated using difference of gamma sampling (see [10], [9] ), which uses the representation of the VG process as the difference of two independent GammaProcess ’es (see [167] ):
\[ X(t; \theta, \sigma, \nu) := X(0) + \Gamma^+(t; \mu_p, \nu_p) - \Gamma^-(t; \mu_n, \nu_n) \tag{dblGammaEqn} \]
where \(X(0)\) is a constant corresponding to the initial value of the process and
\[ \begin{array}{rcl} \mu_p & = & (\sqrt{ \theta^2 + 2\sigma^2/\nu} + \theta)/2 \\ \mu_n & = & (\sqrt{ \theta^2 + 2\sigma^2/\nu} - \theta)/2 \\ \nu_p & = & \nu\mu_p^2 \\ \nu_n & = & \nu\mu_n^2 \end{array} \tag{dblGammaParams} \]
Definition at line 49 of file VarianceGammaProcessDiff.java.
| umontreal.ssj.stochprocess.VarianceGammaProcessDiff.VarianceGammaProcessDiff | ( | double | s0, |
| double | theta, | ||
| double | sigma, | ||
| double | nu, | ||
| RandomStream | stream ) |
Constructs a new VarianceGammaProcessDiff with parameters.
\(\theta= \mathtt{theta}\), \(\sigma= \mathtt{sigma}\), \(\nu= \mathtt{nu}\) and initial value \(S(t_0) = \mathtt{s0}\). stream is used by two instances of GammaProcess, \(\Gamma^+\) and \(\Gamma^-\), respectively. The other parameters are as in the class VarianceGammaProcess. The GammaProcess objects for \(\Gamma^+\) and \(\Gamma^-\) are constructed using the parameters from ( dblGammaParams ) and their initial values \(\Gamma^+(t_0)\) and \(\Gamma^-(t_0)\) are set to \(0\).
Definition at line 69 of file VarianceGammaProcessDiff.java.
| umontreal.ssj.stochprocess.VarianceGammaProcessDiff.VarianceGammaProcessDiff | ( | double | s0, |
| double | theta, | ||
| double | sigma, | ||
| double | nu, | ||
| GammaProcess | gpos, | ||
| GammaProcess | gneg ) |
The parameters of the GammaProcess objects for \(\Gamma^+\) and \(\Gamma^-\) are set to those of ( dblGammaParams ) and their initial values \(\Gamma^+(t_0)\) and.
\(\Gamma^-(t_0)\) are set to \(t_0\). The RandomStream of the \(\Gamma^-\) process is overwritten with the RandomStream of the \(\Gamma^+\) process.
Definition at line 85 of file VarianceGammaProcessDiff.java.
| double[] umontreal.ssj.stochprocess.VarianceGammaProcessDiff.generatePath | ( | ) |
Generates, returns and saves the path.
To do so, the path of
\(\Gamma^+\) is first generated and then the path of \(\Gamma^-\). This is not the optimal way of proceeding in order to reduce the variance in QMC simulations; for that, use generatePath(double[] uniform01) instead.
Reimplemented from umontreal.ssj.stochprocess.VarianceGammaProcess.
Reimplemented in umontreal.ssj.stochprocess.VarianceGammaProcessDiffPCA.
Definition at line 132 of file VarianceGammaProcessDiff.java.
| double[] umontreal.ssj.stochprocess.VarianceGammaProcessDiff.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
\(\Gamma^+\) and the even indices are used to generate the path of \(\Gamma^-\). This way of proceeding further reduces the variance for QMC simulations.
Reimplemented from umontreal.ssj.stochprocess.VarianceGammaProcess.
Reimplemented in umontreal.ssj.stochprocess.VarianceGammaProcessDiffPCA.
Definition at line 156 of file VarianceGammaProcessDiff.java.
| GammaProcess umontreal.ssj.stochprocess.VarianceGammaProcessDiff.getGneg | ( | ) |
Returns a reference to the GammaProcess object gneg used to generate the \(\Gamma^-\) component of the process.
Definition at line 210 of file VarianceGammaProcessDiff.java.
| GammaProcess umontreal.ssj.stochprocess.VarianceGammaProcessDiff.getGpos | ( | ) |
Returns a reference to the GammaProcess object gpos used to generate the \(\Gamma^+\) component of the process.
Definition at line 202 of file VarianceGammaProcessDiff.java.
| RandomStream umontreal.ssj.stochprocess.VarianceGammaProcessDiff.getStream | ( | ) |
Returns the RandomStream of the \(\Gamma^+\) process.
Reimplemented from umontreal.ssj.stochprocess.VarianceGammaProcess.
Definition at line 243 of file VarianceGammaProcessDiff.java.
| double umontreal.ssj.stochprocess.VarianceGammaProcessDiff.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.VarianceGammaProcess.
Reimplemented in umontreal.ssj.stochprocess.VarianceGammaProcessDiffPCA.
Definition at line 94 of file VarianceGammaProcessDiff.java.
| void umontreal.ssj.stochprocess.VarianceGammaProcessDiff.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.
Reimplemented from umontreal.ssj.stochprocess.VarianceGammaProcess.
Definition at line 191 of file VarianceGammaProcessDiff.java.
| void umontreal.ssj.stochprocess.VarianceGammaProcessDiff.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.
Reimplemented from umontreal.ssj.stochprocess.VarianceGammaProcess.
Definition at line 232 of file VarianceGammaProcessDiff.java.
| void umontreal.ssj.stochprocess.VarianceGammaProcessDiff.setStream | ( | RandomStream | stream | ) |
Sets the umontreal.ssj.rng.RandomStream of the two.
GammaProcess ’es to stream.
Reimplemented from umontreal.ssj.stochprocess.VarianceGammaProcess.
Definition at line 252 of file VarianceGammaProcessDiff.java.