QuickBPSMatrix





http://www.QuantTools.com
CapeTools Query Curves function list

Welcome | Documentation format | QuantTools Groups | QuantTools Categories | Licence

Key TAGs | Excel Index | API Index



Given a Discounting YieldCurve, this function will display the market basis-point-sensitivity (BPS) matrix on each of the ('UnderlyingStart' / 'UnderlyingLength') instrument combination (for a unit notional of the underlying deposits/swaps).

You must provide the actual Underlying-Start and Underlying-Length tenor arrays.

If the Fixing curve and the discounting curves are the same, enter the same key for both parameters.

This function requires the input of YieldCurve object keys, which must have been produced via a call to one of the YieldCurve (CapeTools Curves, CapeTools XCCY Curves or CapeTools Bond Curves) or Credit Default Curves (CapeTools Credit Curves) category of functions.

(You cannot use the DiscountCurve(), ForwardCurve(), ZeroCurve() or FlatYieldCurve() functions as these do not contain enough information for pricing.).

For the discounting yieldcurve, these additional 3 functions can also be used : DiscountCurve2(), ForwardCurve2() or ZeroCurve2(). These functions would have returned a string 'KEY' which is to be passed to the 'FixingYC' and 'DiscountYC' parameters of this function.



Note: Within Excel, the function is named - CT.RSK.QuickBPSMatrix




High level graphic of QuickBPSMatrix() function with parameters. Blue square node is the actual function with the parameters ordered.



Parameter Description


  1. DiscountYC parameter

    Key to an already created yieldcurve object.
  2. UndStart parameter

    An array of underlying start tenors. (ActualStartDate will be Today+Tenor+SettleDays).
  3. UndLength parameter

    An array of underlying length tenors. (ActualEnddate will be ActualStartDate+Tenor)


Extended information

Function Syntax

VB Syntax


Variant CTQryCurves.QuickBPSMatrix( _
String DiscountYC, _
Variant UndStart, _
Variant UndLength)


Excel Spreadsheet Syntax


=CT.RSK.QuickBPSMatrix(
Excel String Cell DiscountYC,
XLRange UndStart,
XLRange UndLength)


C++ Syntax


static CTRangeDataCPP QuickBPSMatrix(
std::string DiscountYC,
CTRangeDataCPP UndStart,
CTRangeDataCPP UndLength);


DotNET Syntax


CTRangeData CTQryCurvesSA.QuickBPSMatrix(
System.String DiscountYC,
CTRangeData UndStart,
CTRangeData UndLength);

Parameter data types

ArgNameArgTypeIsKey
DiscountYCStringTRUE
UndStartRangeFALSE
UndLengthRangeFALSE


Example Inputs

The first column represents the name of the parameters. The second column specifies whether the parameters are optional or not. Finally the last column provides some sample input data.
Function call input string-keys are always in the format : "NAME.EXTTAG.TICKER" The "EXTTAG.TICKER" part is determined from the output of other, capetools, object creation functions.


ArgNameIsOptional (Excel only)Example
DiscountYCFALSEDiscountYCNAME.EXTTAG.TICKER (from a function call)
UndStartFALSEQuickBPSMatrix_UndStart_Range (creates a range object)
UndLengthFALSEQuickBPSMatrix_UndLength_Range (creates a range object)


Example range for parameter : UndStart

Within Excel, a range such as this can be passed directly into the UndStart parameter.


Data is stored within the second column (Vector of data)..

Example C# API usage for setting the range data for parameter : UndStart



CTQL.CTRangeData QuickBPSMatrix_UndStart;


string[] arrBQuickBPSMatrix_UndStart = {
"3M",
"6M",
"1Y",
"2Y",
"3Y",
"5Y",
"7Y",
"10Y"  //  Array Data

};

CTQL.StringVector arrQuickBPSMatrix_UndStart =
new  CTQL.StringVector(arrBQuickBPSMatrix_UndStart);

// Second parameter determines whether the array is a column array (false) or a row array (true)
QuickBPSMatrix_UndStart = new  CTQL.CTRangeData(arrQuickBPSMatrix_UndStart, false);


Example range for parameter : UndLength

Within Excel, a range such as this can be passed directly into the UndLength parameter.


Data is stored within the second column (Vector of data)..

Example C# API usage for setting the range data for parameter : UndLength



CTQL.CTRangeData QuickBPSMatrix_UndLength;


string[] arrBQuickBPSMatrix_UndLength = {
"3M",
"6M",
"1Y",
"2Y",
"3Y",
"5Y",
"7Y",
"10Y",
"15Y",
"20Y"  //  Array Data

};

CTQL.StringVector arrQuickBPSMatrix_UndLength =
new  CTQL.StringVector(arrBQuickBPSMatrix_UndLength);

// Second parameter determines whether the array is a column array (false) or a row array (true)
QuickBPSMatrix_UndLength = new  CTQL.CTRangeData(arrQuickBPSMatrix_UndLength, false);



Example function usage


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.


If you are accessing this functrion via the MiniXL libraries, this function is present within the CT.QL.Curves20 MiniXL Excel Addin.

Within our Excel Example Addin Generator, we have used the following QuantTools sub-functions in order to prepare the arguments needed to call the QuickBPSMatrix() function. If you are executing this function via the MiniXL libraries, the module addin name, (in brackets, to the right of the sub-functions listed below), indicates the MiniXL library in which the sub-function is held. You will need to load this library into your Excel session (along with any other libraries that the sub-function call within the addin requires (ie - CT.QT.Utils20 addin in almost all cases) in order for the example to compute successfully.

These are the financial QuantTools sub-function calls that are used within the examples :





The objects generated by these sub-functions are inter-connected in the following way :




The following four examples demostrate calling this function within a Microsoft .NET environment

The following four examples demostrate calling this function within a non .NET environment

The following is a sample output from executing the QuickBPSMatrix() function call


Example
UndStart/UndEnd3M6M1Y2Y3Y5Y7Y10Y15Y20Y
3M0.2407020.4646380.9161.831022.726314.473276.165388.5979712.366215.7467
6M0.2296130.45630.9116731.817572.712334.453866.134068.5631212.310815.6702
1Y0.2308820.4596290.9035411.808312.692974.41736.088538.4939812.200815.5327
2Y0.2272790.4536540.9005651.785142.654994.351865.99478.357611.991115.2552
3Y0.2249250.4478650.880741.754512.608864.277785.896128.2159311.768514.9813
5Y0.2173460.4326680.8504461.701582.525634.14185.701067.9298411.327214.4363
7Y0.210040.4182750.8227991.642842.444554.005745.505087.6392210.903313.9076
10Y0.200150.3985320.7892831.559262.321973.788045.191537.1854410.294513.1486



Copyright (c) 2003-2007 CapeTools - All Rights Reserved.