SABRVolCurve





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

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

Key TAGs | Excel Index | API Index



Creates a SABR curve to model the dynamics of the volatility curve (smile).

There are 4 market inputs to this model.

ATM vol (This is really a 'SABR' volatility value to satisfy the model, but you can input the market ATM volatility and calibrate for the other 3 parameters - see the CalibrateSABR() function.

This is a ‘volatility-like’ parameter, not equal to the volatility, but there is a functional relationship between this parameter and the at the money (ATM) volatility.), BETA (or SKEW, a value between zero and one [0,1] which determines the relationship between futures spot and at the money (ATM) volatility.

SKEW = 1 indicates that the user believes that if the market were to move up or down in an orderly fashion, the ATM volatility level would not be significantly affected (lognormal like).

Beta less than one (1) indicates that if the market were to move then ATM volatility would move in the opposite direction (normal like))), ALPHA (Is the volatility of volatility, a model feature which acknowledges that volatility obeys well known clustering in time.

It controls the wings of the smile curve, the higher the value the more wingy the smile), RHO (Correlation between rates and vols).

This SABR model is identical to that of the same model developed by Hagan, Kumar, Lesniewski and Woodward (2002) except that we denote the ALPHA parameter as the 'volatility of volatility' (or WING) parameter and 'ATMVol' (alpha in the case of their model) as our ‘volatility-like’ parameter.

Each of the four SABR parameters inputs can either be a matrix (range input) or a single value (numeric value).

If a matrix, rows are option maturities (Tenors), columns are Underlying lengths (Tenor format).

You must decorate the volatility matrix with header and row information.

Row headers are option Maturity tenors from the calculation date, Column headers are Underlying length values (Tenor format).

If one prefers to enter a single value (thus this volcurve will represent the smile for only one underlying and one option maturity), you simply pass this in as a single value.

Forward rates are also inputs to the SABR model, but these will be acquired during the valuation of a deal (the YieldCurve will be obtained internally).

You also indicate via the 'DepoIndex' (for deposit underlying) and 'Swap Index' (for swap underlying) parameters the details of the underlying tenors.

This information will be used during risk management process (see the CapeTools IR Risk category of functions).



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 : "SABRVC"



Note: Within Excel, the function is named - CT.CRV.SABRVolCurve




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



Parameter Description


  1. Key parameter

    Key value to use as a handle for the created object
  2. 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).
  3. CurveName parameter

    A tag used to identify this curve (case insensitive) if placed within a Volatility curve collection ( via the GroupedVolCurves() function ). If you pass in an empty string, it will default to the name of the 'Key' parameter.
  4. ValueDate parameter

    Key to an already created Valuation Date Object. (Via the ValueDateObj() function).
  5. SettleDays parameter

    Number of days between the Exercise date of the options and the STARTDATE of the instrument.
  6. ATMRange parameter

    A matrix of SABR volatility values (greater than zero (0)) including header information, or a single point (flat) value. This is really a 'SABR' volatility value to satisfy the model, but you can input the market ATM volatility and calibrate for the other 3 parameters - see the CalibrateSABR() function. This is a ‘volatility-like’ parameter, not equal to the volatility, but there is a functional relationship between this parameter and the at the money (ATM) volatility.
  7. ALPHARange parameter

    A matrix of SABR alpha values (greater than zero (0)) including header information, or a single point (flat) value.
  8. BETARange parameter

    A matrix of SABR beta values (between 0.0 (normal distribution) and 1.0 (lognormal distribution)) including header information, or a single point (flat) value.
  9. RHORange parameter

    A matrix of SABR correlation (between -1 and 1) values including header information, or a single point (flat) value.
  10. DivideVolBy100 parameter

    Is the input volatility entered as a percentage value (true), or the raw volatility value (false). If entered as a percentage, the value will be divided by 100.0 internally.
  11. 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. The definition of the index underlying a cap or floor structure instrument is defined via this template (minus the 'Tenor' information).
  12. 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 type instrument as the underlyings (via Tenors) as inputs, then the definition of those instruments are specified via this template.
  13. DayCount parameter

    DayCounter for converting dates into year fractions.
  14. InterpType parameter

    Interpolation method to use when interpolating the curve for vols, - LINEAR, LOGLINEAR, CUBIC.


