treeCallableEngine - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English
#include "xf_fintech/tree_engine.hpp"
template <
    typename DT,
    typename Model,
    typename Process,
    int DIM,
    int LEN,
    int LEN2
    >
void treeCallableEngine (
    Model& model,
    DT* process,
    int type,
    DT fixedRate,
    int timestep,
    DT initTime [LEN],
    int initSize,
    int* callableCnt,
    int* paymentCnt,
    DT flatRate,
    DT nominal,
    DT x0,
    DT spread,
    DT* NPV
    )

Tree Callable Fixed Rate Bond Pricing Engine using Trinomial Tree based 1D Lattice method.

Parameters:

DT supported data type including double and float data type, which decides the precision of result.
Model short-rate model
Process stochastic process
DIM 1D or 2D short-rate model
LEN maximum length of timestep, which affects the latency and resources utilization.
LEN2 maximum length of node of tree, which affects the latency and resources utilization.
model short-rate model that has been initialized
process parameters of stochastic process
type type of the callability, 0: Call, 1: Put
fixedRate fixed annual interest rate.
timestep estimate the number of discrete steps from 0 to T, T is the expiry time.
initTime the time including begin timepoint, end timepoint, exercise timepoints, floating coupon timepoints, and fixed coupon timepoints is arranged from small to large. The timepoints are relative values based on the reference date the unit is year.
initSize the length of array initTime.
callableCnt callable timepoints count in initTime.
paymentCnt payment timepoints count in initTime.
flatRate floating benchmark annual interest rate
nominal nominal principal
x0 initial underlying
spread spreads on interest rates
NPV is pricing result array of this engine
#include "xf_fintech/tree_engine.hpp"
template <
    typename DT,
    typename Model,
    typename Process,
    int DIM,
    int LEN,
    int LEN2
    >
void treeCallableEngine (
    Model& model,
    DT* process1,
    DT* process2,
    int type,
    DT fixedRate,
    int timestep,
    DT initTime [LEN],
    int initSize,
    int* callableCnt,
    int* paymentCnt,
    DT flatRate,
    DT nominal,
    DT x0,
    DT spread,
    DT rho,
    DT* NPV
    )

Tree Callable Fixed Rate Bond Pricing Engine using Trinomial Tree based 2D Lattice method.

Parameters:

DT supported data type including double and float data type, which decides the precision of result.
Model short-rate model
Process stochastic process
DIM 1D or 2D short-rate model
LEN maximum length of timestep, which affects the latency and resources utilization.
LEN2 maximum length of node of tree, which affects the latency and resources utilization.
model short-rate model that has been initialized
process1 1st dimensional parameters of stochastic process
process2 2nd dimensional parameters of stochastic process
type type of the callability, 0: Call, 1: Put
fixedRate fixed annual interest rate.
timestep estimate the number of discrete steps from 0 to T, T is the expiry time.
initTime the time including begin timepoint, end timepoint, exercise timepoints, floating coupon timepoints, and fixed coupon timepoints is arranged from small to large. The timepoints are relative values based on the reference date the unit is year.
initSize the length of array initTime.
callableCnt callable timepoints count in initTime.
paymentCnt payment timepoints count in initTime.
flatRate floating benchmark annual interest rate
nominal nominal principal
x0 initial underlying
spread spreads on interest rates
rho the correlation coefficient between price and variance.
NPV is pricing result array of this engine