CapeTools Storage
http://www.QuantTools.com
In total there are 41 functions present within the CapeTools Storage category of functions.
General Description
Functions that price vanilla and Exotic options using variations of the black-scholes model. These functions create portfolio objects. The benefit of these functions is that there are external functions to sort and group deals. You can mix option contracts from different currencies and finally you can price the whole portfolio a selection of the portfolio in any currency (via an FX manager object).
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.
You can commit the trades (portfolio) to disk via the numerous range-to XML and XML to range functions present within the 'CapeTools Utils' category of functions.
Once a portfolio has been created, the 'CapeTools Exotic Options Tools' category of functions is responsible for selecting, grouping and pricing these portfolios.
The SubOptionBook() function is responsible for selecting trades via an SQL type criteria and creating a new portfolio object.
The GroupOptionBook() function is responsible for grouping trades via an SQL type criteria and creating a new portfolio object.
The DisplayOptionGroups() function will display the unique columns of the grouped portfolio
The DisplayGRPOptionBook() function will display the trades within the selected group. A list of possible groups can be determined via the said DisplayOptionGroups() function.
The DisplayOptionBook() function will display the trades within a portfolio, sorted on a list of columns.
The PriceOptionBook() function will price the portfolio. This function holds a 'Greek' parameter and this parameter taylors what number are generated.
When priced, you can request the price for the total portfolio, the price of each trade. In addition you can request detailed information for each trade.
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.
- BK_AmericanExchangeOption - Option to exchange one asset for another.
- BK_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.
- BK_BAWAmericanApprox - Quadratic approximation method of Barone-Adesi and Whaley to price American options on an underlying asset with cost of carry rate b.
- BK_BSAmericanApprox - Bjerksund and Stensland approximation to price American options on stocks, futures and currencies.
- BK_BinaryBarrier - There are 28 different types of so-called binary options.
- BK_Black76 - Modified Black-Scholes for options on forward or futures.
- BK_CashOrNothingOption - The cash-or-nothing option pays out a cash amount K at expiry if the option is in-the-money.
- BK_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.
- BK_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.
- BK_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.
- BK_EuropeanExchangeOption - Option to exchange one asset for another at expiration.
- BK_ExchangeExchangeOption - Exchange options on Exchange Options.
- BK_Executive - Jennergren and Naslund Executive option.
- BK_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.
- BK_ExtremeSpreadOption - Option on the difference between the observed maximum or minimum from two different time periods.
- BK_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.
- BK_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.
- BK_ForEquOptInDomCur - This is an option on foreign equity where the strike is denominated in domestic currency.
- BK_ForwardStartOption - Starts at the money or proportionally in or out of the money after a known elapsed time into the future.
- BK_GBlackScholes - Generalised Black-Scholes for options including a dividend yield, or currencies or options on forward, futures.
- BK_GapOption - Binary options, also known as digital options, are popular in the OTC markets for hedging speculation.
- BK_GeometricAverageRateOption - Asian options are especially popular in the currency and commodity markets.
- BK_JumpDiffusion - Option model with a process different from Brownian motion (Jump diffusion distribution).
- BK_LevyAsian - It is not possible to find a closed form solution for the valuation of options on an arithmetic average.
- BK_LookBarrier - Look-barrier options can be regarded as a combination of a partial time barrier option and a forward starting fixed strike lookback option.
- BK_OptionsOnOptions - Option on a plain vanilla option, call on call, call on put, put on call, put on put.
- BK_OptionsOnTheMaxMin - Options on the min or max of 2 risky assets.
- BK_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.
- BK_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.
- BK_Quanto - A fixed exchange-rate foreign-equity option (Quanto) is denominated in another currency than that of the underlying equity exposure.
- BK_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.
- BK_SoftBarrier - A soft-barrier option is similar to a standard barrier option, except that the barrier is no longer a single level.
- BK_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).
- BK_StandardBarrier - In options are paid for today but first come into existence if the asset price S hits the barrier H before expiration.
- BK_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.
- BK_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.
- BK_TimeSwitchOption - Accumulates cash for every time unit the option is in the money.
- BK_TurnbullWakemanAsian - It is not possible to find a closed form solution for the valuation of options on an arithmetic average.
- BK_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.
- BK_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).
- BK_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.