Processes
Class VectorProcess

java.lang.Object
  extended byProcesses.VectorProcess
Direct Known Subclasses:
VectorBrownianMotion

public abstract class VectorProcess
extends java.lang.Object

Abstract class implementing some methods for an n-dimensional stochastic * process X(t) and leaving process specific details abstract to be overridden * in concrete subclasses.

* *

The values X(t) are arrays of size double[dim], where dim is the * dimension of the process. * The only abstract method is timeStep(int). All other methods provide * default implementations. In other words if you want a concrete vector * stochastic process all you need to do is to subclass from VectorProcess and * to define this one method or to call the constructor and define the method * in the body of the constructor call.

* *

Path computation: the basic procedure is to continue a path * which has already been realized until time t from time t to the horizon * (branching at time t). * Here we are simulating future scenarios conditional on the state at time t. * This is what is needed for the computation of conditional expectations * conditioning on all information available at time t. The computation of * entire paths is then merely a continuation from time t=0.

* *

Time is measured in discrete units (the time step dt). Integer time t * corresponds to continuous time t*dt. The case dt=1 is the special case of a * sequential process.

* * @author Michael J. Meyer


Constructor Summary
VectorProcess(int dim, int T, double dt, double[] X_0)
          Constructor performing all initializations but leaving the abstract * method timeStep(int) undefined.
 
Method Summary
 int get_dim()
          Dimension of process.
 double get_dt()
          Size of time step.
 double[][] get_path()
          Reference to array containing the (vectorial) path of the process X * (this).
 int get_T()
          Number of time steps to horizon.
 double[] get_X_0()
          Initial value X(0).
 void newPathBranch()
          Computes a new path from time t=0.
 void newPathBranch(int t)
          Continues a path existing on [0,t] from time t to * the horizon (branching a given path at time t), that is, * computes path[s], s=t+1,...,T, from path[u], u<=t.
 void pathSegment(int t, int s)
          Computes a new path segment from time t to time s through all * intermediate times t+1,...,s-1.
 int pathSegment(int t, StoppingTime tau)
          Computes a new path segment from time t to the random time tau.
 int pathSegment(StoppingTime tau)
          Computes a new path segment from time t=0 to the random time tau.
 RandomVector sampledAt(StoppingTime tau)
          Computes the random vector X_tau (X sampled at the * stopping time tau) where X is the current VectorProcess * (this).
 void simulationInit(int t)
          Sets up a path simulation (t=0) or a simulation of * branches of an existing path (t>0, conditional expectations).
abstract  void timeStep(int t)
          Evolves the path from discrete time [0,t] to time t+1, * that is, computes path[t+1] from path[u], u<=t.
 void timeStep(int t, int s)
          Computes path[s] from path[u], u<=t.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorProcess

public VectorProcess(int dim,
                     int T,
                     double dt,
                     double[] X_0)

Constructor performing all initializations but leaving the abstract * method timeStep(int) undefined.

* * Instantiate a VectorProcess by defining this method in the body * of the constructor call.

Method Detail

get_dim

public int get_dim()

Dimension of process.


get_T

public int get_T()

Number of time steps to horizon.


get_dt

public double get_dt()

Size of time step.


get_X_0

public double[] get_X_0()

Initial value X(0).


get_path

public double[][] get_path()

Reference to array containing the (vectorial) path of the process X * (this). path[t]=X(t*dt) is a double[] * of size dim since X(t*dt) is a dim dimensional vector.


simulationInit

public void simulationInit(int t)

Sets up a path simulation (t=0) or a simulation of * branches of an existing path (t>0, conditional expectations). * Default: empty, nothing to do.

* * @param t current time.


timeStep

public abstract void timeStep(int t)

Evolves the path from discrete time [0,t] to time t+1, * that is, computes path[t+1] from path[u], u<=t.

* * @param t current time.


newPathBranch

public void newPathBranch(int t)

Continues a path existing on [0,t] from time t to * the horizon (branching a given path at time t), that is, * computes path[s], s=t+1,...,T, from path[u], u<=t.

* * Default implementation: calls to timeStep. * This is not the most efficient method, override if fastest * path computation is a concern. * * @param t time of branching.


newPathBranch

public void newPathBranch()

Computes a new path from time t=0.


timeStep

public void timeStep(int t,
                     int s)

Computes path[s] from path[u], u<=t.

* *

Sometimes this can be accomplished in a single step without stepping * through intermediate times t+1,...,s-1. In this case path computations * can often be sped up by sampling the path only at the times s which are * needed.

* *

Default: individual time steps, no efficiency gain. * This is meant to be overridden where possible but a default is * provided for convenience.

* * @param t current time. * @param s future time.


pathSegment

public void pathSegment(int t,
                        int s)

Computes a new path segment from time t to time s through all * intermediate times t+1,...,s-1. * Default implementation: calls to timeStep.

* * @param t current time. * @param s future time.


pathSegment

public int pathSegment(int t,
                       StoppingTime tau)

Computes a new path segment from time t to the random time tau. * Default implementation: calls to timeStep.

* * @param t current time. * @param tau random future time. * @return Value of the time tau when the path is stopped.


pathSegment

public int pathSegment(StoppingTime tau)

Computes a new path segment from time t=0 to the random time tau. * Default implementation: calls to timeStep.

* * @param tau time when path is stopped. * @return Value of the time tau when the path is stopped.


sampledAt

public RandomVector sampledAt(StoppingTime tau)

Computes the random vector X_tau (X sampled at the * stopping time tau) where X is the current VectorProcess * (this).

* * @param tau stopping time at which (this) X is sampled. * @return (this) X sampled at the stopping time tau.