Creates a yield curve using market rates (No cross-currency Swaps).
This curve will apply an interpolation methodology ('BackStep', 'ForwardStep', 'Linear', 'LogLinear' or 'Cubic' via the 'InterpMethod' parameter) upon the FORWARD RATES.
This curve can be used for retrieving forward rates, discount factors and zero rates.
Can also be used to price market instruments, deposits, futures, FRAs, CMS and Swap rates.
This function requires the input of a IndexKey template object key, which must have been produced via a call to
CreateDepoTemplate(). This function would have returned a string 'KEY' which is to be passed to the 'DepoIndex' parameter of this function.
This function requires the input of a SWAP IndexKey template object key, which must have been produced via a call to
CreateSwapTemplate(). This function would have returned a string 'KEY' which is to be passed to the 'Swap Index' parameter of this function.
This function requires the input of a Calendar object key, which must have been produced via a call to one of the Calendar creation functions present within the
CapeTools Calendars category of functions.
These functions would have returned a string 'KEY' which is to be passed to the 'Cal' parameter of this function.
For the 'DayCount' and 'BusDayConv' parameters, 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 : "MYC_F"
- 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).
- CurveName parameter
A tag used to identify this curve (case insensitive) if placed within a Yieldcurve collection ( via the
GroupedCurves() function ). If you pass in an empty string, it will default to the name of the 'Key' parameter.
- ValueDate parameter
Key to an already created Valuation Date Object. (Via the
ValueDateObj() function).
- oTenorsRates parameter
A 2 or 3 column range of rates tenors (can be deposits, futures, FRAS or swaps) and rates. Futures tenors are inputted via futures codes (where the underlying is a 3M contract). The first character must be one of : F, G, H, J, K, M, N, Q, U, V, X or Z and these correspond to the third Wednesday of January, February, March, April, May, June, July, August, September, October, November and December respectively. The next two characters denote the year. Thus 'Z07' denotes the expiry date for a 3M futures contract that expires on the third Wednesday of December 2007. The optional 3rd column is a boolean column indicating whether you wish to utilise the tenor. For futures instruments, you can execute the
FutAdj_HW() or
FutAdj_KN() functions (with
the 'OutputType' parameter set to AdjPrice) in order to compute a convexity adjusted futures price.
- oRange2 parameter
An optional 2 or 3 column range of rates tenors (can be deposits, futures, FRAS or swaps), rates or future prices and an optional boolean column as to whether the rate is to be used within the building of the yieldcurve.
- oRange3 parameter
An optional 2 or 3 column range of rates tenors (can be deposits, futures, FRAS or swaps), rates or future prices and an optional boolean column as to whether the rate is to be used within the building of the yieldcurve.
- oRange4 parameter
An optional 2 or 3 column range of rates tenors (can be deposits, futures, FRAS or swaps), rates or future prices and an optional boolean column as to whether the rate is to be used within the building of the yieldcurve.
- InterpMethod parameter
Interpolation methodology to utilise when interpolating for discount factors. Possible values are : 'BackStep', (for a flat interpolation in the backwards direction), 'ForwardStep', (for a flat interpolation in the forwards direction), 'Linear' or 'LogLinear'.
- Spread parameter
An optional flat spread value that will be added to all tenors.
- DayCount parameter
DayCounter for converting dates into year fractions.
- DepoOvrWrtFuts parameter
If a cash (deposit) tenor's end date is after the earliest futures expiry date within the curve, do we discard the cash tenor (false) or keep it (true).
- FutsOvrWrtSwps parameter
If a futures tenor's end date is after the earliest swap tenor's end date within the curve, do we discard the futures tenor (false) or keep it (true).
- DepoIndex parameter
Deposit (Libor) Index Template Key. (Created via the
CreateDepoTemplate() function). This is the minimum definition of an interest rate index ( ie - LIBOR ) and is the one used by the curve. If this curve allows Deposit or FRA instrument as inputs, then the definition of those instruments are specified via this template (minus the 'Tenor' information). In addition, if this curve is passed to an Index creation function ( functions within the 'CapeTools Indexes' category of functions) then this index will serve as the definition of one side of an interest rate BasisSwap transaction. Basically, provides the definition of a BasisSwap between this index template and the index defined by the index-creation function.
- SwapIndex parameter
Swap Index Template Key. (Created via the
CreateSwapTemplate() function). This object provides the minimum definition of an interest rate Swap and is the one used by the curve. If this curve allows for Swap instrument as inputs, then the definition of those instruments are specified via this template. This object is also used by other functions when requesting a Swap rate without the underlying swap rate definition.
- Extrapolate parameter
Whether the yieldCurve data should be extrapolated if a calculation request that uses a date that is beyond the end date of the yieldCurve (ie - a request for a 40 year discount factor, but the curve is only built up to 30 years.) If false an error will be returned. This setting is set globally for the whole curve. The extrapolation is conducted by computing a daily compounded forward rate between the last two points of the yieldcurve and then using this to estimate distant discount factor points.
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.