Extended information

Function Syntax

VB Syntax


String CTVolatiltyCurves.SABRVolCurve( _
String Key, _
Long Reload, _
String CurveName, _
String ValueDate, _
Long SettleDays, _
Variant ATMRange, _
Variant ALPHARange, _
Variant BETARange, _
Variant RHORange, _
Boolean DivideVolBy100, _
String DepoIndex, _
String SwapIndex, _
DayCountEnum DayCount, _
InterpEnum InterpType)


Excel Spreadsheet Syntax


=CT.CRV.SABRVolCurve(
Excel String Cell Key,
Excel Numeric Cell Reload,
Excel String Cell CurveName,
Excel String Cell ValueDate,
Excel Numeric Cell SettleDays,
XLRange ATMRange,
XLRange ALPHARange,
XLRange BETARange,
XLRange RHORange,
Excel Boolean Value Cell DivideVolBy100,
Excel String Cell DepoIndex,
Excel String Cell SwapIndex,
Excel String Cell DayCount,
Excel String Cell InterpType)


C++ Syntax


static std::string SABRVolCurve(
std::string Key,
long Reload,
std::string CurveName,
std::string ValueDate,
long SettleDays,
CTRangeDataCPP ATMRange,
CTRangeDataCPP ALPHARange,
CTRangeDataCPP BETARange,
CTRangeDataCPP RHORange,
bool DivideVolBy100,
std::string DepoIndex,
std::string SwapIndex,
DayCountEnum DayCount,
InterpEnum InterpType);


DotNET Syntax


System.String CTVolatiltyCurvesSA.SABRVolCurve(
System.String Key,
System.Int32 Reload,
System.String CurveName,
System.String ValueDate,
System.Int32 SettleDays,
CTRangeData ATMRange,
CTRangeData ALPHARange,
CTRangeData BETARange,
CTRangeData RHORange,
System.Boolean DivideVolBy100,
System.String DepoIndex,
System.String SwapIndex,
CTIEnums.DayCountEnum DayCount,
CTIEnums.InterpEnum InterpType);

Parameter data types

ArgNameArgTypeIsKey
KeyStringFALSE
ReloadLongFALSE
CurveNameStringFALSE
ValueDateStringTRUE
SettleDaysLongFALSE
ATMRangeRangeFALSE
ALPHARangeRangeFALSE
BETARangeRangeFALSE
RHORangeRangeFALSE
DivideVolBy100BooleanFALSE
DepoIndexStringTRUE
SwapIndexStringTRUE
DayCountDayCountEnumFALSE
InterpTypeInterpEnumFALSE


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
KeyFALSEMySABRVolCurve
ReloadFALSE1
CurveNameTRUEMySABRVolCurve
ValueDateFALSEValueDateNAME.EXTTAG.TICKER (from a function call)
SettleDaysFALSE2
ATMRangeFALSESABRVolCurve_ATMRange_Range (creates a range object)
ALPHARangeFALSESABRVolCurve_ALPHARange_Range (creates a range object)
BETARangeFALSESABRVolCurve_BETARange_Range (creates a range object)
RHORangeFALSESABRVolCurve_RHORange_Range (creates a range object)
DivideVolBy100FALSEtrue
DepoIndexFALSEDepoIndexNAME.EXTTAG.TICKER (from a function call)
SwapIndexFALSESwapIndexNAME.EXTTAG.TICKER (from a function call)
DayCountFALSE30360
InterpTypeTRUELINEAR


Example range for parameter : ATMRange

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

