MExecutive





http://www.QuantTools.com
CapeTools Exotic Analysis function list

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

Key TAGs | Excel Index | API Index



Jennergren and Naslund Executive option.

Equals BS() multiplied by the probabilty exp(-lamba*T) that the executive will stay with a firm until his/her option expires.

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 prices a portfolio of equity, commodities, futures or FX option deals from raw inputs.

All memory is discarded once the computation is finished.

You can request for all first and second order risk statistics simply by filling in the greek field with the name of the parameter.

The name of the parameter must be proceeded with the character 'd'. Thus if 'Stock', 'Time' and 'Vol' are the names of three parameters which represent underlying price, Option Maturity and option volatility respectively, you can request DELTA as 'dStock', GAMMA as 'dStockdStock' (dStock twice), VEGA as 'dVol', THETA as 'dTime', VOLGA as 'dVoldVol' (dVol twice) and VANNA (cross-derivative) as 'dStockdVol' or 'dVoldStock'. You can also, if you wish request 'dTimedVol' (second derivative with respect to Time and Vol).

If you wish to view all the second order derivatives within a matrix, please refer to the CapeTools Derivative Matrix category of functions.

This logic can be applied to any parameter which is of a double-valued type (decimal value).

The risk statistics are the partial derivatives with respect to the option price, thus you can scale the results by multiplying by a factor.

For example, to compute the VEGA for a one percent change in volatility (0.01), simply multiply the VEGA result by 0.01. To compute THETA for a one day change (1/365), multiply the THETA result by 1/365. To compute the DELTA for a one-unit change (1), multiply the delta by 1 which is, of course the same result as the original delta.

For second order risks, simply multiply by the product of the changes.



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




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

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

    Whether you are long or short the option.
  5. Level parameter

    Whether you would like to view the PV for the entire structure/portfolio 'TOTAL'. Whether you would like to view the PV for each option 'CASHFLOW'. Or whether you would like to view the PV and extended information, 'ALL'. Thus valid values are - 'TOTAL', 'CASHFLOW' or 'ALL'.
  6. CallPut parameter

    Option Types (C)all or (P)ut
  7. Underlying parameter

    Underlying price, curve
  8. Strike parameter

    Strike price of the option
  9. Time parameter

    Length of the option contract
  10. 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.
  11. 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.
  12. Vol parameter

    Volatility of the underlying.
  13. Lamba parameter

    Jump rate per year.
  14. Greek parameter

    For the option premium specify 'PREMIUM'. For all first derivatives, you can specify one of the following : 'dUnderlying' (for the 'Underlying' parameter), 'dStrike' (for the 'Strike' parameter), 'dTime' (for the 'Time' parameter), 'dRate' (for the 'Rate' parameter), 'dB' (for the 'B' parameter), 'dVol' (for the 'Vol' parameter), 'dLamba' (for the 'Lamba' parameter), For second order derivatives, you can specify combinations of the first order derivatives (i.e. - 'dUnderlyingdUnderlying', 'dVoldVol', 'dUnderlyingdVol'. )


Extended information

Function Syntax

VB Syntax


Variant CTExoticAnalysis.MExecutive( _
Long ValueDate, _
DayCountEnum dayCounter, _
Variant Units, _
Variant Position, _
String Level, _
Variant CallPut, _
Variant Underlying, _
Variant Strike, _
Variant Time, _
Variant Rate, _
Variant B, _
Variant Vol, _
Variant Lamba, _
String Greek)


Excel Spreadsheet Syntax


=CT.MExecutive(
Excel Numeric Cell ValueDate,
Excel String Cell dayCounter,
XLRange Units,
XLRange Position,
Excel String Cell Level,
XLRange CallPut,
XLRange Underlying,
XLRange Strike,
XLRange Time,
XLRange Rate,
XLRange B,
XLRange Vol,
XLRange Lamba,
Excel String Cell Greek)


C++ Syntax


static CTRangeDataCPP MExecutive(
long ValueDate,
DayCountEnum dayCounter,
CTRangeDataCPP Units,
CTRangeDataCPP Position,
std::string Level,
CTRangeDataCPP CallPut,
CTRangeDataCPP Underlying,
CTRangeDataCPP Strike,
CTRangeDataCPP Time,
CTRangeDataCPP Rate,
CTRangeDataCPP B,
CTRangeDataCPP Vol,
CTRangeDataCPP Lamba,
std::string Greek);


DotNET Syntax


CTRangeData CTExoticAnalysisSA.MExecutive(
System.Int32 ValueDate,
CTIEnums.DayCountEnum dayCounter,
CTRangeData Units,
CTRangeData Position,
System.String Level,
CTRangeData CallPut,
CTRangeData Underlying,
CTRangeData Strike,
CTRangeData Time,
CTRangeData Rate,
CTRangeData B,
CTRangeData Vol,
CTRangeData Lamba,
System.String Greek);

Parameter data types

ArgNameArgTypeIsKey
ValueDateLongFALSE
dayCounterDayCountEnumFALSE
UnitsRangeFALSE
PositionRangeFALSE
LevelStringFALSE
CallPutRangeFALSE
UnderlyingRangeFALSE
StrikeRangeFALSE
TimeRangeFALSE
RateRangeFALSE
BRangeFALSE
VolRangeFALSE
LambaRangeFALSE
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
UnitsFALSEMExecutive_Units_Range (creates a range object)
PositionFALSEMExecutive_Position_Range (creates a range object)
LevelFALSEALL
CallPutFALSEMExecutive_CallPut_Range (creates a range object)
UnderlyingFALSEMExecutive_Underlying_Range (creates a range object)
StrikeFALSEMExecutive_Strike_Range (creates a range object)
TimeFALSEMExecutive_Time_Range (creates a range object)
RateFALSEMExecutive_Rate_Range (creates a range object)
BFALSEMExecutive_B_Range (creates a range object)
VolFALSEMExecutive_Vol_Range (creates a range object)
LambaFALSEMExecutive_Lamba_Range (creates a range object)
GreekFALSEPREMIUM


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 MExecutive_Units;


