FUT_ExchangeExchangeOption





http://www.QuantTools.com
CapeTools Futures Option Portfolio function list

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

Key TAGs | Excel Index | API Index



Exchange options on Exchange Options.

1=Option to exchange Q*S2 for the option to exchange S2 for S1, 2=Option to exchange the option to exchange S2 for S1 in return for Q*S2, 3=Option to exchange Q*S2 for the option to exchange S1 for S2, 4=Option to exchange the option to exchange S1 for S2 in return for Q*S2 . 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 stores a portfolio of options on futures in memory and returns a key.

This allows you to price or query the portfolio for different value dates via just the portfolio key.

You can price the portfolio via the PriceOptionBook() function.

You can view the trades within the portfolio via the DisplayOptionBook() function.

The DisplayOptionBook() function allows you to sort the portfolio using any column (or combination of columns).

A column is simply the NAME of any of the parameters within this function (excluding the 'TradeKey' and 'Reload' parameters).

In addition you can create a new portfolio object from this object by grouping trades within the portfolio, for example by Currency, Units, Sector etc..., using the GroupOptionBook() function.

You simply provide the NAME of the parameters that you wish to group.

Groups can represent more than one column and thus enables you to price a portion of the portfolio (a group) using the same PriceOptionBook() function.

You can view the grouped names within the grouped portfolio via the DisplayOptionGroups() function.

You can view the trades within a group via the DisplayGRPOptionBook() function.

Furthermore you can create a new portfolio from this portfolio object by selecting a portion of the trades (via a sql-like language).

Again this portfolio can be priced via the PriceOptionBook() function.

You can also execute the WriteXLRange(), WriteXLRange2() or WriteXLRange3() and the corresponding ReadXLRange(), ReadXLRange2() or ReadXLRange3() functions in order to read and write the portfolio data to file (XML).

WriteXLRange2() is preferable as you can save each of the ranges of this function to different slots (total of 15) within the XML file.



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



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




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



Parameter Description


  1. TradeKey parameter

    User Handle used to retrieve the object
  2. Reload parameter

    When creating this object for the first time, set this parameter to a positive value. Within Excel, when recomputing a worksheet where you do not wish to recreate the object, set this parameter to zero (0).
  3. ID parameter

    Identifier of deal. Used in order to index within the portfolio.
  4. TAG parameter

    User defined Tag. The information within this column can be used within the 'CapeTools Select Sub-Portfolios' or 'CapeTools Group Sub-Portfolios' categories of functions.
  5. Ccy parameter

    Currency of the portfolio.
  6. Units parameter

    Number of option contracts you wish to trade in (positive value).
  7. Position parameter

    Whether you are long or short the option.
  8. OptionType parameter

    Integer value (1 - 4) indicating option type.
  9. Underlying1 parameter

    Price of the first underlying
  10. Underlying2 parameter

    Price of the second underlying
  11. Q parameter

    Quantity of the second underlying S2.
  12. Timet1 parameter

    Time to expiration of the original option.
  13. TimeT parameter

    Time to expiration of the underlying option, (greater than dTimet1).
  14. Rate 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.
  15. Vol1 parameter

    Volatility of the underlying UnderlyingS1.
  16. Vol2 parameter

    Volatility of the underlying UnderlyingS2.
  17. Rho parameter

    Correlation between the two assets.


Extended information

Function Syntax

VB Syntax


String CTFuturesOptionPortfolio.FUT_ExchangeExchangeOption( _
String TradeKey, _
Long Reload, _
Variant ID, _
Variant TAG, _
Variant Ccy, _
Variant Units, _
Variant Position, _
Variant OptionType, _
Variant Underlying1, _
Variant Underlying2, _
Variant Q, _
Variant Timet1, _
Variant TimeT, _
Variant Rate, _
Variant Vol1, _
Variant Vol2, _
Variant Rho)


Excel Spreadsheet Syntax


=CT.FUT_ExchangeExchangeOption(
Excel String Cell TradeKey,
Excel Numeric Cell Reload,
XLRange ID,
XLRange TAG,
XLRange Ccy,
XLRange Units,
XLRange Position,
XLRange OptionType,
XLRange Underlying1,
XLRange Underlying2,
XLRange Q,
XLRange Timet1,
XLRange TimeT,
XLRange Rate,
XLRange Vol1,
XLRange Vol2,
XLRange Rho)


C++ Syntax