Opt\Und3M6M9M12M2Y4Y6Y8Y10Y12Y14Y16Y
3M1818.0118.0218.0218.0318.0418.0518.0618.0718.0718.0818.09
6M18.118.1118.1218.1218.1318.1418.1518.1618.1718.1718.1818.19
9M18.1918.218.2118.2218.2218.2318.2418.2518.2618.2618.2718.28
12M18.2918.2918.318.3118.3218.3218.3318.3418.3418.3518.3618.37
2Y18.3718.3818.3918.418.4118.4218.4218.4318.4418.4418.4518.46
4Y18.4618.4718.4818.4818.4918.518.518.5118.5218.5318.5318.54
6Y18.5518.5518.5618.5718.5718.5818.5918.618.618.6118.6218.62
8Y18.6318.6418.6418.6518.6618.6618.6718.6818.6918.6918.718.71
10Y18.7118.7218.7318.7418.7518.7518.7618.7718.7818.7918.7918.8
12Y18.8118.8118.8218.8318.8418.8418.8518.8618.8718.8718.8818.88
14Y18.8918.918.9118.9218.9218.9318.9418.9518.9618.9618.9718.98
16Y18.9918.991919.0119.0219.0319.0419.0519.0519.0619.0719.07
18Y19.0819.0819.0919.119.1119.1119.1219.1319.1319.1419.1519.16
20Y19.1619.1719.1819.1819.1919.219.2119.2119.2219.2219.2319.24
22Y19.2519.2619.2619.2719.2819.2919.2919.319.3119.3219.3219.33

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



CTQL.CTRangeData SABRVolCurve_ATMRange = new CTQL.CTRangeData();

System.Text.StringBuilder SABRVolCurve_ATMRange_builder =
new System.Text.StringBuilder(100);

SABRVolCurve_ATMRange_builder.Append("{");
SABRVolCurve_ATMRange_builder.Append("'Opt\\Und'	 | '3M'	 | '6M'	 | '9M'	 | '12M'	 | '2Y'	 | '4Y'	 | '6Y'	 | '8Y'	 | '10Y'	 | '12Y'	 | '14Y'	 | '16Y' ;");
SABRVolCurve_ATMRange_builder.Append("'3M'	 | 18	 | 18.01	 | 18.02	 | 18.02	 | 18.03	 | 18.04	 | 18.05	 | 18.06	 | 18.07	 | 18.07	 | 18.08	 | 18.09 ;");
SABRVolCurve_ATMRange_builder.Append("'6M'	 | 18.1	 | 18.11	 | 18.12	 | 18.12	 | 18.13	 | 18.14	 | 18.15	 | 18.16	 | 18.17	 | 18.17	 | 18.18	 | 18.19 ;");
SABRVolCurve_ATMRange_builder.Append("'9M'	 | 18.19	 | 18.2	 | 18.21	 | 18.22	 | 18.22	 | 18.23	 | 18.24	 | 18.25	 | 18.26	 | 18.26	 | 18.27	 | 18.28 ;");
SABRVolCurve_ATMRange_builder.Append("'12M'	 | 18.29	 | 18.29	 | 18.3	 | 18.31	 | 18.32	 | 18.32	 | 18.33	 | 18.34	 | 18.34	 | 18.35	 | 18.36	 | 18.37 ;");
SABRVolCurve_ATMRange_builder.Append("'2Y'	 | 18.37	 | 18.38	 | 18.39	 | 18.4	 | 18.41	 | 18.42	 | 18.42	 | 18.43	 | 18.44	 | 18.44	 | 18.45	 | 18.46 ;");
SABRVolCurve_ATMRange_builder.Append("'4Y'	 | 18.46	 | 18.47	 | 18.48	 | 18.48	 | 18.49	 | 18.5	 | 18.5	 | 18.51	 | 18.52	 | 18.53	 | 18.53	 | 18.54 ;");
SABRVolCurve_ATMRange_builder.Append("'6Y'	 | 18.55	 | 18.55	 | 18.56	 | 18.57	 | 18.57	 | 18.58	 | 18.59	 | 18.6	 | 18.6	 | 18.61	 | 18.62	 | 18.62 ;");
SABRVolCurve_ATMRange_builder.Append("'8Y'	 | 18.63	 | 18.64	 | 18.64	 | 18.65	 | 18.66	 | 18.66	 | 18.67	 | 18.68	 | 18.69	 | 18.69	 | 18.7	 | 18.71 ;");
SABRVolCurve_ATMRange_builder.Append("'10Y'	 | 18.71	 | 18.72	 | 18.73	 | 18.74	 | 18.75	 | 18.75	 | 18.76	 | 18.77	 | 18.78	 | 18.79	 | 18.79	 | 18.8 ;");
SABRVolCurve_ATMRange_builder.Append("'12Y'	 | 18.81	 | 18.81	 | 18.82	 | 18.83	 | 18.84	 | 18.84	 | 18.85	 | 18.86	 | 18.87	 | 18.87	 | 18.88	 | 18.88 ;");
SABRVolCurve_ATMRange_builder.Append("'14Y'	 | 18.89	 | 18.9	 | 18.91	 | 18.92	 | 18.92	 | 18.93	 | 18.94	 | 18.95	 | 18.96	 | 18.96	 | 18.97	 | 18.98 ;");
SABRVolCurve_ATMRange_builder.Append("'16Y'	 | 18.99	 | 18.99	 | 19	 | 19.01	 | 19.02	 | 19.03	 | 19.04	 | 19.05	 | 19.05	 | 19.06	 | 19.07	 | 19.07 ;");
SABRVolCurve_ATMRange_builder.Append("'18Y'	 | 19.08	 | 19.08	 | 19.09	 | 19.1	 | 19.11	 | 19.11	 | 19.12	 | 19.13	 | 19.13	 | 19.14	 | 19.15	 | 19.16 ;");
SABRVolCurve_ATMRange_builder.Append("'20Y'	 | 19.16	 | 19.17	 | 19.18	 | 19.18	 | 19.19	 | 19.2	 | 19.21	 | 19.21	 | 19.22	 | 19.22	 | 19.23	 | 19.24 ;");
SABRVolCurve_ATMRange_builder.Append("'22Y'	 | 19.25	 | 19.26	 | 19.26	 | 19.27	 | 19.28	 | 19.29	 | 19.29	 | 19.3	 | 19.31	 | 19.32	 | 19.32	 | 19.33");
SABRVolCurve_ATMRange_builder.Append("}");

