Creates a Swap template which is almost identical to the definition of the parameters of a swap contract, but without the swap duration, buysell, and YieldCurve information.
This template object can be used within the construction of YieldCurves in order to provide default information for all swap rates.
The template also simplifies input to functions that require the details of a swap contract (ie -
MKTSwap5() function).
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.
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 : "SwapTPL"
- 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).
- Name parameter
A friendly name that you wish to associate with this template
- FixingDays parameter
Number of days for fixing a rate.
- CashFlowCal parameter
Calendar Key required for holiday adjustments of the end dates of each cashflow period on the FIX leg of the swap.
- CashFlowBDConv parameter
Business day convention needed for day adjustments when an adjustment moves the date into the preceding, following month. Needed for each cashflow period of the FIX side of the swap leg.
- CashFlowFreq parameter
The Frequency of the FIX side of the swap. (Can use any of the Frequency codes contained within the 'CapeTools Frequency Enums' category of functions).
- dayCounter parameter
Daycounter required for year length calculations. Used for each cashflow period of the FIX side of the swap.
- FLTIndTemplate parameter
The Index template that will be applied to the FLOAT side of the swap.
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.