RSKTwoAssetCashOrNothing





http://www.QuantTools.com
CapeTools Bump Risk function list

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

Key TAGs | Excel Index | API Index



Four types of two-asset cash-or-nothing options exist : A two-asset cash-or-nothing call pays out a fixed cash amount K if asset one, S1 is above the strike X1 and asset two, S2, is above strike X2 at expiration (TypeFlag=1).

A two-asset cash-or-nothing put pays out a fixed cash amount if asset one, S1, is below the strike X1 and asset two, S2 is below strike X2 at expiration (TypeFlag=2).

A two-asset cash-or-nothing up-down pays out a fixed cash amount if asset one S1, is above the strike X1 and asset two, S2, is below the strike X2 at expiration (TypeFlag=3).

Finally a two-asset cash-or-nothing down-up pays out a fixed cash amount if asset one, s1, is below the strike x1 and asset two, s2, is above strike X2 at expiration (TypeFlag=4).

This function utilizes an analytical (closed-form) algorithm.

Note that the risk (greek) numbers produced are the mathematically defined equivalent of a derivative (instantaneous change).

You can convert the risk number to your own definition of risk by multiplying by the shift you require.

For example, for a typical definition of VANNA, (change in underlying and volatility), where one defines the change in the underlying as a single unit of change (1.0) and the change in volatility as a one percent change (0.01), simply multiply the VANNA result calculated by (1.0*0.01).

For VEGA, change in volatility of one percent (0.01), simply multiply the VEGA result by 0.01. Within option contracts THETA is negative, however the mathematically defined equivalent of THETA (instantaneous FORWARD change in time) is positive.

Internally we have negated this value for you.

To express THETA as THETA per day, simply multiply the THETA result by 1/365 or 1/252 (depending on whether you require calendar days or business days).

This function bumps an input parameter given a bump map and displays the difference from the base value.

You can request to see the difference of any of the option greeks.

The name of the parameter that you wish to bump is simply entered into the 'BumpParam' string parameter.

The bump map can be a single value, a vector or a matrix input.



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




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



