BK_TurnbullWakemanAsian





http://www.QuantTools.com
CapeTools Storage function list

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

Key TAGs | Excel Index | API Index



It is not possible to find a closed form solution for the valuation of options on an arithmetic average.

The main reason for this is that when the asset is assumed to be lognormally distributed, the arithmetic average will not itself have a lognormal distribution.

Arithmetic average-rate options can be priced by analytical approximations or by Monte-carlo simulations.

This function uses an analytical approximation devised by Turnbull and Wakeman.

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 equity, commodities, futures or FX options 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 : "TurnbullWakemanAsian"



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




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

    Option Types (C)all or (P)ut
  9. S parameter

    Underlying price
  10. SA parameter

    Arithmetic average of the known asset price fixings.
  11. X parameter

    Strike price of the option
  12. T parameter

    Original time to option maturity.
  13. T2 parameter

    Remaining time to option maturity.
  14. tau parameter

    Time to start of average period.
  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. b parameter

    For the 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.
  17. v parameter

    Volatility of the underlying.


Extended information

Function Syntax

VB Syntax


String CTStorage.BK_TurnbullWakemanAsian( _
String TradeKey, _
Long Reload, _
Variant ID, _
Variant TAG, _
Variant Ccy, _
Variant Units, _
Variant Position, _
Variant CallPut, _
Variant S, _
Variant SA, _
Variant X, _
Variant T, _
Variant T2, _
Variant tau, _
Variant r, _
Variant b, _
Variant v)


Excel Spreadsheet Syntax


=CT.BK_TurnbullWakemanAsian(
Excel String Cell TradeKey,
Excel Numeric Cell Reload,
XLRange ID,
XLRange TAG,
XLRange Ccy,
XLRange Units,
XLRange Position,
XLRange CallPut,
XLRange S,
XLRange SA,
XLRange X,
XLRange T,
XLRange T2,
XLRange tau,
XLRange r,
XLRange b,
XLRange v)


C++ Syntax


static std::string BK_TurnbullWakemanAsian(
std::string TradeKey,
long Reload,
CTRangeDataCPP ID,
CTRangeDataCPP TAG,
CTRangeDataCPP Ccy,
CTRangeDataCPP Units,
CTRangeDataCPP Position,
CTRangeDataCPP CallPut,
CTRangeDataCPP S,
CTRangeDataCPP SA,
CTRangeDataCPP X,
CTRangeDataCPP T,
CTRangeDataCPP T2,
CTRangeDataCPP tau,
CTRangeDataCPP r,
CTRangeDataCPP b,
CTRangeDataCPP v);


DotNET Syntax


System.String CTStorageSA.BK_TurnbullWakemanAsian(
System.String TradeKey,
System.Int32 Reload,
CTRangeData ID,
CTRangeData TAG,
CTRangeData Ccy,
CTRangeData Units,
CTRangeData Position,
CTRangeData CallPut,
CTRangeData S,
CTRangeData SA,
CTRangeData X,
CTRangeData T,
CTRangeData T2,
CTRangeData tau,
CTRangeData r,
CTRangeData b,
CTRangeData v);

Parameter data types

ArgNameArgTypeIsKey
TradeKeyStringFALSE
ReloadLongFALSE
IDRangeFALSE
TAGRangeFALSE
CcyRangeFALSE
UnitsRangeFALSE
PositionRangeFALSE
CallPutRangeFALSE
SRangeFALSE
SARangeFALSE
XRangeFALSE
TRangeFALSE
T2RangeFALSE
tauRangeFALSE
rRangeFALSE
bRangeFALSE
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
TradeKeyFALSEMyBK_TurnbullWakemanAsianDeal
ReloadFALSE1
IDFALSEBK_TurnbullWakemanAsian_ID_Range (creates a range object)
TAGFALSEBK_TurnbullWakemanAsian_TAG_Range (creates a range object)
CcyFALSEBK_TurnbullWakemanAsian_Ccy_Range (creates a range object)
UnitsFALSEBK_TurnbullWakemanAsian_Units_Range (creates a range object)
PositionFALSEBK_TurnbullWakemanAsian_Position_Range (creates a range object)
CallPutFALSEBK_TurnbullWakemanAsian_CallPut_Range (creates a range object)
SFALSEBK_TurnbullWakemanAsian_S_Range (creates a range object)
SAFALSEBK_TurnbullWakemanAsian_SA_Range (creates a range object)
XFALSEBK_TurnbullWakemanAsian_X_Range (creates a range object)
TFALSEBK_TurnbullWakemanAsian_T_Range (creates a range object)
T2FALSEBK_TurnbullWakemanAsian_T2_Range (creates a range object)
tauFALSEBK_TurnbullWakemanAsian_tau_Range (creates a range object)
rFALSEBK_TurnbullWakemanAsian_r_Range (creates a range object)
bFALSEBK_TurnbullWakemanAsian_b_Range (creates a range object)
vFALSEBK_TurnbullWakemanAsian_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 BK_TurnbullWakemanAsian_ID;


string[] arrBBK_TurnbullWakemanAsian_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 arrBK_TurnbullWakemanAsian_ID =
new  CTQL.StringVector(arrBBK_TurnbullWakemanAsian_ID);

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


string[] arrBBK_TurnbullWakemanAsian_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 arrBK_TurnbullWakemanAsian_TAG =
new  CTQL.StringVector(arrBBK_TurnbullWakemanAsian_TAG);

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


