PartialFloatLB





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

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

Key TAGs | Excel Index | API Index



Call option, the right to buy the underlying security at the lowest price observed Smin, put gives the right to sell the underlying security at the highest price observed Smax.

Option time to expiry is T2, the time to the end of the lookback period is t1.

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).



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




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

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

    Underlying price
  5. Smin parameter

    Minimum underlying price observed thus far
  6. Smax parameter

    Maximum underlying price observed thus far
  7. Timet1 parameter

    Time to the end of the lookback period
  8. TimeT2 parameter

    Time to expiration of the option.
  9. 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.
  10. 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.
  11. Vol parameter

    Volatility of the underlying.
  12. Lamba parameter

    Enables fractional lookback options where the strike is fixed at some percentage above or below the actual extremum Lamba greater than or equal to 1 for calls and lamba between 0 and 1 for puts.
  13. Greek parameter

    For the option premium specify 'PREMIUM'. For all first derivatives, you can specify one of the following : 'dUnderlying' (for the 'Underlying' parameter), 'dSmin' (for the 'Smin' parameter), 'dSmax' (for the 'Smax' parameter), 'dTimet1' (for the 'Timet1' parameter), 'dTimeT2' (for the 'TimeT2' 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


Double CTExoticOptions.PartialFloatLB( _
Long ValueDate, _
DayCountEnum dayCounter, _
String CallPut, _
Double Underlying, _
Double Smin, _
Double Smax, _
Long Timet1, _
Long TimeT2, _
Double Rate, _
Double B, _
Double Vol, _
Double Lamba, _
String Greek)


Excel Spreadsheet Syntax


=CT.EXO.PartialFloatLB(
Excel Numeric Cell ValueDate,
Excel String Cell dayCounter,
Excel String Cell CallPut,
Excel Numeric Cell Underlying,
Excel Numeric Cell Smin,
Excel Numeric Cell Smax,
Excel Numeric Cell Timet1,
Excel Numeric Cell TimeT2,
Excel Numeric Cell Rate,
Excel Numeric Cell B,
Excel Numeric Cell Vol,
Excel Numeric Cell Lamba,
Excel String Cell Greek)


C++ Syntax


static double PartialFloatLB(
long ValueDate,
DayCountEnum dayCounter,
std::string CallPut,
double Underlying,
double Smin,
double Smax,
long Timet1,
long TimeT2,
double Rate,
double B,
double Vol,
double Lamba,
std::string Greek);


DotNET Syntax


System.Double CTExoticOptionsSA.PartialFloatLB(
System.Int32 ValueDate,
CTIEnums.DayCountEnum dayCounter,
System.String CallPut,
System.Double Underlying,
System.Double Smin,
System.Double Smax,
System.Int32 Timet1,
System.Int32 TimeT2,
System.Double Rate,
System.Double B,
System.Double Vol,
System.Double Lamba,
System.String Greek);

Parameter data types

ArgNameArgTypeIsKey
ValueDateLongFALSE
dayCounterDayCountEnumFALSE
CallPutStringFALSE
UnderlyingDoubleFALSE
SminDoubleFALSE
SmaxDoubleFALSE
Timet1LongFALSE
TimeT2LongFALSE
RateDoubleFALSE
BDoubleFALSE
VolDoubleFALSE
LambaDoubleFALSE
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
CallPutFALSEPut
UnderlyingFALSE90
SminFALSE90
SmaxFALSE90
Timet1FALSE18/Oct/2005 (serial date type)
TimeT2FALSE19/Jul/2006 (serial date type)
RateFALSE0.06
BFALSE0.00
VolFALSE0.2
LambaFALSE1
GreekFALSEPREMIUM


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


7.91015682095918

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