Creates a new Index based on SWAP details.
Used when pricing CMS swaps or creating SWAP deals quickly with minimal arguments.
Please refer to the large number of enumeration functions present within the
CapeTools Enums category of functions.
The
CapeTools Enums category of functions return correct string codes that can be passed to parameters taking fixed string values defined by the library (ie - DayCount codes, frequency codes, currency codes, compounding codes, business day convention codes etc...).
You can thus execute these enumeration functions which return the proper code, instead of trying to remember the string code needed or making spelling mistakes which can be difficult to debug.
There are nine algorithms that you can specify for the computation of the CMS adjustments.
Hull (which is described in 'Options, Futures, and derivatives' 5th Edition, pp600) and the other eight algorithms are based on Hagan ('Convexity Conundrums: Pricing CMS Swaps, Caps, and Floors', wilmott magazine) . HaganFullStd (integration via swaptions using Bond maths) is based on - equations 2.19a and A.3. HaganFullExact (integration via swaptions using exact yields) is based on - equations 2.19a and A.8. HaganFullPShift (integration via swaptions using Parallel shifts) is based on - equations 2.19a and A.12a. HaganFullNonPShift (integration via swaptions using Non-Parallel shifts) is based on - equations 2.19a and A.15a. HaganBlackStd (Analytical version of Hagan's formula using the Black model coupled with Bond maths) is based on - equations 3.5a and A.3. HaganBlackExact (Analytical version of Hagan's formula using the Black model coupled with exact yield calculations) is based on - equations 3.5a and A.8. HaganBlackPShift (Analytical version of Hagan's formula using the Black model coupled with Parallel shifts) is based on - equations 3.5a and A.12a. HaganBlackNonPShift (Analytical version of Hagan's formula using the Black model coupled with Non-Parallel shifts) is based on - equations 3.5a and A.15a. In terms of rate convexity adjustment, 'Hull' is the fastest but the least accurate.
Next we have 'HaganBlackStd', 'HaganBlackPShift', 'HaganBlackNonPShift' and 'HaganBlackExact'. These are quite fast also however they suffer from the fact that they do not take advantage of the volatility smile.
They use the ATM volatility only within their convexity formula.
'Hull' also uses ATM volatilities but uses a different method to handle CMS payment date adjustments.
The most accurate, but the slowest are the 'HaganFullStd', 'HaganFullPShift', 'HaganFullNonPShift' and 'HaganFullExact' algorithms.
They try to capture the volatility smile via the integration of swaptions.
We have made some optimizations to the volatility curves to detect when the 'HaganFullStd' and 'HaganFullExact' are being conducted and thus optimise volatility retrival.
Finally the value within the 'CMSAlgo' parameter determines the algorithm used for the computation of CMS caplets and floorlets.
'HaganBlackStd' will be used if 'Hull' is specified.
CMS Caplets and Floorlets are computed via CALL-PUT Parity.
This function creates an object and returns a string-key value to represent this created object.
The TAG value of the string-key returned (second part of the key) is : "SWIDX"
- Key parameter
Key value to use as a handle for the created object
- Reload parameter
When creating this object for the first time, set this parameter to a positive value. Within Excel, when re-computing a worksheet where you do not wish to recreate the object, set this parameter to zero (0).
- SwapIndName parameter
A Tag name you would like the new Swap Index code to display when querying.
- SwapTenor parameter
The tenor of the swap index.
- SettlDays parameter
The number of days till settlement.
- SwapFreq parameter
Frequency of the FIX side of the swap.
- SwapDayCount parameter
DayCount code to use for the FIX side of the swap.
- SwapBusDayConv parameter
Business day convention code to use for the FIX side of the swap.
- FixLegCal parameter
Calendar Key required for adjusting the end dates of each cash flow on the FIX leg of the swap.
- IndexKey parameter
Key to an already constructed Libor Index key. This Index contains all the information for the Float side of the swap.
- CMSAlgo parameter
The CMS algorithm to apply. Possible values are 'Hull', 'HaganFullStd' (integration via swaptions using Bond maths), 'HaganFullExact' (integration via swaptions using exact yields), 'HaganFullPShift' (integration via swaptions using Parallel shifts), 'HaganFullNonPShift' (integration via swaptions using Non-Parallel shifts), 'HaganBlackStd' (Analytical version of Hagan's formula using the Black model coupled with Bond maths), 'HaganBlackExact' (Analytical version of Hagan's formula using the Black model coupled with exact yield calculations), , 'HaganBlackPShift' (Analytical version of Hagan's formula using the Black model coupled with Parallel shifts) or 'HaganBlackNonPShift' (Analytical version of Hagan's formula using the Black model coupled with Non-Parallel shifts).
- CMSMeanRev parameter
If the 'CMSAlgo' parameter is set to 'HaganBlackNonPShift' or 'HaganFullNonPShift' then a positive mean reversion parameter is required.
- PastFixings parameter
Optional Swap past fixings range.
The C# example below contains all the sub-function calls leading up to this function call. As a result, the example can contain a lot of code.
The VB.NET, J#, C++.NET, Java, Excel VBA, Visual Basic 6 (via COM) and C++ examples below contain function code stubs for the calls leading up to this function call. However, the function call for this function is displayed.
You can easily reproduce the stub functions code from the
C# example.
Copyright (c) 2003-2007 CapeTools - All Rights Reserved.