Creates an amortised CashFlow leg which pays a predetermined amount at each date.
This function requires the input of an amortisation object key, which must have been produced via a call to the
CreateAmortObj() function.
This function would have returned a string 'KEY' which is to be passed to the 'AmortKey' parameter of this function.
This leg object can either be priced directly via the
PrcLegObject() function or you can use this leg within the
SwapFIXFIX3() or
Swap2() functions in order to construct the details of one side of a swap structure.
Finally there are numerous querying functions that can be applied to this leg (within the
CapeTools Query Legs category of functions).
This function requires the input of a Schedule object key, which must have been produced via a call to one of the following functions :
MakeSchedule() or
MakeSchedule2(). These functions would have returned a string 'KEY' which is to be passed to the 'ScheduleKey' parameter of this 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 : "ACSHLEG"
- 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).
- PayRec parameter
Whether you would like to PAY or REC this leg.
- Gearing parameter
A positive factor value you wish to multiply the Floating-Reset Rate/Fixed-Coupon Rate by (Usually 1). If you want to simply double the value of the leg, modify the Notional value. For floating legs, if we denote 'M' as a margin/spread, 'G' as the gearing and 'L' as the fixing rate, the gearing will be applied as following : 'G*L+M'. For fixed rate legs, if we denote 'C' as the coupon rate and 'G' as the gearing, then the gearing value will be applied as 'G*C' which is, in effect, the same as doubling the value of the leg.
- AmortKey parameter
Key to an already generated amortisation object.
- Ccy parameter
Currency of the Notional amount.
- BusDayConv parameter
Payment Business Day Convention. Treatment of date calculations for (discounting).
- ExchangePrincipal parameter
Whether you wish to exchange the principal amount(s) at the start and termination of the leg contract.
- MKTKey parameter
Key to an already constructed MKT object that contains at least a discounting curve. The VolCurve should be present if pricing CMS or In-Arrear legs, deals. The curves contained within this object should all be of the same Currency of which must equal the value of the 'Ccy' parameter of this function.
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.