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 core part of option pricing, and applied in Tree Engine.

As a critical part of Tree Engine, the class \(BKModel\) implements the single-factor Black-Karasinski model to calculate short-rate and discount by using continuous compounding. The implementation process is introduced as follows:

    1. The short-rate is calculated at time point \(t\) with the duration \(dt\) from 0 to N point-by-point by functions treeShortRate, initRate and iterRate. As the core part of the treeShortRate, the outer loop_rateModel is used to ensure the results under pre-specified tolerance. For the internal functions, the functionality of initRate and iterRate is similar with each other, but initRate can produce 3 intermediate results while the iterRate gives only one per iteration. In order to achieve intiation interval (II)=1, the array values16 is added to store the intermediate results. Then an addtion tree is performed subsequently for the whole process.
    2. For implementing the generic Tree framework, the \(state\_price\) calculating process is moved from Tree Lattice to this Model.
  1. The discount is calculated at time point \(t\) with the duration \(dt\) based on the short-rate.