Implementation - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English

This section mainly introduces the implementation process of short-rate and discount, which is applied in Tree/Finite-difference Engine. They are core part for option pricing.

The class \(G2Model\) implements the two-factor model to calculate short-rate and discount. The implementation process is introduced as follows:

  1. Function treeShortRate: a) Since the short-rate at the current time point is independent from the short-rate at the previous time point, there is no need to calculate the short-rate in this module. b) To be compatible with the generic Tree framework, this model performs the calculation of parameters of 2 independent trinomial trees.
  2. Function shortRate: The short-rate is calculated at time point \(t\).
  3. Function discount: The discount is calculated at time point \(t\) with the duration \(dt\) by function discount based on the short-rate.
  4. Function discountBond: the discount bond is calculated at time point \(t\) with the duration \(dt=T-t\) based on the short-rate.