Creates a Repo (repurchase) rate curve using market repurchase (repo) rates.
This curve will apply an interpolation methodology ('BackStep', 'ForwardStep', 'Linear', 'LogLinear' or 'Cubic' via the 'InterpMethod' parameter) upon the REPO FORWARD RATES.
This curve can be used for retrieving forward repo rates, repo discount factors and zero repo rates.
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 : "REPOYC_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).
- ValueDate parameter
Key to an already created Valuation Date Object. (Via the
ValueDateObj() function).
- oTenorsRates parameter
A 2 or 3 column range of tenors and repo rates.
- 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 to use
- Cal parameter
Calendar to use for the adjustment of dates that lands on a holiday or weekend, if you use the
EmptyCalendar() function, no adjustments will be made
- BusDayConv parameter
Business Day Convention. treatment of date adjustments
- 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.