static std::string FUT_ExchangeExchangeOption(
std::string TradeKey,
long Reload,
CTRangeDataCPP ID,
CTRangeDataCPP TAG,
CTRangeDataCPP Ccy,
CTRangeDataCPP Units,
CTRangeDataCPP Position,
CTRangeDataCPP OptionType,
CTRangeDataCPP Underlying1,
CTRangeDataCPP Underlying2,
CTRangeDataCPP Q,
CTRangeDataCPP Timet1,
CTRangeDataCPP TimeT,
CTRangeDataCPP Rate,
CTRangeDataCPP Vol1,
CTRangeDataCPP Vol2,
CTRangeDataCPP Rho);


DotNET Syntax


System.String CTFuturesOptionPortfolioSA.FUT_ExchangeExchangeOption(
System.String TradeKey,
System.Int32 Reload,
CTRangeData ID,
CTRangeData TAG,
CTRangeData Ccy,
CTRangeData Units,
CTRangeData Position,
CTRangeData OptionType,
CTRangeData Underlying1,
CTRangeData Underlying2,
CTRangeData Q,
CTRangeData Timet1,
CTRangeData TimeT,
CTRangeData Rate,
CTRangeData Vol1,
CTRangeData Vol2,
CTRangeData Rho);

Parameter data types

ArgNameArgTypeIsKey
TradeKeyStringFALSE
ReloadLongFALSE
IDRangeFALSE
TAGRangeFALSE
CcyRangeFALSE
UnitsRangeFALSE
PositionRangeFALSE
OptionTypeRangeFALSE
Underlying1RangeFALSE
Underlying2RangeFALSE
QRangeFALSE
Timet1RangeFALSE
TimeTRangeFALSE
RateRangeFALSE
Vol1RangeFALSE
Vol2RangeFALSE
RhoRangeFALSE


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
TradeKeyFALSEMyFUT_ExchangeExchangeOptionDeal
ReloadFALSE1
IDFALSEFUT_ExchangeExchangeOption_ID_Range (creates a range object)
TAGFALSEFUT_ExchangeExchangeOption_TAG_Range (creates a range object)
CcyFALSEFUT_ExchangeExchangeOption_Ccy_Range (creates a range object)
UnitsFALSEFUT_ExchangeExchangeOption_Units_Range (creates a range object)
PositionFALSEFUT_ExchangeExchangeOption_Position_Range (creates a range object)
OptionTypeFALSEFUT_ExchangeExchangeOption_OptionType_Range (creates a range object)
Underlying1FALSEFUT_ExchangeExchangeOption_Underlying1_Range (creates a range object)
Underlying2FALSEFUT_ExchangeExchangeOption_Underlying2_Range (creates a range object)
QFALSEFUT_ExchangeExchangeOption_Q_Range (creates a range object)
Timet1FALSEFUT_ExchangeExchangeOption_Timet1_Range (creates a range object)
TimeTFALSEFUT_ExchangeExchangeOption_TimeT_Range (creates a range object)
RateFALSEFUT_ExchangeExchangeOption_Rate_Range (creates a range object)
Vol1FALSEFUT_ExchangeExchangeOption_Vol1_Range (creates a range object)
Vol2FALSEFUT_ExchangeExchangeOption_Vol2_Range (creates a range object)
RhoFALSEFUT_ExchangeExchangeOption_Rho_Range (creates a range object)


Example range for parameter : ID

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


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

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



CTQL.CTRangeData FUT_ExchangeExchangeOption_ID;


string[] arrBFUT_ExchangeExchangeOption_ID = {
"DEAL-11",
"DEAL-12",
"DEAL-13",
"DEAL-14",
"DEAL-15",
"DEAL-16",
"DEAL-17",
"DEAL-18",
"DEAL-19",
"DEAL-20",
"DEAL-21",
"DEAL-22",
"DEAL-23",
"DEAL-24",
"DEAL-25",
"DEAL-26",
"DEAL-27",
"DEAL-28",
"DEAL-29",
"DEAL-30"  //  Array Data

};

CTQL.StringVector arrFUT_ExchangeExchangeOption_ID =
new  CTQL.StringVector(arrBFUT_ExchangeExchangeOption_ID);

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


Example range for parameter : TAG

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


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

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



CTQL.CTRangeData FUT_ExchangeExchangeOption_TAG;