// Parse the string into the Range object.
SABRVolCurve_ATMRange.RangeFromStr( SABRVolCurve_ATMRange_builder.ToString() );


Example range for parameter : ALPHARange

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

Opt\Und3M6M9M12M2Y4Y6Y8Y10Y12Y14Y16Y
3M0.40.40.40.40.410.410.410.410.410.410.410.42
6M0.420.420.420.420.420.420.430.430.430.430.430.43
9M0.430.440.440.440.440.440.440.450.450.450.450.45
12M0.450.450.460.460.460.460.460.460.460.470.470.47
2Y0.470.470.470.470.480.480.480.480.480.480.490.49
4Y0.490.490.490.490.490.490.50.50.50.50.50.5
6Y0.510.510.510.510.510.510.520.520.520.520.520.52
8Y0.520.530.530.530.530.530.530.530.540.540.540.54
10Y0.540.540.540.550.550.550.550.550.550.550.560.56
12Y0.560.560.560.560.560.570.570.570.570.570.570.57
14Y0.570.580.580.580.580.580.580.580.590.590.590.59
16Y0.590.590.590.60.60.60.60.60.60.60.610.61
18Y0.610.610.610.610.610.620.620.620.620.620.620.62
20Y0.630.630.630.630.630.630.640.640.640.640.640.64
22Y0.650.650.650.650.650.650.650.650.660.660.660.66

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



CTQL.CTRangeData SABRVolCurve_ALPHARange = new CTQL.CTRangeData();

System.Text.StringBuilder SABRVolCurve_ALPHARange_builder =
new System.Text.StringBuilder(100);

