In a two-asset barrier option, one of the underlying assets, S1, determines how much the option is in or out-of-the-money, and the other asset, S2, is linked to barrier hits.
The option is knocked in or out if asset S2 hits the Barrier H during the option period, while the payoff depends on asset S1 and the strike price X. 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).
- ValueDate parameter
Valuation Date (typically equal to Today's date)
- 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.
- TypeFlag parameter
Option Types cdi, cui, pdi, pui, cdo,cuo, pdo, puo
- S1 parameter
Underlying1 price
- S2 parameter
Underlying2 price
- X parameter
Strike price of the option
- H parameter
Continuous Barrier level
- 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.
- T parameter
Time to option maturity.
- 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.
- b1 parameter
For the first 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.
- b2 parameter
For the second 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.
- v1 parameter
Volatility of the first underlying.
- v2 parameter
Volatility of the second underlying.
- rho parameter
Correlation between the two assets.
- Greek parameter
For the option premium specify 'PREMIUM'. For all first derivatives, you can specify one of the following : 'dS1' (for the 'S1' parameter), 'dS2' (for the 'S2' parameter), 'dX' (for the 'X' parameter), 'dH' (for the 'H' parameter), 'dT' (for the 'T' parameter), 'dr' (for the 'r' parameter), 'db1' (for the 'b1' parameter), 'db2' (for the 'b2' parameter), 'dv1' (for the 'v1' parameter), 'dv2' (for the 'v2' parameter), 'drho' (for the 'rho' parameter), For second order derivatives, you can specify combinations of the first order derivatives (i.e. - 'dS1dS1', 'dv1dv1', 'dS1dv1'. )
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.
Copyright (c) 2003-2007 CapeTools - All Rights Reserved.