MCHullWhiteCapFloorEngine - 2023.2 English

Vitis Libraries

Release Date
2023.2 English
#include "xf_fintech/mc_engine.hpp"
template <
    typename DT = double,
    int UN = 1
void MCHullWhiteCapFloorEngine (
    DT nomial,
    DT initRate,
    DT strike,
    bool isCap,
    DT singlePeriod,
    DT alpha,
    DT sigma,
    ap_uint <32>* seed,
    DT* output,
    DT requiredTolerance = 0.02,
    unsigned int requiredSamples = 0,
    unsigned int timeSteps = 2,
    unsigned int maxSamples = 134217727

Cap/Floor Pricing Engine using Monte Carlo Simulation. The Hull-White model is used to describe dynamics of short-term interest. This engine assume a flat term structure.


DT supported data type including double and float data type, which decides the precision of result, default double-precision data type.
UN number of Monte Carlo Module in parallel, which affects the latency and resources utilization, default 10.
nomial Nomial of capfloor contract.
initRate Current spot rate and forward rate (flat term structure).
strike Strike rate of capfloor contract
isCap True for cap, false for floor
singlePeriod period between each settlement date.
alpha Hull White model parameter
sigma Hull White model parameter
seed Array to store the inital seed for each RNG.
output Array to store result
requiredTolerance the tolerance required. If requiredSamples is not set, when reaching the required tolerance, simulation will stop, default 0.02.
requiredSamples the samples number required. When reaching the required number, simulation will stop, default 1024.
timeSteps the number of cap/floor settlement date.
maxSamples the maximum sample number. When reaching it, the simulation will stop, default 2,147,483,648.