public class NormalInverseGaussianProcess extends StochasticProcess
BrownianMotion
with drift β and variance 1,
and h(t) is an InverseGaussianProcess
IG(ν/γ, ν2), with
ν = δdt and
γ = (α^2 - β^2)1/2.
In this class, the process is generated using the sequential technique: X(0) = x0 and
There is one RandomStream
used to generate the Zj's and
there are one or two streams used to generate the underlying
InverseGaussianProcess, depending on which IG subclass
is used.
In finance, a NIG process usually means that
the log-return is given by a NIG process;
GeometricNormalInverseGaussianProcess
should be used in that case.
path| Constructor and Description |
|---|
NormalInverseGaussianProcess(double x0,
double alpha,
double beta,
double mu,
double delta,
RandomStream streamBrownian,
InverseGaussianProcess igP)
Given an
InverseGaussianProcess igP, constructs a
new NormalInverseGaussianProcess. |
NormalInverseGaussianProcess(double x0,
double alpha,
double beta,
double mu,
double delta,
RandomStream streamBrownian,
RandomStream streamIG1,
RandomStream streamIG2,
java.lang.String igType)
Constructs a new NormalInverseGaussianProcess.
|
NormalInverseGaussianProcess(double x0,
double alpha,
double beta,
double mu,
double delta,
RandomStream streamAll,
java.lang.String igType)
Same as above, but all
RandomStream's
are set to the same stream, streamAll. |
| Modifier and Type | Method and Description |
|---|---|
double[] |
generatePath()
Generates the path.
|
double |
getAlpha()
Returns alpha.
|
double |
getAnalyticAverage(double time)
Returns the analytic average, which
is
μt + δtβ/γ.
|
double |
getAnalyticVariance(double time)
Returns the analytic variance, which is
δtα2/γ3.
|
double |
getBeta()
Returns beta.
|
double |
getDelta()
Returns delta.
|
double |
getGamma()
Returns gamma.
|
double |
getMu()
Returns mu.
|
RandomStream |
getStream()
Only returns the stream if all streams are equal,
including the stream(s) in the underlying
InverseGaussianProcess. |
double |
nextObservation()
Returns the value of the process for the next time step.
|
void |
setObservationTimes(double[] t,
int d)
Sets the observation times on the NIG process as usual,
but also sets the observation times of the underlying
InverseGaussianProcess. |
void |
setParams(double x0,
double alpha,
double beta,
double mu,
double delta)
Sets the parameters.
|
void |
setStream(RandomStream stream)
Sets all internal streams to stream,
including the stream(s) of the underlying
InverseGaussianProcess. |
generatePath, getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getSubpath, getX0, hasNextObservation, resetStartProcess, setObservationTimes, setX0public NormalInverseGaussianProcess(double x0,
double alpha,
double beta,
double mu,
double delta,
RandomStream streamBrownian,
InverseGaussianProcess igP)
InverseGaussianProcess igP, constructs a
new NormalInverseGaussianProcess. The parameters and observation
times of the IG process will be overriden by the parameters
of the NIG process. If there are two
RandomStream's in the
InverseGaussianProcess, this constructor assumes that
both streams have been set to the same stream.public NormalInverseGaussianProcess(double x0,
double alpha,
double beta,
double mu,
double delta,
RandomStream streamBrownian,
RandomStream streamIG1,
RandomStream streamIG2,
java.lang.String igType)
InverseGaussianProcess. The choices are SEQUENTIAL_SLOW,
SEQUENTIAL_MSH, BRIDGE and PCA, which correspond
respectively to InverseGaussianProcess, InverseGaussianProcessMSH,
InverseGaussianProcessBridge and InverseGaussianProcessPCA.
The third RandomStream, streamIG2,
will not be used at all if the SEQUENTIAL_SLOW or PCA methods are chosen.public NormalInverseGaussianProcess(double x0,
double alpha,
double beta,
double mu,
double delta,
RandomStream streamAll,
java.lang.String igType)
RandomStream's
are set to the same stream, streamAll.public double[] generatePath()
PointSet.generatePath in class StochasticProcesspublic double nextObservation()
InverseGaussianProcess
is of type InverseGaussianProcessPCA, this method cannot be
used. It will work with InverseGaussianProcessBridge, but
the return order of the observations is the bridge order.nextObservation in class StochasticProcesspublic void setObservationTimes(double[] t,
int d)
InverseGaussianProcess.
It furthermore sets the starting value of the InverseGaussianProcess
to t[0].setObservationTimes in class StochasticProcesspublic void setParams(double x0,
double alpha,
double beta,
double mu,
double delta)
public double getAlpha()
public double getBeta()
public double getMu()
public double getDelta()
public double getGamma()
public double getAnalyticAverage(double time)
public double getAnalyticVariance(double time)
public RandomStream getStream()
InverseGaussianProcess.getStream in class StochasticProcesspublic void setStream(RandomStream stream)
InverseGaussianProcess.setStream in class StochasticProcessTo submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.