MCCliquetEngine - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English
#include "xf_fintech/mc_engine.hpp"
template <
    typename DT = double,
    int UN = 10
    >
void MCCliquetEngine (
    DT underlying,
    DT volatility,
    DT dividendYield,
    DT riskFreeRate,
    DT timeLength,
    DT strike,
    bool optionType,
    DT* resetDates,
    ap_uint <32>* seed,
    DT* output,
    DT requiredTolerance = 0.02,
    unsigned int timeSteps = 100,
    unsigned int requiredSamples = 1024,
    unsigned int maxSamples = 134217727
    )

Cliquet Option Pricing Engine using Monte Carlo Simulation. The B-S model used to describe the dynamics of undelying asset.

Parameters:

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.
underlying intial value of underlying asset.
volatility fixed volatility of underlying asset.
dividendYield the constant dividend rate for continuous dividends.
riskFreeRate risk-free interest rate.
timeLength the time length of contract from start to end.
strike the strike price also known as exericse price, which is settled in the contract.
optionType option type. 1: put option, 0: call option.
resetDates array for reset dates, such as Semiannual, Quarterly.
seed array to store the inital seeds of RNG.
output output array.
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 discrete steps from 0 to T, T is the expiry time, default 100.
maxSamples the maximum sample number. When reaching it, the simulation will stop, default 2,147,483,648.