SABRVolCurve_ALPHARange_builder.Append("{");
SABRVolCurve_ALPHARange_builder.Append("'Opt\\Und'	 | '3M'	 | '6M'	 | '9M'	 | '12M'	 | '2Y'	 | '4Y'	 | '6Y'	 | '8Y'	 | '10Y'	 | '12Y'	 | '14Y'	 | '16Y' ;");
SABRVolCurve_ALPHARange_builder.Append("'3M'	 | 0.4	 | 0.4	 | 0.4	 | 0.4	 | 0.41	 | 0.41	 | 0.41	 | 0.41	 | 0.41	 | 0.41	 | 0.41	 | 0.42 ;");
SABRVolCurve_ALPHARange_builder.Append("'6M'	 | 0.42	 | 0.42	 | 0.42	 | 0.42	 | 0.42	 | 0.42	 | 0.43	 | 0.43	 | 0.43	 | 0.43	 | 0.43	 | 0.43 ;");
SABRVolCurve_ALPHARange_builder.Append("'9M'	 | 0.43	 | 0.44	 | 0.44	 | 0.44	 | 0.44	 | 0.44	 | 0.44	 | 0.45	 | 0.45	 | 0.45	 | 0.45	 | 0.45 ;");
SABRVolCurve_ALPHARange_builder.Append("'12M'	 | 0.45	 | 0.45	 | 0.46	 | 0.46	 | 0.46	 | 0.46	 | 0.46	 | 0.46	 | 0.46	 | 0.47	 | 0.47	 | 0.47 ;");
SABRVolCurve_ALPHARange_builder.Append("'2Y'	 | 0.47	 | 0.47	 | 0.47	 | 0.47	 | 0.48	 | 0.48	 | 0.48	 | 0.48	 | 0.48	 | 0.48	 | 0.49	 | 0.49 ;");
SABRVolCurve_ALPHARange_builder.Append("'4Y'	 | 0.49	 | 0.49	 | 0.49	 | 0.49	 | 0.49	 | 0.49	 | 0.5	 | 0.5	 | 0.5	 | 0.5	 | 0.5	 | 0.5 ;");
SABRVolCurve_ALPHARange_builder.Append("'6Y'	 | 0.51	 | 0.51	 | 0.51	 | 0.51	 | 0.51	 | 0.51	 | 0.52	 | 0.52	 | 0.52	 | 0.52	 | 0.52	 | 0.52 ;");
SABRVolCurve_ALPHARange_builder.Append("'8Y'	 | 0.52	 | 0.53	 | 0.53	 | 0.53	 | 0.53	 | 0.53	 | 0.53	 | 0.53	 | 0.54	 | 0.54	 | 0.54	 | 0.54 ;");
SABRVolCurve_ALPHARange_builder.Append("'10Y'	 | 0.54	 | 0.54	 | 0.54	 | 0.55	 | 0.55	 | 0.55	 | 0.55	 | 0.55	 | 0.55	 | 0.55	 | 0.56	 | 0.56 ;");
SABRVolCurve_ALPHARange_builder.Append("'12Y'	 | 0.56	 | 0.56	 | 0.56	 | 0.56	 | 0.56	 | 0.57	 | 0.57	 | 0.57	 | 0.57	 | 0.57	 | 0.57	 | 0.57 ;");
SABRVolCurve_ALPHARange_builder.Append("'14Y'	 | 0.57	 | 0.58	 | 0.58	 | 0.58	 | 0.58	 | 0.58	 | 0.58	 | 0.58	 | 0.59	 | 0.59	 | 0.59	 | 0.59 ;");
SABRVolCurve_ALPHARange_builder.Append("'16Y'	 | 0.59	 | 0.59	 | 0.59	 | 0.6	 | 0.6	 | 0.6	 | 0.6	 | 0.6	 | 0.6	 | 0.6	 | 0.61	 | 0.61 ;");
SABRVolCurve_ALPHARange_builder.Append("'18Y'	 | 0.61	 | 0.61	 | 0.61	 | 0.61	 | 0.61	 | 0.62	 | 0.62	 | 0.62	 | 0.62	 | 0.62	 | 0.62	 | 0.62 ;");
SABRVolCurve_ALPHARange_builder.Append("'20Y'	 | 0.63	 | 0.63	 | 0.63	 | 0.63	 | 0.63	 | 0.63	 | 0.64	 | 0.64	 | 0.64	 | 0.64	 | 0.64	 | 0.64 ;");
SABRVolCurve_ALPHARange_builder.Append("'22Y'	 | 0.65	 | 0.65	 | 0.65	 | 0.65	 | 0.65	 | 0.65	 | 0.65	 | 0.65	 | 0.66	 | 0.66	 | 0.66	 | 0.66");
SABRVolCurve_ALPHARange_builder.Append("}");

// Parse the string into the Range object.
SABRVolCurve_ALPHARange.RangeFromStr( SABRVolCurve_ALPHARange_builder.ToString() );


Example range for parameter : BETARange

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