string[] arrBFUT_ExchangeExchangeOption_TAG = {
"TAG1",
"TAG1",
"TAG1",
"TAG1",
"TAG1",
"TAG1",
"TAG1",
"TAG1",
"TAG1",
"TAG1",
"TAG2",
"TAG2",
"TAG2",
"TAG2",
"TAG2",
"TAG2",
"TAG2",
"TAG2",
"TAG2",
"TAG2"  //  Array Data

};

CTQL.StringVector arrFUT_ExchangeExchangeOption_TAG =
new  CTQL.StringVector(arrBFUT_ExchangeExchangeOption_TAG);

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


Example range for parameter : Ccy

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


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

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



CTQL.CTRangeData FUT_ExchangeExchangeOption_Ccy;


string[] arrBFUT_ExchangeExchangeOption_Ccy = {
"GBP",
"EUR",
"GBP",
"EUR",
"GBP",
"EUR",
"GBP",
"EUR",
"GBP",
"EUR",
"GBP",
"EUR",
"GBP",
"EUR",
"GBP",
"EUR",
"GBP",
"EUR",
"GBP",
"GBP"  //  Array Data

};

CTQL.StringVector arrFUT_ExchangeExchangeOption_Ccy =
new  CTQL.StringVector(arrBFUT_ExchangeExchangeOption_Ccy);

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


Example range for parameter : Units

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


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

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



CTQL.CTRangeData FUT_ExchangeExchangeOption_Units;


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

};

CTQL.IntVector arrFUT_ExchangeExchangeOption_Units =
new  CTQL.IntVector(arrBFUT_ExchangeExchangeOption_Units);

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


Example range for parameter : Position

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


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

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



CTQL.CTRangeData FUT_ExchangeExchangeOption_Position;


string[] arrBFUT_ExchangeExchangeOption_Position = {
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG",
"LONG"  //  Array Data

};

CTQL.StringVector arrFUT_ExchangeExchangeOption_Position =
new  CTQL.StringVector(arrBFUT_ExchangeExchangeOption_Position);

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


Example range for parameter : OptionType

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


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

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



CTQL.CTRangeData FUT_ExchangeExchangeOption_OptionType;


int[] arrBFUT_ExchangeExchangeOption_OptionType = {
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2  //  Array Data

};

CTQL.IntVector arrFUT_ExchangeExchangeOption_OptionType =
new  CTQL.IntVector(arrBFUT_ExchangeExchangeOption_OptionType);

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


Example range for parameter : Underlying1

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


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

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



CTQL.CTRangeData FUT_ExchangeExchangeOption_Underlying1;


int[] arrBFUT_ExchangeExchangeOption_Underlying1 = {
102,
100,
95,
112,
113,
98,
97,
106,
98,
104,
95,
102,
95,
115,
107,
111,
111,
115,
113,
105  //  Array Data

};

CTQL.IntVector arrFUT_ExchangeExchangeOption_Underlying1 =
new  CTQL.IntVector(arrBFUT_ExchangeExchangeOption_Underlying1);

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


Example range for parameter : Underlying2

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


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

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



CTQL.CTRangeData FUT_ExchangeExchangeOption_Underlying2;


int[] arrBFUT_ExchangeExchangeOption_Underlying2 = {
97,
91,
92,
101,
108,
101,
99,
95,
108,
104,
91,
106,
98,
106,
91,
106,
103,
104,
103,
100  //  Array Data

};

CTQL.IntVector arrFUT_ExchangeExchangeOption_Underlying2 =
new  CTQL.IntVector(arrBFUT_ExchangeExchangeOption_Underlying2);

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


Example range for parameter : Q

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


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

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



CTQL.CTRangeData FUT_ExchangeExchangeOption_Q;


double[] arrBFUT_ExchangeExchangeOption_Q = {
0.0933,
0.1049,
0.1064,
0.0914,
0.0909,
0.098,
0.0942,
0.092,
0.1033,
0.1036,
0.0936,
0.11,
0.1056,
0.0928,
0.1027,
0.0977,
0.1023,
0.1084,
0.104,
0.1  //  Array Data

};

CTQL.DoubleVector arrFUT_ExchangeExchangeOption_Q =
new  CTQL.DoubleVector(arrBFUT_ExchangeExchangeOption_Q);

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


Example range for parameter : Timet1

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


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

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



CTQL.CTRangeData FUT_ExchangeExchangeOption_Timet1;


int[] arrBFUT_ExchangeExchangeOption_Timet1 = {
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/4/2006", "dd/mm/yyyy")  //  Array Data

};

