template class xf::fintech::Fdm1dMesher

#include "fdmmesher.hpp"

Overview

One-dimensional simple FDM mesher object working on an index.

Parameters:

DT The data type, which decides the precision of the mesher, and the default data type is double.
_sizeMax The maximum number of the coordinates supported in the implementation
template <
    typename DT,
    unsigned int _sizeMax
    >
class Fdm1dMesher

Methods

Fdm1dMesher

Fdm1dMesher ()

constructor

init

void init (
    const OrnsteinUhlenbeckProcess <DT>& process,
    DT maturity,
    DT eps,
    unsigned int size,
    DT _locations [_sizeMax]
    )

Calulate the mesher using Ornstein-Uhlenbeck process. The implementation is modified for minimum resource utilizations.

Parameters:

process The initialized Ornstein-Uhlenbeck process.
maturity The maturity of the swaption in years.
eps The default Epsilon should be 1.0e-5.
_locations The result of coordinates.
size The actual size of the coordinates.

inverseCumulativeNormalAcklamAreaOpt

template <typename mType>
mType inverseCumulativeNormalAcklamAreaOpt (mType input)

Inverse CumulativeNormal using Acklam’s approximation to transform uniform random number to normal random number. As this process will only be executed for once in the pricing engine, so it is optimized for minimum resource utilization while having a reasonable latency.

Reference: Acklam’s approximation: by Peter J. Acklam, University of Oslo, Statistics Division.

Parameters:

mType data type.
input input uniform random number

Returns:

normal random number