CapeTools Derivative Matrix
http://www.QuantTools.com
In total there are 42 functions present within the CapeTools Derivative Matrix category of functions.
General Description
Functions that price vanilla and Exotic options using variations of the black-scholes model. These functions do not create objects ***BUT*** generate all the second order (including cross) derivatives and displays the results within a matrix.
The risk values computed are the mathematical definition of a derivative (via differentiation). Thus if you wish to compute the risk numbers for a given shift (ie - a one basis point change in the parameter), then you simply multiply the risk number by the requested shift. Thus for gamma risk (second derivative of the underlying price, for a one unit change of the underlying we multiply by (1^2 = 1). For a one basis point change in the underlying we multiply the results by (0.0001^2).
All of the functions implemented here have been taken from : 'The Complete Guide To OPTION PRICING FORMULAS' by Espen Gaarder Haug. This book provides an in-depth analysis of every function described here. We have just implemented these functions in C++ and extended their functionality to include risk-numbers.
Function list.
- DM_AmericanExchangeOption - Option to exchange one asset for another.
- DM_AssetOrNothing - At expiry, the asset-or-nothing call option pays 0 if S is less than or equal to X and S if S is greater than X.
- DM_BAWAmericanApprox - Quadratic approximation method of Barone-Adesi and Whaley to price American options on an underlying asset with cost of carry rate b.
- DM_BSAmericanApprox - Bjerksund and Stensland approximation to price American options on stocks, futures and currencies.
- DM_BinaryBarrier - There are 28 different types of so-called binary options.
- DM_Black76 - Modified Black-Scholes for options on forward or futures.
- DM_CashOrNothingOption - The cash-or-nothing option pays out a cash amount K at expiry if the option is in-the-money.
- DM_ComplexChooser - Option that gives the holder the right to choose between a call option after time t1, with time to expiration Tc and strike Xc or a put option after time t1 with time to maturity Tp and strike Xp.
- DM_DoubleBarrier - A double barrier option is knocked in or out if the underlying price touches a lower boundary L or upper boundary U prior to expiration.
- DM_EquityLinkedFXO - In an equity-linked foreign-exchange option, the quantity of the face value will be linked to the level of the forward price of a stock or equity index.
- DM_EuropeanExchangeOption - Option to exchange one asset for another at expiration.
- DM_ExchangeExchangeOption - Exchange options on Exchange Options.
- DM_Executive - Jennergren and Naslund Executive option.
- DM_ExtendibleWriter - Options that can be exercised at their initial maturity date t1, but are extended to T2 if the option is out of the money at t1.
- DM_ExtremeSpreadOption - Option on the difference between the observed maximum or minimum from two different time periods.
- DM_FixedStrikeLookback - Call option, the strike is fixed in advance and at expiry the option pays out the max of the difference between the highest observed price Smax and the strike X and 0.
- DM_FloatingStrikeLookback - 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.
- DM_ForEquOptInDomCur - This is an option on foreign equity where the strike is denominated in domestic currency.
- DM_ForwardStartOption - Starts at the money or proportionally in or out of the money after a known elapsed time into the future.
- DM_GBlackScholes - Generalised Black-Scholes for options including a dividend yield, or currencies or options on forward, futures.
- DM_GapOption - Binary options, also known as digital options, are popular in the OTC markets for hedging speculation.
- DM_GeometricAverageRateOption - Asian options are especially popular in the currency and commodity markets.
- DM_JumpDiffusion - Option model with a process different from Brownian motion (Jump diffusion distribution).
- DM_LevyAsian - It is not possible to find a closed form solution for the valuation of options on an arithmetic average.
- DM_LookBarrier - Look-barrier options can be regarded as a combination of a partial time barrier option and a forward starting fixed strike lookback option.
- DM_OptionsOnOptions - Option on a plain vanilla option, call on call, call on put, put on call, put on put.
- DM_OptionsOnTheMaxMin - Options on the min or max of 2 risky assets.
- DM_PartialFixedLB - Call option, the strike is fixed in advance and at expiry the option pays out the max of the difference between the highest observed price Smax and the strike X and 0.
- DM_PartialFloatLB - 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.
- DM_PartialTimeTwoAssetBarrier - A partial-time tow-asset barrier option is similar to a standard two-asset barrier option, except that the barrier hits are monitored only for a fraction of the option's lifetime.
- DM_Quanto - A fixed exchange-rate foreign-equity option (Quanto) is denominated in another currency than that of the underlying equity exposure.
- DM_SimpleChooser - Option that gives the holder the right to choose between a call or a put option after time t1 both with the same strike X and time to maturity T.
- DM_SoftBarrier - A soft-barrier option is similar to a standard barrier option, except that the barrier is no longer a single level.
- DM_SpreadApproximation - European call spread option on two futures contracts is max(F1-F2-X,0), European put spread option on two futures contracts is max(X-F1+F2,0).
- DM_StandardBarrier - In options are paid for today but first come into existence if the asset price S hits the barrier H before expiration.
- DM_SuperShare - A SuperShare option entitles its holder to a payoff of 0 if the underlying price is between XL and XH (including the value of XH but not XL) and S/XL otherwise.
- DM_TakeoverFXoption - A takeover foreign exchange call gives the buyer the right to buy B units of a foreign currency at the strike price X if, and only if, the corporate takeover is successful.
- DM_TimeSwitchOption - Accumulates cash for every time unit the option is in the money.
- DM_TurnbullWakemanAsian - It is not possible to find a closed form solution for the valuation of options on an arithmetic average.
- DM_TwoAssetBarrier - 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.
- DM_TwoAssetCashOrNothing - Four types of two-asset cash-or-nothing options exist : A two-asset cash-or-nothing call pays out a fixed cash amount K if asset one, S1 is above the strike X1 and asset two, S2, is above strike X2 at expiration (TypeFlag=1).
- DM_TwoAssetCorrelation - One asset decides if the option is in or out of the money, another asset with its own strike decides the payoff.
Copyright (c) 2003-2007 CapeTools - All Rights Reserved.