template struct xf::fintech::lmmCorrelationGenerator¶
#include "lmm.hpp"
Overview¶
Class with parametric correlation matrix generators for the LMM. These functions will generate symmetric, positive and monotonically decreasing correlation matrices based on user parameters.
Parameters:
DT | The data type for the correlation values. |
template <typename DT> struct lmmCorrelationGenerator
Methods¶
oneParametricCorrelation¶
static void oneParametricCorrelation ( DT beta, unsigned noTenors, hls::stream <DT>& rho )
Calculates 1-parametric correlation matrix, with evenly spaced tenors
\[rho_ij = exp(-beta * |T_i - T_j|)\]
.
twoParametricCorrelation¶
static void twoParametricCorrelation ( DT beta [2], unsigned noTenors, hls::stream <DT>& rho )
Calculates 2-parametric correlation matrix, with evenly spaced tenors
\[rho_ij = beta_0 + (1 - beta_0) * exp(-beta_1 * |T_i - T_j|)\]
.