25package umontreal.ssj.stochprocess;
27import umontreal.ssj.rng.*;
28import umontreal.ssj.probdist.*;
29import umontreal.ssj.randvar.*;
67 protected double theta, sigma, nu;
69 public VarianceGammaProcess() {
112 double nextBM = BM.nextObservation(randomTime.nextObservation());
113 observationIndex = BM.getCurrentObservationIndex();
114 path[observationIndex] = nextBM;
115 observationCounter++;
127 BM.setObservationTimes(randomTime.generatePath(), d);
128 path = BM.generatePath();
129 observationIndex = d;
130 observationCounter = d;
146 int dd = uniform01.length;
150 throw new IllegalArgumentException(
"The Array uniform01 must have a even length");
153 double[] QMCpointsGP =
new double[d];
154 double[] QMCpointsBM =
new double[d];
156 for (
int i = 0; i < d; i++) {
157 QMCpointsGP[i] = uniform01[2 * i];
158 QMCpointsBM[i] = uniform01[2 * i + 1];
160 BM.setObservationTimes(randomTime.generatePath(QMCpointsGP), d);
162 path = BM.generatePath(QMCpointsBM);
163 observationIndex = d;
164 observationCounter = d;
175 observationIndex = 0;
176 observationCounter = 0;
177 BM.resetStartProcess();
178 randomTime.resetStartProcess();
188 public void setParams(
double s0,
double theta,
double sigma,
double nu) {
193 if (observationTimesSet)
218 protected void init() {
220 if (observationTimesSet) {
222 randomTime.x0 = t[0];
232 super.setObservationTimes(t, d);
243 BM.setStream(stream);
251 return BM.getStream();
This class represents a Brownian motion process , sampled at times .
This class represents a gamma process fmad98a (page 82) with mean parameter.
void setParams(double s0, double mu, double nu)
Sets the parameters , and of the process.
double getNu()
Returns the value of the parameter .
Abstract base class for a stochastic process sampled (or observed) at a finite number of time points...
void setObservationTimes(double[] T, int d)
Sets the observation times of the process to a copy of T, with.
double getSigma()
Returns the value of the parameter .
VarianceGammaProcess(double s0, double theta, double sigma, double nu, RandomStream stream)
Constructs a new VarianceGammaProcess with parameters , , and initial value .
BrownianMotion getBrownianMotion()
Returns a reference to the inner BrownianMotion.
void resetStartProcess()
Resets the observation index and counter to 0 and applies the resetStartProcess method to the Brownia...
RandomStream getStream()
Returns the random stream of the BrownianMotion process, which should be the same as for the GammaPro...
GammaProcess getGammaProcess()
Returns a reference to the inner GammaProcess.
void setParams(double s0, double theta, double sigma, double nu)
Sets the parameters s0, theta,.
double nextObservation()
Generates the observation for the next time.
double[] generatePath(double[] uniform01)
Similar to the usual generatePath(), but here the uniform random numbers used for the simulation must...
double[] generatePath()
Generates and returns the path.
VarianceGammaProcess(double s0, BrownianMotion BM, GammaProcess Gamma)
Constructs a new VarianceGammaProcess.
double getTheta()
Returns the value of the parameter .
void setStream(RandomStream stream)
Resets the umontreal.ssj.rng.RandomStream ’s.
double getNu()
Returns the value of the parameter .
void setObservationTimes(double t[], int d)
Sets the observation times on the VarianceGammaProcess as usual, but also sets the observation times ...
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...