FUT_BinaryBarrier





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

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

Key TAGs | Excel Index | API Index



There are 28 different types of so-called binary options.

The binary barrier options can be divided into two categories.

Cash-or-nothing barrier options.

These either pay out a pre-specified cash amount or nothing, depending on whether the asset price has hit the barrier or not.

The other category is the asset-or-nothing barrier options, which pay out the value of the asset or nothing, depending on whether the asset price has hit the barrier or not.

The 28 different types of options are : TypeFlag=1 implying Down-and-in cash-(at-hit)-or-nothing (S greater than H).

TypeFlag=2 implying Up-and-in cash-(at-hit)-or-nothing (S less than H).

TypeFlag=3 implying Down-and-in asset-(at-hit)-or-nothing (K=H) (S greater than H).

TypeFlag=4 implying Up-and-in asset-(at-hit)-or-nothing (K=H)(S less than H).

TypeFlag=5 implying Down-and-in cash-(at-expiry)-or-nothing (S greater than H).

TypeFlag=6 implying Up-and-in cash-(at-expiry)-or-nothing (S less than H).

TypeFlag=7 implying Down-and-in asset-(at-expiry)-or-nothing (S greater than H).

TypeFlag=8 implying Up-and-in asset-(at-expiry)-or-nothing (S less than H).

TypeFlag=9 implying Down-and-out cash-(at-expiry)-or-nothing (S greater than H).

TypeFlag=10 implying Up-and-out cash-(at-expiry)-or-nothing (S less than H).

TypeFlag=11 implying Down-and-out asset-(at-expiry)-or-nothing (S greater than H).

TypeFlag=12 implying Up-and-out asset-(at-expiry)-or-nothing (S less than H).

TypeFlag=13 implying Down-and-in cash-(at-expiry)-or-nothing call (S greater than H).

TypeFlag=14 implying Up-and-in cash-(at-expiry)-or-nothing call (S less than H).

TypeFlag=15 implying Down-and-in asset-(at-expiry)-or-nothing call (S greater than H).

TypeFlag=16 implying Up-and-in asset-(at-expiry)-or-nothing call (S less than H).

TypeFlag=17 implying Down-and-in cash-(at-expiry)-or-nothing put (S greater than H).

TypeFlag=18 implying Up-and-in cash-(at-expiry)-or-nothing put (S less than H).

TypeFlag=19 implying Down-and-in asset-(at-expiry)-or-nothing put (S greater than H).

TypeFlag=20 implying Up-and-in asset-(at-expiry)-or-nothing put (S less than H).

TypeFlag=21 implying Down-and-out cash-(at-expiry)-or-nothing call (S greater than H).

TypeFlag=22 implying Up-and-out cash-(at-expiry)-or-nothing call (S less than H).

TypeFlag=23 implying Down-and-out asset-(at-expiry)-or-nothing call (S greater than H).

TypeFlag=24 implying Up-and-out asset-(at-expiry)-or-nothing call (S less than H).

TypeFlag=25 implying Down-and-out cash-(at-expiry)-or-nothing put (S greater than H).

TypeFlag=26 implying Up-and-out cash-(at-expiry)-or-nothing put (S less than H).

TypeFlag=27 implying Down-and-out asset-(at-expiry)-or-nothing put (S greater than H).

TypeFlag=28 implying Up-and-out asset-(at-expiry)-or-nothing put (S less than H).

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_BinaryBarrier"



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




High level graphic of FUT_BinaryBarrier() 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. TypeFlag parameter

    Integer value (1 - 28) indicating option type.
  9. S parameter

    Underlying price
  10. X parameter

    Strike price of the option
  11. H parameter

    Continuous Barrier level
  12. AdjBarrFreq parameter

    Monitoring frequency that you wish the continuous barrier level value entered to have. (Basically will convert the barrier from continuous to discrete. If you choose 'Continuously', the barrier will still be a Continuous barrier). Valid values are : Continuously, Hourly, Daily, Weekly or Monthly.
  13. K parameter

    Cash value to be paid.
  14. T parameter

    Time to option maturity.
  15. 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.
  16. v parameter

    Volatility of the underlying.


Extended information

Function Syntax

VB Syntax


