public class BrownianBridge extends Object implements BrownianMotion
A Brownian bridge is a conditional Brownian motion, i.e. for given random variables
X and Y the Brownian bridge is
(W(t) | W(s) = X , W(T) = Y),
where W is a Brownian motion and s ≤ t ≤ T.
The samples of the Brownian bridge are generated by a Brownian motion which will be used to fill the gap between start and end. It is important that this Browninan motion is independent from the one which generated start and end, i.e. here: it should have a different seed.
The class implements the BrownianMotion, i.e., it only provides the increments
of the Brownian bridge (however, in most application, like refinement of an Euler-scheme, this is
exactly the desired object).
Note: The number of paths needs to be specified, because the start and the end point may be not stochastic, i.e. it is not possible to infer this quantity from the specified start and end.
| Constructor and Description |
|---|
BrownianBridge(TimeDiscretization timeDiscretization,
int numberOfPaths,
int seed,
RandomVariable[] start,
RandomVariable[] end)
Construct a Brownian bridge, bridging from a given start to a given end.
|
BrownianBridge(TimeDiscretization timeDiscretization,
int numberOfPaths,
int seed,
RandomVariable start,
RandomVariable end)
Construct a Brownian bridge, bridging from a given start to a given end.
|
| Modifier and Type | Method and Description |
|---|---|
RandomVariable |
getBrownianIncrement(int timeIndex,
int factor)
Return the Brownian increment for a given timeIndex.
|
BrownianMotion |
getCloneWithModifiedSeed(int seed)
Return a new object implementing BrownianMotion
having the same specifications as this object but a different seed
for the random number generator.
|
BrownianMotion |
getCloneWithModifiedTimeDiscretization(TimeDiscretization newTimeDiscretization)
Return a new object implementing BrownianMotion
having the same specifications as this object but a different
time discretization.
|
RandomVariable[] |
getIncrement(int timeIndex)
Return the increment for a given timeIndex.
|
RandomVariable |
getIncrement(int timeIndex,
int factor)
Return the increment for a given timeIndex and given factor.
|
int |
getNumberOfFactors()
Returns the number of factors.
|
int |
getNumberOfPaths()
Returns the number of paths.
|
RandomVariable |
getRandomVariableForConstant(double value)
Returns a random variable which is initialized to a constant,
but has exactly the same number of paths or discretization points as the ones used by this BrownianMotion.
|
TimeDiscretization |
getTimeDiscretization()
Returns the time discretization used for this set of time-discrete Brownian increments.
|
String |
toString() |
public BrownianBridge(TimeDiscretization timeDiscretization, int numberOfPaths, int seed, RandomVariable[] start, RandomVariable[] end)
timeDiscretization - The time discretization used for the Brownian increments.numberOfPaths - Number of paths to simulate.seed - The seed of the random number generator.start - Start value of the Brownian bridge.end - End value of the Brownian bridge.public BrownianBridge(TimeDiscretization timeDiscretization, int numberOfPaths, int seed, RandomVariable start, RandomVariable end)
timeDiscretization - The time discretization used for the Brownian increments.numberOfPaths - Number of paths to simulate.seed - The seed of the random number generator.start - Start value of the Brownian bridge.end - End value of the Brownian bridge.public RandomVariable getBrownianIncrement(int timeIndex, int factor)
BrownianMotiongetBrownianIncrement in interface BrownianMotiontimeIndex - The time index (corresponding to the this class's time discretization).factor - The index of the factor (independent scalar Brownian increment).public TimeDiscretization getTimeDiscretization()
BrownianMotiongetTimeDiscretization in interface BrownianMotiongetTimeDiscretization in interface IndependentIncrementspublic int getNumberOfFactors()
BrownianMotiongetNumberOfFactors in interface BrownianMotiongetNumberOfFactors in interface IndependentIncrementspublic int getNumberOfPaths()
BrownianMotiongetNumberOfPaths in interface BrownianMotiongetNumberOfPaths in interface IndependentIncrementspublic RandomVariable getRandomVariableForConstant(double value)
BrownianMotiongetRandomVariableForConstant in interface BrownianMotiongetRandomVariableForConstant in interface IndependentIncrementsvalue - The constant value to be used for initialized the random variable.public BrownianMotion getCloneWithModifiedSeed(int seed)
BrownianMotiongetCloneWithModifiedSeed in interface BrownianMotiongetCloneWithModifiedSeed in interface IndependentIncrementsseed - New value for the seed.public BrownianMotion getCloneWithModifiedTimeDiscretization(TimeDiscretization newTimeDiscretization)
BrownianMotiongetCloneWithModifiedTimeDiscretization in interface BrownianMotiongetCloneWithModifiedTimeDiscretization in interface IndependentIncrementsnewTimeDiscretization - New time discretizationpublic RandomVariable[] getIncrement(int timeIndex)
IndependentIncrementsgetIncrement in interface IndependentIncrementstimeIndex - The time index (corresponding to the this class's time discretization)public RandomVariable getIncrement(int timeIndex, int factor)
IndependentIncrementsgetIncrement in interface IndependentIncrementstimeIndex - The time index (corresponding to the this class's time discretization)factor - The index of the factor (independent scalar increment)Copyright © 2019. All rights reserved.