naginterfaces.library.rand.bb_inc_init(t0, tend, times)[source]

bb_inc_init initializes the Brownian bridge increments generator bb_inc(). It must be called before any calls to bb_inc().

For full information please refer to the NAG Library document for g05xc


The starting value of the time interval.


The end value of the time interval.

timesfloat, array-like, shape

The points in the time interval at which the Wiener process is to be constructed. The order in which points are listed in determines the bridge construction order. The function bb_make_bridge_order() can be used to create predefined bridge construction orders from a set of input times.

commdict, communication object

Communication structure.

(errno )

An unexpected error occurred during execution of bb_inc_init. Please contact NAG with the following error message: error in , .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, , and .

Constraint: for all .

(errno )

On entry, , for and .

Constraint: all elements of must be unique.


Brownian Bridge Algorithm

Details on the Brownian bridge algorithm and the Brownian bridge process (sometimes also called a non-free Wiener process) can be found in the G05 Introduction. We briefly recall some notation and definitions.

Fix two times and let be any set of time points satisfying . Let denote a -dimensional Wiener sample path at these time points, and let be any matrix such that is the desired covariance structure for the Wiener process. Each point of the sample path is constructed according to the Brownian bridge interpolation algorithm (see Glasserman (2004) or the G05 Introduction). We always start at some fixed point . If we set where is any -dimensional standard Normal random variable, then will behave like a normal (free) Wiener process. However if we fix the terminal value , then will behave like a non-free Wiener process.

The Brownian bridge increments generator uses the Brownian bridge algorithm to construct sample paths for the (free or non-free) Wiener process , and then uses this to compute the scaled Wiener increments

Such increments can be useful in computing numerical solutions to stochastic differential equations driven by (free or non-free) Wiener processes.


Conceptually, the output of the Wiener increments generator is the same as if bb_init() and bb() were called first, and the scaled increments then constructed from their output. The implementation adopts a much more efficient approach whereby the scaled increments are computed directly without first constructing the Wiener sample path.

Given the start and end points of the process, the order in which successive interpolation times are chosen is called the bridge construction order. The construction order is given by the array . Further information on construction orders is given in the G05 Introduction. For clarity we consider here the common scenario where the Brownian bridge algorithm is used with quasi-random points. If pseudorandom numbers are used instead, these details can be ignored.

Suppose we require the increments of Wiener sample paths each of dimension . The main input to the Brownian bridge increments generator is then an array of quasi-random points where each point has dimension or depending on whether a free or non-free Wiener process is required. When bb_inc() is called, the th sample path for is constructed as follows: if a non-free Wiener process is required set equal to the terminal value , otherwise construct as

where is the matrix described in Brownian Bridge Algorithm. The array holds the remaining time points in the order in which the bridge is to be constructed. For each set , find


and construct the point as

where or depending on whether a free or non-free Wiener process is required. The function bb_make_bridge_order() can be used to initialize the array for several predefined bridge construction orders. Lastly, the scaled Wiener increments

are computed.


Glasserman, P, 2004, Monte Carlo Methods in Financial Engineering, Springer