CTQL.IntVector arrFUT_ExchangeExchangeOption_Timet1 =
new  CTQL.IntVector(arrBFUT_ExchangeExchangeOption_Timet1);

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


Example range for parameter : TimeT

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


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

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



CTQL.CTRangeData FUT_ExchangeExchangeOption_TimeT;


int[] arrBFUT_ExchangeExchangeOption_TimeT = {
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy"),
CTQL.Date.serialNumber("19/7/2006", "dd/mm/yyyy")  //  Array Data

};

CTQL.IntVector arrFUT_ExchangeExchangeOption_TimeT =
new  CTQL.IntVector(arrBFUT_ExchangeExchangeOption_TimeT);

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


Example range for parameter : Rate

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


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

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



CTQL.CTRangeData FUT_ExchangeExchangeOption_Rate;


double[] arrBFUT_ExchangeExchangeOption_Rate = {
0.0924,
0.0975,
0.1042,
0.0919,
0.1045,
0.1038,
0.1034,
0.1059,
0.093,
0.0915,
0.1049,
0.092,
0.1079,
0.0926,
0.1097,
0.0986,
0.11,
0.1056,
0.098,
0.1  //  Array Data

};

CTQL.DoubleVector arrFUT_ExchangeExchangeOption_Rate =
new  CTQL.DoubleVector(arrBFUT_ExchangeExchangeOption_Rate);

// Second parameter determines whether the array is a column array (false) or a row array (true)
FUT_ExchangeExchangeOption_Rate = new  CTQL.CTRangeData(arrFUT_ExchangeExchangeOption_Rate, 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 FUT_ExchangeExchangeOption_Vol1;


double[] arrBFUT_ExchangeExchangeOption_Vol1 = {
0.187,
0.2056,
0.188,
0.184,
0.1941,
0.2067,
0.2084,
0.1821,
0.1917,
0.2087,
0.1879,
0.2171,
0.2167,
0.1936,
0.1833,
0.1906,
0.187,
0.1802,
0.1804,
0.2  //  Array Data

};

CTQL.DoubleVector arrFUT_ExchangeExchangeOption_Vol1 =
new  CTQL.DoubleVector(arrBFUT_ExchangeExchangeOption_Vol1);

// Second parameter determines whether the array is a column array (false) or a row array (true)
FUT_ExchangeExchangeOption_Vol1 = new  CTQL.CTRangeData(arrFUT_ExchangeExchangeOption_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 FUT_ExchangeExchangeOption_Vol2;


double[] arrBFUT_ExchangeExchangeOption_Vol2 = {
0.2416,
0.261,
0.2317,
0.2425,
0.2628,
0.2283,
0.2496,
0.2416,
0.2696,
0.2586,
0.2695,
0.2624,
0.2285,
0.2303,
0.2713,
0.268,
0.241,
0.2671,
0.2502,
0.25  //  Array Data

};

CTQL.DoubleVector arrFUT_ExchangeExchangeOption_Vol2 =
new  CTQL.DoubleVector(arrBFUT_ExchangeExchangeOption_Vol2);

// Second parameter determines whether the array is a column array (false) or a row array (true)
FUT_ExchangeExchangeOption_Vol2 = new  CTQL.CTRangeData(arrFUT_ExchangeExchangeOption_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 FUT_ExchangeExchangeOption_Rho;


double[] arrBFUT_ExchangeExchangeOption_Rho = {
0.4831,
0.5034,
0.4823,
0.5195,
0.5048,
0.502,
0.5203,
0.5297,
0.5269,
0.5031,
0.5401,
0.5263,
0.4948,
0.4515,
0.4634,
0.4748,
0.5181,
0.4997,
0.4898,
0.5  //  Array Data

};

CTQL.DoubleVector arrFUT_ExchangeExchangeOption_Rho =
new  CTQL.DoubleVector(arrBFUT_ExchangeExchangeOption_Rho);

// Second parameter determines whether the array is a column array (false) or a row array (true)
FUT_ExchangeExchangeOption_Rho = new  CTQL.CTRangeData(arrFUT_ExchangeExchangeOption_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.OptionPortfolios20 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 FUT_ExchangeExchangeOption() 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 FUT_ExchangeExchangeOption() function call


MyFUT_ExchangeExchangeOptionDeal_15.FUT_ExchangeExchangeOption.0

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