QuantLib_BrownianBridge

Langue: en

Autres versions - même langue

Version: 381291 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

QuantLib::BrownianBridge -

Builds Wiener process paths using Gaussian variates.

SYNOPSIS


#include <ql/methods/montecarlo/brownianbridge.hpp>

Public Member Functions


BrownianBridge (Size steps)

BrownianBridge (const std::vector< Time > &times)

BrownianBridge (const TimeGrid &timeGrid)

template<class RandomAccessIterator1 , class RandomAccessIterator2 > void transform (RandomAccessIterator1 begin, RandomAccessIterator1 end, RandomAccessIterator2 output) const
Brownian-bridge generator function.

inspectors

 


Size size () const

const std::vector< Time > & times () const

Detailed Description

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.

Constructor & Destructor Documentation

BrownianBridge (Size steps)The constructor generates the time grid so that each step is of unit-time length.

Parameters:

steps The number of steps in the path

BrownianBridge (const std::vector< Time > & times)The step times are copied from the supplied vector

Parameters:

times A vector containing the times at which the steps occur. This also defines the number of steps that will be generated.

Note:

the starting time of the path is assumed to be 0 and must not be included

BrownianBridge (const TimeGrid & timeGrid)The step times are copied from the TimeGrid object

Parameters:

timeGrid a time grid containing the times at which the steps will occur

Member Function Documentation

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.

Parameters:

begin The start iterator of the input sequence.
end The end iterator of the input sequence.
output The start iterator of the output sequence.

Note:

To get the canonical Brownian bridge which starts and finishes at the same value, the first element of the input sequence must be zero. Conversely, to get a sloped bridge set the first element to a non-zero value. In this case, the final value in the bridge will be sqrt(last time point)*(first element of input sequence).

Author

Generated automatically by Doxygen for QuantLib from the source code.