|
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.NormalInverseGaussianProcess
public class NormalInverseGaussianProcess
This class represents a normal inverse gaussian process (NIG). It obeys the stochastic differential equation
where {B(t), t >= 0} is aBrownianMotion
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.
Constructor Summary | |
---|---|
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,
String igType)
Constructs a new NormalInverseGaussianProcess. |
|
NormalInverseGaussianProcess(double x0,
double alpha,
double beta,
double mu,
double delta,
RandomStream streamAll,
String igType)
Same as above, but all RandomStream 's
are set to the same stream, streamAll. |
Method Summary | |
---|---|
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 . |
Methods inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess |
---|
generatePath, getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getSubpath, getX0, hasNextObservation, resetStartProcess, setObservationTimes, setX0 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public 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, 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, String igType)
RandomStream
's
are set to the same stream, streamAll.
Method Detail |
---|
public double[] generatePath()
PointSet
.
generatePath
in class StochasticProcess
public 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 StochasticProcess
public void setObservationTimes(double[] t, int d)
InverseGaussianProcess
.
It furthermore sets the starting value of the InverseGaussianProcess
to t[0].
setObservationTimes
in class StochasticProcess
public 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 StochasticProcess
public void setStream(RandomStream stream)
InverseGaussianProcess
.
setStream
in class StochasticProcess
|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |