The CapFloor function calculates the theoretical price, sensitivities, and the implied volatility of option on an interest rate cap or floor using the Black 76 option model. See Interest Rate Models for a further explanation.
CapFloor 
(CapFloorType, ModelStatistic, Principal, Tenor, TimeMaturity, Volatility, ForwardRate, Frequency, TermStructure, YearBasis, MarketPrice, TimeFormat, RateType) 
Note: Optional arguments are shown in Italics. MarketPrice is not Optional for the Implied Volatility Calculation.
Argument 
Description 
CapFloorType 
Alphanumeric value indicating the type of option: •Cap = 1 or "c" (case insensitive) •Floor = 2 or "f" (case insensitive) 
ModelStatistic 
Numeric value indicating the type of function required for the return value: •Theoretical = 1 •Delta = 2 •Gamma = 3 •Theta = 4 •ImpliedVol = 5 •Vega = 6 •Rho = 7 •Lambda = 9 
Principal 
The face value of the bond asset. Must be > 0. 
Tenor 
Time expressed in either Days or Years (depending on the TimeFormat value) until the maturity of the underlying contract. Must be > 0. 
TimeMaturity 
Time expressed in either Days or Years (depending on the TimeFormat value) until the maturity. Must be > 0. 
Volatility 
Annualized volatility of the underlying security. Must be > 0. 
ForwardRate 
The forward rate expressed as a percentage of the principal. This rate is interpreted as a continuously compounded rate unless otherwise specified in the RateType argument. Must be > 0. 
Frequency 
Alphanumeric value indicating the coupon payment frequency when evaluation the bond. 
TermStructure 
A twodimensional array or range of coupon maturity and interest rate pairs where the first column is the maturity and the second is the rate. The rates are interpreted as a continuously compounded rate unless otherwise specified in the RateType argument. All rates must be > 0.
As an example: Term Structure Coupon Rate 0.0 0.02 0.5 0.03 1.0 0.04 1.5 0.05 2.0 0.06 2.5 0.07 
YearBasis 
Optional. Numeric value indicating the format for calculating the payments. If omitted, Actual365 is used as the default. Specified as either: Actual365 = 0 Actual360 = 1 
MarketPrice 
Optional. The selling price of the option in the marketplace. This input is required when implied volatility and strike are calculated. Price must be > 0. 
TimeFormat 
Optional. Alphanumeric value indicating the format of the time arguments (i.e. TimeExpire, TimeExDiv, DivFrequency). If omitted, Days are used as the default. Specified as either: Days = 0 or "D" (case insensitive) Years = 1 or "Y" (case insensitive) 
RateType 
Optional. Alphanumeric value indicating the type of RateType used for both the CouponRate ad Term Structure Rate when evaluating the bond. This value is converted to Continuously Compounded for the calculations. If omitted, a continuously compounded rate is used. 
Example
Cap Option Valuation:Calculate all of the functions for a 3year Cap Option whose principal five years from maturity is $1000, the forward rate is 6.0% per annum with semi annual coupon frequency. The volatility is 20%. The coupon or term structure is as follows: 0 to 1.0 years at 2.0%, 1.0 to 2.0 years at 2.5%, 2.0 years and after at 3.0%. This means that Principal = $1000, ForwardRate = 6.0%, Tenor = 3, TimeMaturity = 5, Volatility = 20%, and Frequency = SemiAnnual. All interest rates are considered continuous and the following term structure is in place:
So, 
Input 


Output 


Variable 
Value 

Function 
Name 
Value 
CapFloor Type 
Cap 

1 
Theoretical: 
1.99529 
Principal 
1000 

2 
Delta (DV01): 
0.03092 
Tenor 
3 

3 
Gamma: 
0.03092 
Time to Maturity 
5 

4 
Theta: 
0.00154 
Volatility 
20% 

5 
Implied Vol: 
0.20012 
Forward Rate 
6.00% 

6 
Vega: 
0.39069 
Frequency 
SemiAnnually 

7 
Rho (Forward Rate): 
0.01270 
Year Basis 
Actual365 

9 
Lambda: 
18.14082 
Market Price 
2.00 




Time Format 
Years 










Term Structure 





Coupon 
Rate 




0.0 
2.50% 




1.0 
2.50% 




2.0 
3.00% 




For a further example on this model see the included Excel Template located in the root directory of the addin. This example can be accessed through the Interest Rate Template menu item after the addin has been installed properly.
A list of all of the possible Error Messages is included for convenience.