String CTFuturesOptionPortfolio.FUT_BinaryBarrier( _
String TradeKey, _
Long Reload, _
Variant ID, _
Variant TAG, _
Variant Ccy, _
Variant Units, _
Variant Position, _
Variant TypeFlag, _
Variant S, _
Variant X, _
Variant H, _
Variant AdjBarrFreq, _
Variant K, _
Variant T, _
Variant r, _
Variant v)


Excel Spreadsheet Syntax


=CT.FUT_BinaryBarrier(
Excel String Cell TradeKey,
Excel Numeric Cell Reload,
XLRange ID,
XLRange TAG,
XLRange Ccy,
XLRange Units,
XLRange Position,
XLRange TypeFlag,
XLRange S,
XLRange X,
XLRange H,
XLRange AdjBarrFreq,
XLRange K,
XLRange T,
XLRange r,
XLRange v)


C++ Syntax


static std::string FUT_BinaryBarrier(
std::string TradeKey,
long Reload,
CTRangeDataCPP ID,
CTRangeDataCPP TAG,
CTRangeDataCPP Ccy,
CTRangeDataCPP Units,
CTRangeDataCPP Position,
CTRangeDataCPP TypeFlag,
CTRangeDataCPP S,
CTRangeDataCPP X,
CTRangeDataCPP H,
CTRangeDataCPP AdjBarrFreq,
CTRangeDataCPP K,
CTRangeDataCPP T,
CTRangeDataCPP r,
CTRangeDataCPP v);


DotNET Syntax


System.String CTFuturesOptionPortfolioSA.FUT_BinaryBarrier(
System.String TradeKey,
System.Int32 Reload,
CTRangeData ID,
CTRangeData TAG,
CTRangeData Ccy,
CTRangeData Units,
CTRangeData Position,
CTRangeData TypeFlag,
CTRangeData S,
CTRangeData X,
CTRangeData H,
CTRangeData AdjBarrFreq,
CTRangeData K,
CTRangeData T,
CTRangeData r,
CTRangeData v);

Parameter data types

ArgNameArgTypeIsKey
TradeKeyStringFALSE
ReloadLongFALSE
IDRangeFALSE
TAGRangeFALSE
CcyRangeFALSE
UnitsRangeFALSE
PositionRangeFALSE
TypeFlagRangeFALSE
SRangeFALSE
XRangeFALSE
HRangeFALSE
AdjBarrFreqRangeFALSE
KRangeFALSE
TRangeFALSE
rRangeFALSE
vRangeFALSE


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_BinaryBarrierDeal
ReloadFALSE1
IDFALSEFUT_BinaryBarrier_ID_Range (creates a range object)
TAGFALSEFUT_BinaryBarrier_TAG_Range (creates a range object)
CcyFALSEFUT_BinaryBarrier_Ccy_Range (creates a range object)
UnitsFALSEFUT_BinaryBarrier_Units_Range (creates a range object)
PositionFALSEFUT_BinaryBarrier_Position_Range (creates a range object)
TypeFlagFALSEFUT_BinaryBarrier_TypeFlag_Range (creates a range object)
SFALSEFUT_BinaryBarrier_S_Range (creates a range object)
XFALSEFUT_BinaryBarrier_X_Range (creates a range object)
HFALSEFUT_BinaryBarrier_H_Range (creates a range object)
AdjBarrFreqFALSEFUT_BinaryBarrier_AdjBarrFreq_Range (creates a range object)
KFALSEFUT_BinaryBarrier_K_Range (creates a range object)
TFALSEFUT_BinaryBarrier_T_Range (creates a range object)
rFALSEFUT_BinaryBarrier_r_Range (creates a range object)
vFALSEFUT_BinaryBarrier_v_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_BinaryBarrier_ID;


string[] arrBFUT_BinaryBarrier_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_BinaryBarrier_ID =
new  CTQL.StringVector(arrBFUT_BinaryBarrier_ID);

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


string[] arrBFUT_BinaryBarrier_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_BinaryBarrier_TAG =
new  CTQL.StringVector(arrBFUT_BinaryBarrier_TAG);

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


string[] arrBFUT_BinaryBarrier_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_BinaryBarrier_Ccy =
new  CTQL.StringVector(arrBFUT_BinaryBarrier_Ccy);

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


int[] arrBFUT_BinaryBarrier_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_BinaryBarrier_Units =
new  CTQL.IntVector(arrBFUT_BinaryBarrier_Units);

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


string[] arrBFUT_BinaryBarrier_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_BinaryBarrier_Position =
new  CTQL.StringVector(arrBFUT_BinaryBarrier_Position);

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


