template class xf::fintech::HWModel <DT, void, 0>

#include "hw_model.hpp"

Overview

Hull-White model for FD (finite difference) Engine.

Parameters:

DT data type supported include float and double
template <typename DT>
class HWModel <DT, void, 0>

Methods

HWModel

HWModel ()

constructor

initialization

void initialization (
    DT r,
    DT spread,
    DT a,
    DT sigma
    )

initialize parameters

Parameters:

r floating benchmark annual interest rate
spread spreads on interest rates
a initial volatility of stock.
sigma the volatility of volatility.

fdShortRate

DT fdShortRate (DT t)

calcutate short-rate of dt at t for fd Engine

Parameters:

t the current timepoint

Returns:

finite difference short-rates

discountBond

DT discountBond (
    DT t,
    DT T,
    DT rate
    )

calculate the discount after time dt

Parameters:

t the current timepoint
T The timepoint
rate shortrate

Returns:

discount Bond