int[] arrBMExecutive_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 arrMExecutive_Units =
new  CTQL.IntVector(arrBMExecutive_Units);

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


string[] arrBMExecutive_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 arrMExecutive_Position =
new  CTQL.StringVector(arrBMExecutive_Position);

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


string[] arrBMExecutive_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 arrMExecutive_CallPut =
new  CTQL.StringVector(arrBMExecutive_CallPut);

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


Example range for parameter : Underlying

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


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

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



CTQL.CTRangeData MExecutive_Underlying;


int[] arrBMExecutive_Underlying = {
69,
71,
71,
68,
62,
70,
70,
59,
66,
63,
68,
65,
64,
62,
69,
65,
70,
61,
67,
65  //  Array Data

};

CTQL.IntVector arrMExecutive_Underlying =
new  CTQL.IntVector(arrBMExecutive_Underlying);

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


Example range for parameter : Strike

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


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

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



CTQL.CTRangeData MExecutive_Strike;


int[] arrBMExecutive_Strike = {
59,
63,
61,
63,
67,
61,
61,
61,
65,
60,
60,
62,
70,
66,
67,
69,
70,
69,
63,
64  //  Array Data

};

CTQL.IntVector arrMExecutive_Strike =
new  CTQL.IntVector(arrBMExecutive_Strike);

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


Example range for parameter : Time

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


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

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



CTQL.CTRangeData MExecutive_Time;


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

};

CTQL.IntVector arrMExecutive_Time =
new  CTQL.IntVector(arrBMExecutive_Time);

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


double[] arrBMExecutive_Rate = {
0.0678,
0.0693,
0.0674,
0.0715,
0.0736,
0.0658,
0.0682,
0.0742,
0.068,
0.064,
0.0768,
0.0706,
0.0723,
0.0747,
0.0757,
0.0684,
0.0708,
0.0652,
0.0658,
0.07  //  Array Data

};

CTQL.DoubleVector arrMExecutive_Rate =
new  CTQL.DoubleVector(arrBMExecutive_Rate);

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


double[] arrBMExecutive_B = {
0.0374,
0.0411,
0.04,
0.0388,
0.0434,
0.0403,
0.0412,
0.0416,
0.0428,
0.0376,
0.0415,
0.0421,
0.0385,
0.0362,
0.0416,
0.0391,
0.0411,
0.0416,
0.0364,
0.04  //  Array Data

};

CTQL.DoubleVector arrMExecutive_B =
new  CTQL.DoubleVector(arrBMExecutive_B);

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


Example range for parameter : Vol

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


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

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



CTQL.CTRangeData MExecutive_Vol;


double[] arrBMExecutive_Vol = {
0.3943,
0.3766,
0.3481,
0.3699,
0.3576,
0.3447,
0.357,
0.3942,
0.3787,
0.3982,
0.3963,
0.3798,
0.3581,
0.3661,
0.4136,
0.3557,
0.3658,
0.4038,
0.3655,
0.38  //  Array Data

};

CTQL.DoubleVector arrMExecutive_Vol =
new  CTQL.DoubleVector(arrBMExecutive_Vol);

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


Example range for parameter : Lamba

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


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

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



CTQL.CTRangeData MExecutive_Lamba;


double[] arrBMExecutive_Lamba = {
0.1408,
0.1374,
0.1383,
0.1541,
0.139,
0.1529,
0.1583,
0.1414,
0.1625,
0.1637,
0.16,
0.1617,
0.1528,
0.1366,
0.147,
0.1612,
0.1606,
0.1619,
0.1428,
0.15  //  Array Data

};

CTQL.DoubleVector arrMExecutive_Lamba =
new  CTQL.DoubleVector(arrBMExecutive_Lamba);

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


Example
NoOfUnitsPositionCallPutUnderlyingStrikeTimeRateBVolLambaPREMIUM
1LONGCall7061392820.07030.03940.34970.162513.1797
1LONGCall6366392820.06770.03760.35650.1658.59279
1LONGCall6064392820.07630.0420.34260.14647.94707
1LONGCall7067392820.06470.03950.41740.159112.6749
1LONGCall6460392820.06330.04020.39340.15111.5286
1LONGCall6958392820.07410.03810.41030.143115.8327
1LONGCall6761392820.07680.04170.40570.14913.3863
1LONGCall6863392820.0640.03840.40930.137613.3433
1LONGCall6763392820.06710.04370.34840.143511.0721
1LONGCall5958392820.07550.03730.39190.148510.4193
1LONGCall6166392820.06610.04120.40780.16138.78174
1LONGCall6070392820.06320.04290.35310.14256.38381
1LONGCall6869392820.07310.0390.38160.160710.684
1LONGCall6060392820.06330.04220.41380.15879.90211
1LONGCall7064392820.07420.03980.37740.162812.9099
1LONGCall6264392820.07160.04170.35810.13979.11268
1LONGCall6461392820.06540.03720.41650.141512.2246
1LONGCall6058392820.06560.04250.40550.156410.3808
1LONGCall6863392820.06370.04060.35920.14711.7733
1LONGCall6564392820.070.040.380.1510.7777



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