QuickOptionDelta





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 Fixing YieldCurve, Discounting YieldCurve and a VolCurve, this function will display the at-the-money option delta matrix on each of the ('option maturity' / 'option underlying') instrument combination (for a unit notional).

You must provide the actual Option maturity and option underlying 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.

This function requires the input of a VolCurve object key, which must have been produced via a call to one of the following functions : ATMVolMatrix(), ExpiryKVolMatrix() or SABRVolCurve(). These functions would have returned a string 'KEY' which is to be passed to the 'VCKey' parameter of this function.



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




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



Parameter Description


  1. FixingYC parameter

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

    Key to an already created yieldcurve object.
  3. VCKey parameter

    Key to an already created volcurve object.
  4. OptMaturities parameter

    An array of option maturity tenors. The exercise dates will be computed as the calculation date from the VolCurve, plus the Option maturity tenors.
  5. UndMaturities parameter

    An array of underlying tenors. These tenors will represent either deposits (if a deposit tenor is enter ie '3M') or swaps (if swap tenors are entered ie '5Y').
  6. OptionType parameter

    The type of option to price. Call, Put.


Extended information

Function Syntax

VB Syntax


Variant CTQryCurves.QuickOptionDelta( _
String FixingYC, _
String DiscountYC, _
String VCKey, _
Variant OptMaturities, _
Variant UndMaturities, _
String OptionType)


Excel Spreadsheet Syntax


=CT.RSK.QuickOptionDelta(
Excel String Cell FixingYC,
Excel String Cell DiscountYC,
Excel String Cell VCKey,
XLRange OptMaturities,
XLRange UndMaturities,
Excel String Cell OptionType)


C++ Syntax


static CTRangeDataCPP QuickOptionDelta(
std::string FixingYC,
std::string DiscountYC,
std::string VCKey,
CTRangeDataCPP OptMaturities,
CTRangeDataCPP UndMaturities,
std::string OptionType);


DotNET Syntax


CTRangeData CTQryCurvesSA.QuickOptionDelta(
System.String FixingYC,
System.String DiscountYC,
System.String VCKey,
CTRangeData OptMaturities,
CTRangeData UndMaturities,
System.String OptionType);

Parameter data types

ArgNameArgTypeIsKey
FixingYCStringTRUE
DiscountYCStringTRUE
VCKeyStringTRUE
OptMaturitiesRangeFALSE
UndMaturitiesRangeFALSE
OptionTypeStringFALSE


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
FixingYCFALSEFixingYCNAME.EXTTAG.TICKER (from a function call)
DiscountYCFALSEDiscountYCNAME.EXTTAG.TICKER (from a function call)
VCKeyFALSEVCKeyNAME.EXTTAG.TICKER (from a function call)
OptMaturitiesFALSEQuickOptionDelta_OptMaturities_Range (creates a range object)
UndMaturitiesFALSEQuickOptionDelta_UndMaturities_Range (creates a range object)
OptionTypeFALSECall


Example range for parameter : OptMaturities

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


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

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



CTQL.CTRangeData QuickOptionDelta_OptMaturities;


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

};

CTQL.StringVector arrQuickOptionDelta_OptMaturities =
new  CTQL.StringVector(arrBQuickOptionDelta_OptMaturities);

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


Example range for parameter : UndMaturities

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


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

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



CTQL.CTRangeData QuickOptionDelta_UndMaturities;


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

};

CTQL.StringVector arrQuickOptionDelta_UndMaturities =
new  CTQL.StringVector(arrBQuickOptionDelta_UndMaturities);

// Second parameter determines whether the array is a column array (false) or a row array (true)
QuickOptionDelta_UndMaturities = new  CTQL.CTRangeData(arrQuickOptionDelta_UndMaturities, 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 QuickOptionDelta() 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 QuickOptionDelta() function call


Example
OptMat/UndLength3M6M1Y2Y3Y5Y7Y10Y15Y20Y
3M0.1320230.2548040.5018071.002361.490772.444033.36814.696246.752468.59553
6M0.1306650.2594120.517691.031021.536172.521023.471744.845796.963728.86027
1Y0.1378970.2743960.5390391.076931.600962.6263.619415.048767.249559.22483
2Y0.144760.288770.5725531.134081.687992.768913.814245.31837.628259.70012
3Y0.1499910.2984290.5871861.174071.747522.867433.953395.508647.8862410.0333
5Y0.1585620.315480.6197791.241391.841613.021134.159795.781688.2486710.5002
7Y0.1637020.3260670.6408791.281131.906883.125564.295115.957168.4970110.8077
10Y0.1696260.3376260.6695841.32261.968623.207974.390486.074668.7141711.0788



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