CapeTools Bump Risk
http://www.QuantTools.com
In total there are 42 functions present within the CapeTools Bump Risk 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*** take range-valued parameters.
These functions are used to compute the changes in option values given a bump map that will be applied to one input parameter. The bump map can be a single value, a vector or a matrix input and will be simply added to the parameter that is to be bumped. The final result will be deducted from the base value. This function is very useful for scenario analysis.
These functions return risk numbers for every single double valued parameter (first and second derivatives including cross derivatives). Theta is (of course) computed even though it is a date parameter.
In addition, each parameter has a range object (excel range) as an input parameter. You can input a single-valued number in a range and if the function detects that the size of the other input ranges are longer, the function will automatically expand the single range to the same size. Every cell will contain the same constant number. This is used heavily within our examples.
First order derivative risk numbers can be requested by simply passing in the name of the parameter (preceded by the 'd' character) into the 'Greek' parameter of these functions (ie - dStock).
Second order derivative risk numbers can be requested by simply passing in the name of the parameter (preceded by the 'd' character) ( repeated twice) into the 'Greek' parameter of these functions (ie - dStockdStock).
Cross derivative risk numbers can be requested by simply passing in the name of the parameters (preceded by the 'd' character) into the 'Greek' parameter of these functions (ie - dStockdTime or dTimedStock).
You can of course make use of the following (in-built) case-insensitive Greek values :
- DELTA
- GAMMA
- VEGA
- VOLGA
- THETA
However when pricing options composed of two underlyers, we suggest using the former notation for the common risk values.
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.
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.
- RSKAmericanExchangeOption - Option to exchange one asset for another.
- RSKAssetOrNothing - 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.
- RSKBAWAmericanApprox - Quadratic approximation method of Barone-Adesi and Whaley to price American options on an underlying asset with cost of carry rate b.
- RSKBSAmericanApprox - Bjerksund and Stensland approximation to price American options on stocks, futures and currencies.
- RSKBinaryBarrier - There are 28 different types of so-called binary options.
- RSKBlack76 - Modified Black-Scholes for options on forward or futures.
- RSKCashOrNothingOption - The cash-or-nothing option pays out a cash amount K at expiry if the option is in-the-money.
- RSKComplexChooser - 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.
- RSKDoubleBarrier - 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.
- RSKEquityLinkedFXO - 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.
- RSKEuropeanExchangeOption - Option to exchange one asset for another at expiration.
- RSKExchangeExchangeOption - Exchange options on Exchange Options.
- RSKExecutive - Jennergren and Naslund Executive option.
- RSKExtendibleWriter - 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.
- RSKExtremeSpreadOption - Option on the difference between the observed maximum or minimum from two different time periods.
- RSKFixedStrikeLookback - 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.
- RSKFloatingStrikeLookback - 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.
- RSKForEquOptInDomCur - This is an option on foreign equity where the strike is denominated in domestic currency.
- RSKForwardStartOption - Starts at the money or proportionally in or out of the money after a known elapsed time into the future.
- RSKGBlackScholes - Generalised Black-Scholes for options including a dividend yield, or currencies or options on forward, futures.
- RSKGapOption - Binary options, also known as digital options, are popular in the OTC markets for hedging speculation.
- RSKGeometricAverageRateOption - Asian options are especially popular in the currency and commodity markets.
- RSKJumpDiffusion - Option model with a process different from Brownian motion (Jump diffusion distribution).
- RSKLevyAsian - It is not possible to find a closed form solution for the valuation of options on an arithmetic average.
- RSKLookBarrier - Look-barrier options can be regarded as a combination of a partial time barrier option and a forward starting fixed strike lookback option.
- RSKOptionsOnOptions - Option on a plain vanilla option, call on call, call on put, put on call, put on put.
- RSKOptionsOnTheMaxMin - Options on the min or max of 2 risky assets.
- RSKPartialFixedLB - 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.
- RSKPartialFloatLB - 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.
- RSKPartialTimeTwoAssetBarrier - 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.
- RSKQuanto - A fixed exchange-rate foreign-equity option (Quanto) is denominated in another currency than that of the underlying equity exposure.
- RSKSimpleChooser - 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.
- RSKSoftBarrier - A soft-barrier option is similar to a standard barrier option, except that the barrier is no longer a single level.
- RSKSpreadApproximation - 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).
- RSKStandardBarrier - In options are paid for today but first come into existence if the asset price S hits the barrier H before expiration.
- RSKSuperShare - 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.
- RSKTakeoverFXoption - 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.
- RSKTimeSwitchOption - Accumulates cash for every time unit the option is in the money.
- RSKTurnbullWakemanAsian - It is not possible to find a closed form solution for the valuation of options on an arithmetic average.
- RSKTwoAssetBarrier - 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.
- RSKTwoAssetCashOrNothing - 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).
- RSKTwoAssetCorrelation - 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.