Parameter Description


  1. ValueDate parameter

    Valuation Date (typically equal to Today's date)
  2. dayCounter parameter

    For any input parameter within this function that represents a dividend rate, risk free rate, foreign rate or holding cost rate, these rates will be defined as annually compounded using the DayCounter defined within this parameter. Thus if 'actual365' is used for this 'dayCounter' parameter, then all input parameters that represent a dividend, risk free, foreign or holding cost rates will be defined as annually compounded Actual365 rates.
  3. BumpRange parameter

    A range of bump values, of which the chosen input will be bumped by. For Equity, FX type deals, you can provide a single value, vector or matrix, for interest rate type products, the bump range must be of the same shape as the market curve.
  4. BumpParam parameter

    The parameter in which will be bumped, you can only choose parameters in which the ranges normally take double (decimal) values.
  5. TypeFlag parameter

    Integer value (1 - 4) indicating option type.
  6. S1 parameter

    Price of the first underlying
  7. S2 parameter

    Price of the second underlying
  8. X1 parameter

    Strike price of the first underlying.
  9. X2 parameter

    Strike price of the second underlying.
  10. K parameter

    Cash amount to be paid out.
  11. T parameter

    Time to option maturity.
  12. r parameter

    For the underlying (equity, futures, FX or commodity), this should be an annualised rate (risk free rate or foreign rate). If this is an option on a FX underlying, then if the underlying is quoted as domestic/foreign then this rate will be the domestic rate. If, however, the FX underlying is quoted as foreign/domestic then this will be the foreign rate.
  13. b1 parameter

    For the first underlying (equity, futures, FX or commodity), this should be an annualised rate (dividend rate, risk free rate, foreign rate or holding cost rate respectively). If this is an option on a FX underlying, then if the underlying is quoted as domestic/foreign then this rate will be the foreign rate. If, however, the FX underlying is quoted as foreign/domestic then this will be the domestic rate.
  14. b2 parameter

    For the second underlying (equity, futures, FX or commodity), this should be an annualised rate (dividend rate, risk free rate, foreign rate or holding cost rate respectively). If this is an option on a FX underlying, then if the underlying is quoted as domestic/foreign then this rate will be the foreign rate. If, however, the FX underlying is quoted as foreign/domestic then this will be the domestic rate.
  15. Vol1 parameter

    Volatility of the first underlying.
  16. Vol2 parameter

    Volatility of the second underlying.
  17. Rho parameter

    Correlation between the two assets.
  18. Greek parameter

    For the option premium specify 'PREMIUM'. For all first derivatives, you can specify one of the following : 'dS1' (for the 'S1' parameter), 'dS2' (for the 'S2' parameter), 'dX1' (for the 'X1' parameter), 'dX2' (for the 'X2' parameter), 'dK' (for the 'K' parameter), 'dT' (for the 'T' parameter), 'dr' (for the 'r' parameter), 'db1' (for the 'b1' parameter), 'db2' (for the 'b2' parameter), 'dVol1' (for the 'Vol1' parameter), 'dVol2' (for the 'Vol2' parameter), 'dRho' (for the 'Rho' parameter), For second order derivatives, you can specify combinations of the first order derivatives (i.e. - 'dS1dS1', 'dVol1dVol1', 'dS1dVol1'. )


Extended information

Function Syntax

VB Syntax


Variant CTBumpRisk.RSKTwoAssetCashOrNothing( _
Long ValueDate, _
DayCountEnum dayCounter, _
Variant BumpRange, _
String BumpParam, _
Variant TypeFlag, _
Variant S1, _
Variant S2, _
Variant X1, _
Variant X2, _
Variant K, _
Variant T, _
Variant r, _
Variant b1, _
Variant b2, _
Variant Vol1, _
Variant Vol2, _
Variant Rho, _
String Greek)


Excel Spreadsheet Syntax


=CT.RSKTwoAssetCashOrNothing(
Excel Numeric Cell ValueDate,
Excel String Cell dayCounter,
XLRange BumpRange,
Excel String Cell BumpParam,
XLRange TypeFlag,
XLRange S1,
XLRange S2,
XLRange X1,
XLRange X2,
XLRange K,
XLRange T,
XLRange r,
XLRange b1,
XLRange b2,
XLRange Vol1,
XLRange Vol2,
XLRange Rho,
Excel String Cell Greek)


C++ Syntax


static CTRangeDataCPP RSKTwoAssetCashOrNothing(
long ValueDate,
DayCountEnum dayCounter,
CTRangeDataCPP BumpRange,
std::string BumpParam,
CTRangeDataCPP TypeFlag,
CTRangeDataCPP S1,
CTRangeDataCPP S2,
CTRangeDataCPP X1,
CTRangeDataCPP X2,
CTRangeDataCPP K,
CTRangeDataCPP T,
CTRangeDataCPP r,
CTRangeDataCPP b1,
CTRangeDataCPP b2,
CTRangeDataCPP Vol1,
CTRangeDataCPP Vol2,
CTRangeDataCPP Rho,
std::string Greek);


DotNET Syntax


CTRangeData CTBumpRiskSA.RSKTwoAssetCashOrNothing(
System.Int32 ValueDate,
CTIEnums.DayCountEnum dayCounter,
CTRangeData BumpRange,
System.String BumpParam,
CTRangeData TypeFlag,
CTRangeData S1,
CTRangeData S2,
CTRangeData X1,
CTRangeData X2,
CTRangeData K,
CTRangeData T,
CTRangeData r,
CTRangeData b1,
CTRangeData b2,
CTRangeData Vol1,
CTRangeData Vol2,
CTRangeData Rho,
System.String Greek);

Parameter data types

ArgNameArgTypeIsKey
ValueDateLongFALSE
dayCounterDayCountEnumFALSE
BumpRangeRangeFALSE
BumpParamStringFALSE
TypeFlagRangeFALSE
S1RangeFALSE
S2RangeFALSE
X1RangeFALSE
X2RangeFALSE
KRangeFALSE
TRangeFALSE
rRangeFALSE
b1RangeFALSE
b2RangeFALSE
Vol1RangeFALSE
Vol2RangeFALSE
RhoRangeFALSE
GreekStringFALSE


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
ValueDateFALSE19/Jul/2005 (serial date type)
dayCounterFALSEACT365
BumpRangeFALSERSKTwoAssetCashOrNothing_BumpRange_Range (creates a range object)
BumpParamFALSEVol1
TypeFlagFALSERSKTwoAssetCashOrNothing_TypeFlag_Range (creates a range object)
S1FALSERSKTwoAssetCashOrNothing_S1_Range (creates a range object)
S2FALSERSKTwoAssetCashOrNothing_S2_Range (creates a range object)
X1FALSERSKTwoAssetCashOrNothing_X1_Range (creates a range object)
X2FALSERSKTwoAssetCashOrNothing_X2_Range (creates a range object)
KFALSERSKTwoAssetCashOrNothing_K_Range (creates a range object)
TFALSERSKTwoAssetCashOrNothing_T_Range (creates a range object)
rFALSERSKTwoAssetCashOrNothing_r_Range (creates a range object)
b1FALSERSKTwoAssetCashOrNothing_b1_Range (creates a range object)
b2FALSERSKTwoAssetCashOrNothing_b2_Range (creates a range object)
Vol1FALSERSKTwoAssetCashOrNothing_Vol1_Range (creates a range object)
Vol2FALSERSKTwoAssetCashOrNothing_Vol2_Range (creates a range object)
RhoFALSERSKTwoAssetCashOrNothing_Rho_Range (creates a range object)
GreekFALSEPREMIUM


Example range for parameter : BumpRange

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_BumpRange;


double[] arrBRSKTwoAssetCashOrNothing_BumpRange = {
0.0206,
0.0188,
0.0209,
0.0219,
0.0195,
0.0209,
0.0191,
0.0188,
0.019,
0.0203,
0.0195,
0.0188,
0.0213,
0.0201,
0.0213,
0.0189,
0.021,
0.0214,
0.0213,
0.02  //  Array Data

};

CTQL.DoubleVector arrRSKTwoAssetCashOrNothing_BumpRange =
new  CTQL.DoubleVector(arrBRSKTwoAssetCashOrNothing_BumpRange);

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


Example range for parameter : TypeFlag

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_TypeFlag;


int[] arrBRSKTwoAssetCashOrNothing_TypeFlag = {
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1  //  Array Data

};

CTQL.IntVector arrRSKTwoAssetCashOrNothing_TypeFlag =
new  CTQL.IntVector(arrBRSKTwoAssetCashOrNothing_TypeFlag);

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


Example range for parameter : S1

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_S1;


int[] arrBRSKTwoAssetCashOrNothing_S1 = {
103,
101,
91,
109,
100,
103,
100,
109,
99,
106,
91,
101,
97,
102,
100,
101,
102,
99,
102,
100  //  Array Data

};

CTQL.IntVector arrRSKTwoAssetCashOrNothing_S1 =
new  CTQL.IntVector(arrBRSKTwoAssetCashOrNothing_S1);

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


Example range for parameter : S2

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_S2;


int[] arrBRSKTwoAssetCashOrNothing_S2 = {
110,
104,
104,
107,
107,
102,
104,
95,
90,
104,
92,
95,
101,
104,
102,
97,
97,
109,
91,
100  //  Array Data

};

CTQL.IntVector arrRSKTwoAssetCashOrNothing_S2 =
new  CTQL.IntVector(arrBRSKTwoAssetCashOrNothing_S2);

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


Example range for parameter : X1

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_X1;


int[] arrBRSKTwoAssetCashOrNothing_X1 = {
103,
99,
117,
119,
115,
120,
109,
115,
107,
102,
119,
111,
105,
106,
119,
105,
111,
110,
111,
110  //  Array Data

};

CTQL.IntVector arrRSKTwoAssetCashOrNothing_X1 =
new  CTQL.IntVector(arrBRSKTwoAssetCashOrNothing_X1);

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


Example range for parameter : X2

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_X2;


int[] arrBRSKTwoAssetCashOrNothing_X2 = {
93,
95,
93,
84,
91,
91,
86,
95,
91,
87,
97,
89,
90,
82,
99,
94,
88,
90,
91,
90  //  Array Data

};

CTQL.IntVector arrRSKTwoAssetCashOrNothing_X2 =
new  CTQL.IntVector(arrBRSKTwoAssetCashOrNothing_X2);

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


Example range for parameter : K

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_K;


int[] arrBRSKTwoAssetCashOrNothing_K = {
9,
10,
9,
10,
9,
11,
10,
11,
10,
11,
10,
11,
10,
10,
10,
10,
11,
11,
10,
10  //  Array Data

};

CTQL.IntVector arrRSKTwoAssetCashOrNothing_K =
new  CTQL.IntVector(arrBRSKTwoAssetCashOrNothing_K);

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


Example range for parameter : T

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_T;


int[] arrBRSKTwoAssetCashOrNothing_T = {
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("17/1/2006", "dd/mm/yyyy")  //  Array Data

};

CTQL.IntVector arrRSKTwoAssetCashOrNothing_T =
new  CTQL.IntVector(arrBRSKTwoAssetCashOrNothing_T);

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


Example range for parameter : r

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_r;


double[] arrBRSKTwoAssetCashOrNothing_r = {
0.0982,
0.0919,
0.0964,
0.0998,
0.0976,
0.1033,
0.0981,
0.0922,
0.0926,
0.1065,
0.1086,
0.1049,
0.107,
0.0913,
0.0951,
0.1076,
0.0976,
0.1087,
0.1008,
0.10  //  Array Data

};

CTQL.DoubleVector arrRSKTwoAssetCashOrNothing_r =
new  CTQL.DoubleVector(arrBRSKTwoAssetCashOrNothing_r);

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


Example range for parameter : b1

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_b1;


double[] arrBRSKTwoAssetCashOrNothing_b1 = {
0.046,
0.0456,
0.0532,
0.0456,
0.0501,
0.0509,
0.0469,
0.0484,
0.0526,
0.053,
0.0544,
0.047,
0.0462,
0.0469,
0.0514,
0.0523,
0.0535,
0.0478,
0.0531,
0.05  //  Array Data

};

CTQL.DoubleVector arrRSKTwoAssetCashOrNothing_b1 =
new  CTQL.DoubleVector(arrBRSKTwoAssetCashOrNothing_b1);

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


Example range for parameter : b2

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_b2;


double[] arrBRSKTwoAssetCashOrNothing_b2 = {
0.0564,
0.0544,
0.0656,
0.0547,
0.0603,
0.0613,
0.0641,
0.0644,
0.0548,
0.0574,
0.0553,
0.0589,
0.0616,
0.0568,
0.0609,
0.0582,
0.0548,
0.0598,
0.0593,
0.06  //  Array Data

};

CTQL.DoubleVector arrRSKTwoAssetCashOrNothing_b2 =
new  CTQL.DoubleVector(arrBRSKTwoAssetCashOrNothing_b2);

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


Example range for parameter : Vol1

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_Vol1;


double[] arrBRSKTwoAssetCashOrNothing_Vol1 = {
0.2154,
0.2119,
0.1904,
0.1884,
0.2008,
0.2023,
0.1898,
0.2084,
0.2167,
0.2173,
0.2061,
0.1853,
0.2185,
0.1836,
0.202,
0.2036,
0.196,
0.2044,
0.2099,
0.20  //  Array Data

};

CTQL.DoubleVector arrRSKTwoAssetCashOrNothing_Vol1 =
new  CTQL.DoubleVector(arrBRSKTwoAssetCashOrNothing_Vol1);

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


Example range for parameter : Vol2

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_Vol2;


double[] arrBRSKTwoAssetCashOrNothing_Vol2 = {
0.2545,
0.2412,
0.2276,
0.2632,
0.2695,
0.2713,
0.2252,
0.2696,
0.265,
0.2528,
0.2389,
0.2664,
0.2739,
0.2406,
0.2451,
0.252,
0.2667,
0.2259,
0.2602,
0.25  //  Array Data

};

CTQL.DoubleVector arrRSKTwoAssetCashOrNothing_Vol2 =
new  CTQL.DoubleVector(arrBRSKTwoAssetCashOrNothing_Vol2);

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


Example range for parameter : Rho

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


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

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



CTQL.CTRangeData RSKTwoAssetCashOrNothing_Rho;


double[] arrBRSKTwoAssetCashOrNothing_Rho = {
0.5176,
0.4825,
0.5347,
0.4812,
0.5006,
0.4597,
0.5498,
0.521,
0.4516,
0.5204,
0.4506,
0.4945,
0.5284,
0.5233,
0.4676,
0.4917,
0.5174,
0.5399,
0.4922,
0.5  //  Array Data

};

CTQL.DoubleVector arrRSKTwoAssetCashOrNothing_Rho =
new  CTQL.DoubleVector(arrBRSKTwoAssetCashOrNothing_Rho);

// Second parameter determines whether the array is a column array (false) or a row array (true)
RSKTwoAssetCashOrNothing_Rho = new  CTQL.CTRangeData(arrRSKTwoAssetCashOrNothing_Rho, 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.Pricing20 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 RSKTwoAssetCashOrNothing() 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.


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


Example
-0.0524283
0.023524
0.159343
0.180212
0.0318993
0.0693185
-0.146569
0.0798034
-0.0954344
0.156267
0.155204
0.143231
0.0959744
-0.0888186
-0.0952663
0.151189
0.162693
0.146075
0.144655
0.10602



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