template class xf::fintech::HWAEngine

#include "hwa_engine.hpp"

Overview

Parameters:

TEST_DT  
LEN  
template <
    typename DT,
    int LEN
    >
class HWAEngine

Methods

HWAEngine

HWAEngine ()

default constructor

init

void init (
    DT a,
    DT sigma,
    DT times [LEN],
    DT rates [LEN]
    )

init create the hullwhite analytic model

a sigma times rates

bondPrice

DT bondPrice (
    DT t,
    DT T
    )

bondPrice calculate the bond price

t T

optionPrice

DT optionPrice (
    int type,
    DT t,
    DT T,
    DT S,
    DT K
    )

optionPrice calculate the option price

type t T S K P

capfloorPrice

DT capfloorPrice (
    int type,
    DT start,
    DT end,
    DT freq,
    DT N,
    DT X
    )

CapFloorPrice calculate the cap/floor price.

type start end freq N X P