string[] arrBBK_TurnbullWakemanAsian_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 arrBK_TurnbullWakemanAsian_Ccy =
new  CTQL.StringVector(arrBBK_TurnbullWakemanAsian_Ccy);

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


int[] arrBBK_TurnbullWakemanAsian_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 arrBK_TurnbullWakemanAsian_Units =
new  CTQL.IntVector(arrBBK_TurnbullWakemanAsian_Units);

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


string[] arrBBK_TurnbullWakemanAsian_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 arrBK_TurnbullWakemanAsian_Position =
new  CTQL.StringVector(arrBBK_TurnbullWakemanAsian_Position);

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


Example range for parameter : CallPut

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


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

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



CTQL.CTRangeData BK_TurnbullWakemanAsian_CallPut;


string[] arrBBK_TurnbullWakemanAsian_CallPut = {
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call",
"Call"  //  Array Data

};

CTQL.StringVector arrBK_TurnbullWakemanAsian_CallPut =
new  CTQL.StringVector(arrBBK_TurnbullWakemanAsian_CallPut);

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


double[] arrBBK_TurnbullWakemanAsian_S = {
97.4826,
106.0041,
90.4823,
90.6693,
97.9928,
106.1188,
90.2016,
96.3211,
91.6089,
98.5566,
98.0298,
102.4117,
109.6114,
100.7259,
107.9915,
108.1173,
90.7222,
107.711,
101.0841,
100.0  //  Array Data

};

CTQL.DoubleVector arrBK_TurnbullWakemanAsian_S =
new  CTQL.DoubleVector(arrBBK_TurnbullWakemanAsian_S);

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


Example range for parameter : SA

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


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

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



CTQL.CTRangeData BK_TurnbullWakemanAsian_SA;


int[] arrBBK_TurnbullWakemanAsian_SA = {
110,
103,
110,
112,
108,
104,
115,
105,
112,
104,
99,
110,
116,
101,
110,
104,
107,
106,
101,
110  //  Array Data

};

CTQL.IntVector arrBK_TurnbullWakemanAsian_SA =
new  CTQL.IntVector(arrBBK_TurnbullWakemanAsian_SA);

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


int[] arrBBK_TurnbullWakemanAsian_X = {
99,
91,
92,
92,
103,
97,
99,
102,
88,
89,
99,
103,
103,
91,
94,
103,
92,
100,
87,
95  //  Array Data

};

CTQL.IntVector arrBK_TurnbullWakemanAsian_X =
new  CTQL.IntVector(arrBBK_TurnbullWakemanAsian_X);

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


int[] arrBBK_TurnbullWakemanAsian_T = {
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 arrBK_TurnbullWakemanAsian_T =
new  CTQL.IntVector(arrBBK_TurnbullWakemanAsian_T);

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


Example range for parameter : T2

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


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

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



CTQL.CTRangeData BK_TurnbullWakemanAsian_T2;


int[] arrBBK_TurnbullWakemanAsian_T2 = {
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 arrBK_TurnbullWakemanAsian_T2 =
new  CTQL.IntVector(arrBBK_TurnbullWakemanAsian_T2);

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


Example range for parameter : tau

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


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

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



CTQL.CTRangeData BK_TurnbullWakemanAsian_tau;


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

};

CTQL.IntVector arrBK_TurnbullWakemanAsian_tau =
new  CTQL.IntVector(arrBBK_TurnbullWakemanAsian_tau);

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


double[] arrBBK_TurnbullWakemanAsian_r = {
0.1098,
0.1014,
0.1056,
0.1047,
0.1063,
0.1038,
0.1081,
0.0942,
0.0927,
0.1054,
0.106,
0.0967,
0.1015,
0.0946,
0.0961,
0.098,
0.1067,
0.0961,
0.1054,
0.10  //  Array Data

};

CTQL.DoubleVector arrBK_TurnbullWakemanAsian_r =
new  CTQL.DoubleVector(arrBBK_TurnbullWakemanAsian_r);

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


Example range for parameter : b

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


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

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



CTQL.CTRangeData BK_TurnbullWakemanAsian_b;


double[] arrBBK_TurnbullWakemanAsian_b = {
0.0451,
0.0541,
0.0489,
0.0515,
0.0467,
0.0487,
0.0492,
0.0499,
0.0459,
0.0506,
0.0473,
0.0467,
0.0546,
0.05,
0.0454,
0.0462,
0.048,
0.0467,
0.0475,
0.05  //  Array Data

};

CTQL.DoubleVector arrBK_TurnbullWakemanAsian_b =
new  CTQL.DoubleVector(arrBBK_TurnbullWakemanAsian_b);

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


double[] arrBBK_TurnbullWakemanAsian_v = {
0.3047,
0.3191,
0.3234,
0.2849,
0.3083,
0.3002,
0.2992,
0.3142,
0.305,
0.3115,
0.2759,
0.3074,
0.2703,
0.2956,
0.2793,
0.3257,
0.3249,
0.2988,
0.3238,
0.30  //  Array Data

};

CTQL.DoubleVector arrBK_TurnbullWakemanAsian_v =
new  CTQL.DoubleVector(arrBBK_TurnbullWakemanAsian_v);

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


MyBK_TurnbullWakemanAsianDeal_36.TurnbullWakemanAsian.0

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