the YoYInflationBlackCapFloorEngine is year-on-year inflation cap/floor engine based on black formula. The structure of the engine is shown as the figure below:
As we can see from the figure, the engine mainly contains 4 functions.
- function discountFactor: the discount factor is calculated at the corresponding time point.
- function totalVariance: the total variance of volatility is calculated at the corresponding time point.
- function yoyRateImpl: the year-on-year forward rate is calculated at the corresponding time point.
- function blackFormula: the black formula calculates the value of the option based on the results of the three functions mentioned above.
Finally, the addition of the results from each time point is the final price (NPV).