Opt\Und3M6M9M12M2Y4Y6Y8Y10Y12Y14Y16Y
3M0.70.70.70.70.70.70.70.70.70.70.70.7
6M0.70.70.70.70.70.70.70.70.70.70.70.7
9M0.70.70.70.70.70.70.70.70.70.70.70.7
12M0.70.70.70.70.70.70.70.70.70.70.70.7
2Y0.70.70.70.70.70.70.70.70.70.70.70.7
4Y0.70.70.70.70.70.70.70.70.70.70.70.7
6Y0.70.70.70.70.70.70.70.70.70.70.70.7
8Y0.70.70.70.70.70.70.70.70.70.70.70.7
10Y0.70.70.70.70.70.70.70.70.70.70.70.7
12Y0.70.70.70.70.70.70.70.70.70.70.70.7
14Y0.70.70.70.70.70.70.70.70.70.70.70.7
16Y0.70.70.70.70.70.70.70.70.70.70.70.7
18Y0.70.70.70.70.70.70.70.70.70.70.70.7
20Y0.70.70.70.70.70.70.70.70.70.70.70.7
22Y0.70.70.70.70.70.70.70.70.70.70.70.7

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



CTQL.CTRangeData SABRVolCurve_BETARange = new CTQL.CTRangeData();

System.Text.StringBuilder SABRVolCurve_BETARange_builder =
new System.Text.StringBuilder(100);

SABRVolCurve_BETARange_builder.Append("{");
SABRVolCurve_BETARange_builder.Append("'Opt\\Und'	 | '3M'	 | '6M'	 | '9M'	 | '12M'	 | '2Y'	 | '4Y'	 | '6Y'	 | '8Y'	 | '10Y'	 | '12Y'	 | '14Y'	 | '16Y' ;");
SABRVolCurve_BETARange_builder.Append("'3M'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'6M'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'9M'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'12M'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'2Y'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'4Y'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'6Y'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'8Y'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'10Y'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'12Y'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'14Y'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'16Y'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'18Y'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'20Y'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7 ;");
SABRVolCurve_BETARange_builder.Append("'22Y'	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7	 | 0.7");
SABRVolCurve_BETARange_builder.Append("}");

// Parse the string into the Range object.
SABRVolCurve_BETARange.RangeFromStr( SABRVolCurve_BETARange_builder.ToString() );


Example range for parameter : RHORange

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

Opt\Und3M6M9M12M2Y4Y6Y8Y10Y12Y14Y16Y
3M0.30.30.30.310.310.310.310.310.310.310.310.32
6M0.320.320.320.320.320.320.330.320.320.330.330.33
9M0.330.330.320.330.320.330.330.330.330.330.330.33
12M0.330.340.330.330.330.330.340.340.340.340.340.34
2Y0.340.340.340.340.340.340.340.340.340.340.350.35
4Y0.350.350.360.360.360.360.360.360.360.360.360.36
6Y0.370.360.370.370.370.370.370.370.370.370.370.37
8Y0.380.380.380.370.370.370.380.380.380.380.380.38
10Y0.380.380.380.380.380.380.370.380.370.380.380.38
12Y0.380.380.380.380.380.380.380.380.390.390.390.39
14Y0.390.390.390.390.390.390.40.390.390.390.40.4
16Y0.40.40.40.40.40.40.40.40.40.40.410.41
18Y0.410.410.410.410.410.410.420.420.410.420.420.42
20Y0.420.420.420.430.430.430.420.430.420.430.430.43
22Y0.420.430.430.430.430.430.430.430.430.430.430.43

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



CTQL.CTRangeData SABRVolCurve_RHORange = new CTQL.CTRangeData();

System.Text.StringBuilder SABRVolCurve_RHORange_builder =
new System.Text.StringBuilder(100);

