template class xf::fintech::HWModelAnalytic¶
#include "hw_model.hpp"
Overview¶
Hull-White model Analytical Engine.
Parameters:
| DT | data type supported include float and double |
template < typename DT, int LEN > class HWModelAnalytic
Methods¶
initialization¶
void initialization ( DT a, DT sigma, DT T [LEN], DT R [LEN] )
initialize parameters
Parameters:
| a | initial volatility of stock. |
| sigma | the volatility of volatility. |
| A | |
| B |
shortRate¶
DT shortRate (DT t)
calcutate short-rate of dt at t
Parameters:
| t | the current timepoint |
Returns:
anaylitic short-rate
discountBond¶
DT discountBond ( DT t, DT T, DT rate )
calculate the discount after time t
Parameters:
| t | the current time point |
| T | the maturity |
Returns:
discount bond price