SSJ
V. 2.6.

umontreal.iro.lecuyer.stochprocess
Class NormalInverseGaussianProcess

java.lang.Object
  extended by umontreal.iro.lecuyer.stochprocess.StochasticProcess
      extended by umontreal.iro.lecuyer.stochprocess.NormalInverseGaussianProcess

public class NormalInverseGaussianProcess
extends StochasticProcess

This class represents a normal inverse gaussian process (NIG). It obeys the stochastic differential equation

dX(t) = μdt + dB(h(t)),

where {B(t), t >= 0} is a 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

X(tj) - X(tj-1) = μdt + βYj + (Y_j)1/2Zj,

where ZjN(0, 1), and YjIG(ν/γ, ν2) with ν = δ(tj - tj-1).

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

NormalInverseGaussianProcess

public NormalInverseGaussianProcess(double x0,
                                    double alpha,
                                    double beta,
                                    double mu,
                                    double delta,
                                    RandomStream streamBrownian,
                                    InverseGaussianProcess igP)
Given an 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.


NormalInverseGaussianProcess

public NormalInverseGaussianProcess(double x0,
                                    double alpha,
                                    double beta,
                                    double mu,
                                    double delta,
                                    RandomStream streamBrownian,
                                    RandomStream streamIG1,
                                    RandomStream streamIG2,
                                    String igType)
Constructs a new NormalInverseGaussianProcess. The string argument corresponds to the type of underlying 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.


NormalInverseGaussianProcess

public 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 Detail

generatePath

public double[] generatePath()
Generates the path. This method samples each stream alternatively, which is useful for quasi-Monte Carlo, where all streams are in fact the same iterator on a PointSet.

Specified by:
generatePath in class StochasticProcess

nextObservation

public double nextObservation()
Returns the value of the process for the next time step. If the underlying 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.

Overrides:
nextObservation in class StochasticProcess

setObservationTimes

public 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. It furthermore sets the starting value of the InverseGaussianProcess to t[0].

Overrides:
setObservationTimes in class StochasticProcess

setParams

public void setParams(double x0,
                      double alpha,
                      double beta,
                      double mu,
                      double delta)
Sets the parameters. Also, computes γ = (α^2-β^2)1/2.


getAlpha

public double getAlpha()
Returns alpha.


getBeta

public double getBeta()
Returns beta.


getMu

public double getMu()
Returns mu.


getDelta

public double getDelta()
Returns delta.


getGamma

public double getGamma()
Returns gamma.


getAnalyticAverage

public double getAnalyticAverage(double time)
Returns the analytic average, which is μt + δtβ/γ.


getAnalyticVariance

public double getAnalyticVariance(double time)
Returns the analytic variance, which is δtα2/γ3.


getStream

public RandomStream getStream()
Only returns the stream if all streams are equal, including the stream(s) in the underlying InverseGaussianProcess.

Specified by:
getStream in class StochasticProcess

setStream

public void setStream(RandomStream stream)
Sets all internal streams to stream, including the stream(s) of the underlying InverseGaussianProcess.

Specified by:
setStream in class StochasticProcess

SSJ
V. 2.6.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.