SABRVolCurve_RHORange_builder.Append("{");
SABRVolCurve_RHORange_builder.Append("'Opt\\Und'	 | '3M'	 | '6M'	 | '9M'	 | '12M'	 | '2Y'	 | '4Y'	 | '6Y'	 | '8Y'	 | '10Y'	 | '12Y'	 | '14Y'	 | '16Y' ;");
SABRVolCurve_RHORange_builder.Append("'3M'	 | 0.3	 | 0.3	 | 0.3	 | 0.31	 | 0.31	 | 0.31	 | 0.31	 | 0.31	 | 0.31	 | 0.31	 | 0.31	 | 0.32 ;");
SABRVolCurve_RHORange_builder.Append("'6M'	 | 0.32	 | 0.32	 | 0.32	 | 0.32	 | 0.32	 | 0.32	 | 0.33	 | 0.32	 | 0.32	 | 0.33	 | 0.33	 | 0.33 ;");
SABRVolCurve_RHORange_builder.Append("'9M'	 | 0.33	 | 0.33	 | 0.32	 | 0.33	 | 0.32	 | 0.33	 | 0.33	 | 0.33	 | 0.33	 | 0.33	 | 0.33	 | 0.33 ;");
SABRVolCurve_RHORange_builder.Append("'12M'	 | 0.33	 | 0.34	 | 0.33	 | 0.33	 | 0.33	 | 0.33	 | 0.34	 | 0.34	 | 0.34	 | 0.34	 | 0.34	 | 0.34 ;");
SABRVolCurve_RHORange_builder.Append("'2Y'	 | 0.34	 | 0.34	 | 0.34	 | 0.34	 | 0.34	 | 0.34	 | 0.34	 | 0.34	 | 0.34	 | 0.34	 | 0.35	 | 0.35 ;");
SABRVolCurve_RHORange_builder.Append("'4Y'	 | 0.35	 | 0.35	 | 0.36	 | 0.36	 | 0.36	 | 0.36	 | 0.36	 | 0.36	 | 0.36	 | 0.36	 | 0.36	 | 0.36 ;");
SABRVolCurve_RHORange_builder.Append("'6Y'	 | 0.37	 | 0.36	 | 0.37	 | 0.37	 | 0.37	 | 0.37	 | 0.37	 | 0.37	 | 0.37	 | 0.37	 | 0.37	 | 0.37 ;");
SABRVolCurve_RHORange_builder.Append("'8Y'	 | 0.38	 | 0.38	 | 0.38	 | 0.37	 | 0.37	 | 0.37	 | 0.38	 | 0.38	 | 0.38	 | 0.38	 | 0.38	 | 0.38 ;");
SABRVolCurve_RHORange_builder.Append("'10Y'	 | 0.38	 | 0.38	 | 0.38	 | 0.38	 | 0.38	 | 0.38	 | 0.37	 | 0.38	 | 0.37	 | 0.38	 | 0.38	 | 0.38 ;");
SABRVolCurve_RHORange_builder.Append("'12Y'	 | 0.38	 | 0.38	 | 0.38	 | 0.38	 | 0.38	 | 0.38	 | 0.38	 | 0.38	 | 0.39	 | 0.39	 | 0.39	 | 0.39 ;");
SABRVolCurve_RHORange_builder.Append("'14Y'	 | 0.39	 | 0.39	 | 0.39	 | 0.39	 | 0.39	 | 0.39	 | 0.4	 | 0.39	 | 0.39	 | 0.39	 | 0.4	 | 0.4 ;");
SABRVolCurve_RHORange_builder.Append("'16Y'	 | 0.4	 | 0.4	 | 0.4	 | 0.4	 | 0.4	 | 0.4	 | 0.4	 | 0.4	 | 0.4	 | 0.4	 | 0.41	 | 0.41 ;");
SABRVolCurve_RHORange_builder.Append("'18Y'	 | 0.41	 | 0.41	 | 0.41	 | 0.41	 | 0.41	 | 0.41	 | 0.42	 | 0.42	 | 0.41	 | 0.42	 | 0.42	 | 0.42 ;");
SABRVolCurve_RHORange_builder.Append("'20Y'	 | 0.42	 | 0.42	 | 0.42	 | 0.43	 | 0.43	 | 0.43	 | 0.42	 | 0.43	 | 0.42	 | 0.43	 | 0.43	 | 0.43 ;");
SABRVolCurve_RHORange_builder.Append("'22Y'	 | 0.42	 | 0.43	 | 0.43	 | 0.43	 | 0.43	 | 0.43	 | 0.43	 | 0.43	 | 0.43	 | 0.43	 | 0.43	 | 0.43");
SABRVolCurve_RHORange_builder.Append("}");

// Parse the string into the Range object.
SABRVolCurve_RHORange.RangeFromStr( SABRVolCurve_RHORange_builder.ToString() );



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 SABRVolCurve() 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 SABRVolCurve() function call


MySABRVolCurve_9.SABRVC.0

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