int[] arrBFUT_BinaryBarrier_TypeFlag = {
11,
10,
10,
10,
11,
12,
11,
11,
11,
12,
11,
10,
10,
12,
11,
10,
11,
11,
11,
11  //  Array Data

};

CTQL.IntVector arrFUT_BinaryBarrier_TypeFlag =
new  CTQL.IntVector(arrBFUT_BinaryBarrier_TypeFlag);

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


Example range for parameter : S

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


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

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



CTQL.CTRangeData FUT_BinaryBarrier_S;


double[] arrBFUT_BinaryBarrier_S = {
110.7852,
100.0102,
113.1644,
114.1522,
104.0251,
107.3347,
114.3081,
109.6186,
105.1827,
104.4414,
105.5002,
109.7564,
104.8769,
110.2857,
99.4363,
98.7912,
104.4933,
111.5235,
100.7113,
105.0  //  Array Data

};

CTQL.DoubleVector arrFUT_BinaryBarrier_S =
new  CTQL.DoubleVector(arrBFUT_BinaryBarrier_S);

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


Example range for parameter : X

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


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

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



CTQL.CTRangeData FUT_BinaryBarrier_X;


int[] arrBFUT_BinaryBarrier_X = {
97,
112,
96,
97,
94,
95,
109,
98,
98,
104,
107,
94,
106,
102,
92,
107,
110,
110,
112,
102  //  Array Data

};

CTQL.IntVector arrFUT_BinaryBarrier_X =
new  CTQL.IntVector(arrBFUT_BinaryBarrier_X);

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


Example range for parameter : H

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


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

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



CTQL.CTRangeData FUT_BinaryBarrier_H;


int[] arrBFUT_BinaryBarrier_H = {
100,
103,
94,
97,
97,
97,
110,
107,
102,
99,
95,
100,
101,
96,
107,
100,
107,
108,
105,
100  //  Array Data

};

CTQL.IntVector arrFUT_BinaryBarrier_H =
new  CTQL.IntVector(arrBFUT_BinaryBarrier_H);

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


Example range for parameter : AdjBarrFreq

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


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

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



CTQL.CTRangeData FUT_BinaryBarrier_AdjBarrFreq;


string[] arrBFUT_BinaryBarrier_AdjBarrFreq = {
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily",
"Daily"  //  Array Data

};

CTQL.StringVector arrFUT_BinaryBarrier_AdjBarrFreq =
new  CTQL.StringVector(arrBFUT_BinaryBarrier_AdjBarrFreq);

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


int[] arrBFUT_BinaryBarrier_K = {
14,
14,
14,
16,
15,
14,
14,
16,
14,
15,
15,
16,
16,
16,
14,
15,
15,
14,
15,
15  //  Array Data

};

CTQL.IntVector arrFUT_BinaryBarrier_K =
new  CTQL.IntVector(arrBFUT_BinaryBarrier_K);

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


int[] arrBFUT_BinaryBarrier_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 arrFUT_BinaryBarrier_T =
new  CTQL.IntVector(arrBFUT_BinaryBarrier_T);

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


double[] arrBFUT_BinaryBarrier_r = {
0.1074,
0.1029,
0.1002,
0.1004,
0.0928,
0.0902,
0.0927,
0.1045,
0.1003,
0.0927,
0.0948,
0.0946,
0.1055,
0.0951,
0.0984,
0.0961,
0.1089,
0.1073,
0.1002,
0.10  //  Array Data

};

CTQL.DoubleVector arrFUT_BinaryBarrier_r =
new  CTQL.DoubleVector(arrBFUT_BinaryBarrier_r);

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


Example range for parameter : v

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


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

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



CTQL.CTRangeData FUT_BinaryBarrier_v;


double[] arrBFUT_BinaryBarrier_v = {
0.1807,
0.1865,
0.1852,
0.2185,
0.1976,
0.2005,
0.1987,
0.1805,
0.1938,
0.2156,
0.1927,
0.2112,
0.1933,
0.1922,
0.1877,
0.1819,
0.185,
0.196,
0.2093,
0.20  //  Array Data

};

CTQL.DoubleVector arrFUT_BinaryBarrier_v =
new  CTQL.DoubleVector(arrBFUT_BinaryBarrier_v);

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


MyFUT_BinaryBarrierDeal_27.FUT_BinaryBarrier.0

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