SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.stochasticprocess.multivariate.brownian
Class RandomWalk

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.stochasticprocess.multivariate.brownian.Brownian
      extended by com.numericalmethod.suanshu.stats.stochasticprocess.multivariate.brownian.RandomWalk
All Implemented Interfaces:
Construction, DiscretizedSDE

public class RandomWalk
extends Brownian
implements Construction

This is the Random Walk construction of a multivariate Brownian motion.

For constant μ and σ, this method is exact in the sense that the joint distribution of the simulated values coincides with the joint distribution of the corresponding Brownian motion a the time grid points. Please note that this says nothing about what happens between two successive grid points.

For time-dependent μ and σ, this method in general introduce discretization error even at the time grid points, because the increments will no longer have exactly the correct mean and variance.

See Also:
"P. Glasserman. Monte Carlo Methods in Financial Engineering. Section 3.1. pp. 81. Springer. 2004."

Field Summary
 
Fields inherited from class com.numericalmethod.suanshu.stats.stochasticprocess.multivariate.brownian.Brownian
d, mu, sigma
 
Constructor Summary
RandomWalk(int d, int T)
          Construct a multi-dimensional Brownian motion at even time points, [0, 1, ......, T].
RandomWalk(int d, TimeGrid timePoints)
          Construct a multi-dimensional Brownian motion at time points specified.
 
Method Summary
 MultiVariateRealization realization(Vector x0)
          Construct a realization of a stochastic process.
 void seed(long seed)
          Seed the construction process so that we may generate the same realizations.
 
Methods inherited from class com.numericalmethod.suanshu.stats.stochasticprocess.multivariate.brownian.Brownian
dXt, getNewFt, nB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomWalk

public RandomWalk(int d,
                  TimeGrid timePoints)
Construct a multi-dimensional Brownian motion at time points specified.

Parameters:
d - the dimension of the Brownian motion
timePoints - specifying the time points in a grid

RandomWalk

public RandomWalk(int d,
                  int T)
Construct a multi-dimensional Brownian motion at even time points, [0, 1, ......, T].

Parameters:
d - the dimension of the Brownian motion
T - the length of the grid
Method Detail

realization

public MultiVariateRealization realization(Vector x0)
Description copied from interface: Construction
Construct a realization of a stochastic process. The realization is a time series.

Specified by:
realization in interface Construction
Parameters:
x0 - the starting point of the trajectory
Returns:
a realization

seed

public void seed(long seed)
Description copied from interface: Construction
Seed the construction process so that we may generate the same realizations.

Specified by:
seed in interface Construction
Parameters:
seed - seeding the same seed gives arise to the same realization

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.