QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Builds Wiener process paths using Gaussian variates. More...
#include <brownianbridge.hpp>
Public Member Functions | |
BrownianBridge (Size steps) | |
BrownianBridge (const std::vector< Time > ×) | |
BrownianBridge (const TimeGrid &timeGrid) | |
inspectors | |
Size | size_ |
std::vector< Time > | t_ |
std::vector< Real > | sqrtdt_ |
std::vector< Size > | bridgeIndex_ |
std::vector< Size > | leftIndex_ |
std::vector< Size > | rightIndex_ |
std::vector< Real > | leftWeight_ |
std::vector< Real > | rightWeight_ |
std::vector< Real > | stdDev_ |
Size | size () const |
const std::vector< Time > & | times () const |
const std::vector< Size > & | bridgeIndex () const |
const std::vector< Size > & | leftIndex () const |
const std::vector< Size > & | rightIndex () const |
const std::vector< Real > & | leftWeight () const |
const std::vector< Real > & | rightWeight () const |
const std::vector< Real > & | stdDeviation () const |
template<class RandomAccessIterator1 , class RandomAccessIterator2 > | |
void | transform (RandomAccessIterator1 begin, RandomAccessIterator1 end, RandomAccessIterator2 output) const |
Brownian-bridge generator function. More... | |
void | initialize () |
Builds Wiener process paths using Gaussian variates.
This class generates normalized (i.e., unit-variance) paths as sequences of variations. In order to obtain the actual path of the underlying, the returned variations must be multiplied by the integrated variance (including time) over the corresponding time step.
Definition at line 53 of file brownianbridge.hpp.
BrownianBridge | ( | Size | steps | ) |
The constructor generates the time grid so that each step is of unit-time length.
steps | The number of steps in the path |
Definition at line 34 of file brownianbridge.cpp.
BrownianBridge | ( | const std::vector< Time > & | times | ) |
The step times are copied from the supplied vector
times | A vector containing the times at which the steps occur. This also defines the number of steps that will be generated. |
Definition at line 43 of file brownianbridge.cpp.
BrownianBridge | ( | const TimeGrid & | timeGrid | ) |
The step times are copied from the TimeGrid object
timeGrid | a time grid containing the times at which the steps will occur |
Definition at line 50 of file brownianbridge.cpp.
Size size | ( | ) | const |
Definition at line 79 of file brownianbridge.hpp.
const std::vector< Time > & times | ( | ) | const |
Definition at line 80 of file brownianbridge.hpp.
const std::vector< Size > & bridgeIndex | ( | ) | const |
Definition at line 81 of file brownianbridge.hpp.
const std::vector< Size > & leftIndex | ( | ) | const |
Definition at line 82 of file brownianbridge.hpp.
const std::vector< Size > & rightIndex | ( | ) | const |
Definition at line 83 of file brownianbridge.hpp.
const std::vector< Real > & leftWeight | ( | ) | const |
Definition at line 84 of file brownianbridge.hpp.
const std::vector< Real > & rightWeight | ( | ) | const |
Definition at line 85 of file brownianbridge.hpp.
const std::vector< Real > & stdDeviation | ( | ) | const |
Definition at line 86 of file brownianbridge.hpp.
void transform | ( | RandomAccessIterator1 | begin, |
RandomAccessIterator1 | end, | ||
RandomAccessIterator2 | output | ||
) | const |
Brownian-bridge generator function.
Transforms an input sequence of random variates into a sequence of variations in a Brownian bridge path.
begin | The start iterator of the input sequence. |
end | The end iterator of the input sequence. |
output | The start iterator of the output sequence. |
Definition at line 107 of file brownianbridge.hpp.
|
private |
|
private |
Definition at line 140 of file brownianbridge.hpp.
|
private |
Definition at line 141 of file brownianbridge.hpp.
|
private |
Definition at line 142 of file brownianbridge.hpp.
|
private |
Definition at line 143 of file brownianbridge.hpp.
|
private |
Definition at line 143 of file brownianbridge.hpp.
|
private |
Definition at line 143 of file brownianbridge.hpp.
|
private |
Definition at line 144 of file brownianbridge.hpp.
|
private |
Definition at line 144 of file brownianbridge.hpp.
|
private |
Definition at line 144 of file brownianbridge.hpp.