template class xf::fintech::internal::HestonPathGenerator <kDTQuadraticExponential, DT, SampNum, WithAntithetic>

#include "path_generator.hpp"

Overview

HestonPathGenerator log of price of underlying asset, based on Heston Model.

Parameters:

discrT variation of Heston model
DT supported data type including double and float.
SampNum Number of path supported.
template <
    typename DT,
    int SampNum,
    bool WithAntithetic
    >
class HestonPathGenerator <kDTQuadraticExponential, DT, SampNum, WithAntithetic>

// fields

static const unsigned int OutN
DT underlying
DT dividendYield
DT riskFreeRate
DT v0
DT kappa
DT theta
DT sigma
DT rho
DT dt
DT sdt
DT kappa_dt
DT sigma_sdt
DT hov
DT ex
DT k0
DT k1
DT k2
DT k3
DT k4
DT A
DT drift

Fields

DT underlying

initial value of log of price of underlying asset

DT dividendYield

dividendYield of underlying asset

DT riskFreeRate

riskFreeRate or expected anual growth rate of stock price

DT v0

initial value of volatility process

DT kappa

rate of volatility returns to theta

DT theta

long term variance

DT sigma

volatility of volatility

DT rho

correlation of two random walks

DT dt

Time difference.

DT sdt

square root of time difference

DT kappa_dt

kappa * dt

DT sigma_sdt

sigma * sdt

DT hov

sqrt(1 - rho * rho)

DT ex

Other paratmers pre-calculated for Heston model. May not be used in certain variation.

Methods

NextPath

void NextPath (
    ap_uint <16> steps,
    ap_uint <16> paths,
    hls::stream <DT> randNumberStrmIn [3],
    hls::stream <DT> pathStrmOut [OutN]
    )

Parameters:

steps total timesteps of Heston Model
paths number of path of single call
randNumberStrmIn input random number stream
pathStrmOut stream of result generated.