hjmEngine - 2023.2 English

Vitis Libraries

Release Date
2023.2 English
#include "xf_fintech/hjm_engine.hpp"
template <
    typename DT,
    class PT,
    unsigned MAX_TENORS,
    unsigned MAX_CURVES,
    unsigned PCA_NCU = 1,
    unsigned MC_UN = 1
void hjmEngine (
    const unsigned tenors,
    const unsigned curves,
    const float simYears,
    const unsigned noPaths,
    PT pricer [MC_UN][1],
    ap_uint <32> seeds [MC_UN][hjmModelParams::N],
    hls::stream <DT>& outPrice

Prepares and runs a Monte-Carlo simulation and pricing for the Heath-Jarrow-Morton framework from historical data. Combines hjmPcaEngine and hjmMcEngine into a single operation.


DT The internal DataType in the simulation.
PT The class name for the HJM pricer.
MAX_TENORS The maximum number of supported tenors in the simulation.
MAX_CURVES Maximum synthetisable number of entries from the historial data.
PCA_NCU Number of parallel computing units when implementing the PCA engine.
MC_UN The Unroll Number for the path generators and pricers. It will determine the level of parallelism of the simulation.
tenors Number of tenors to process. Must be <= MAX_TENORS .
curves Number of curves in the historical data matrix.
simYears Number of years to simulate per path. Each path’s IFR matrix is composed of simYears/dt rows.
noPaths Number of MonteCarlo paths to generate.
ratesIn Historical data matrix.
pricer UN instances of the selected path pricer. Must be of PT class and implement the correct MC path pricer method interface.
seed Seeds for the RNGs in the simulation. There are N RNGs per path generator and UN path generators.
outputPrice Stream with the calculated HJM output price.