Set the global evaluation date. This date is taken as the reference date for all yield curves and benchmark rates unless another date is specified explicitly.
The nominal amount is 100.
Create a 6-month EURIBOR benchmark rate with a forecasted rate of 5%. No history is available for this rate.
Construct a discount interest rate curve.
Construct floating-leg payments.
Construct an interest rate cap with a fixed cap rate of 7% for all payments in the floating leg.
Price these instruments using the Black model with a discount rate of 5% and a volatility of 20%, and verify that the price of the cap is equal to the sum of the prices of the other two instruments.