Creates a BondOption object that will price the option via a Black Scholes methodology.
You can only price European BondOptions.
If your Bond has amortised notional amounts or step up/step down coupons, then we refer you to the Term structure Bond option function.
A flat repurchase rate (repo rate) is required as well as an exercise object.
The Bond object that is to be queried must have been previously created via one of the FixedCouponBond creation functions within the
CapeTools Bonds,
CapeTools Forward Bonds,
CapeTools Bonds (Yield) or
CapeTools Bonds (Price) category of functions.
These functions would have returned a string 'KEY' which is to be passed to the 'BondKey' parameter of this function.
This function requires the input of a exercise object key, which must have been produced via a call to one of the following functions :
AmericanExercise(),
EuropeanExercise(),
BermudanExercise(),
ExerciseFromLeg(),
ExerciseFromSche(),
ExerciseFromSW(),
ExerciseFromFIXBND() or
ExerciseFromFLTBND(). These functions would have returned a string 'KEY' which is to be passed to the 'exercise' parameter of this function.
Please refer to the large number of enumeration functions present within the
CapeTools Enums category of functions.
The
CapeTools Enums category of functions return correct string codes that can be passed to parameters taking fixed string values defined by the library (ie - DayCount codes, frequency codes, currency codes, compounding codes, business day convention codes etc...).
You can thus execute these enumeration functions which return the proper code, instead of trying to remember the string code needed or making spelling mistakes which can be difficult to debug.
This function creates an object and returns a string-key value to represent this created object.
The TAG value of the string-key returned (second part of the key) is : "BSBNDOPT"
- Key parameter
Key Handle to be used for the new Bond object.
- Reload parameter
When creating this object for the first time, set this parameter to a positive value. Within Excel, when re-computing a worksheet where you do not wish to recreate the object, set this parameter to zero (0).
- BondKey parameter
Key Handle to an already constructed BOND object (Fixed Coupon Bonds only).
- OptionType parameter
Type of option (C)all or (P)ut.
- exercise parameter
Key to an already constructed Exercise object.
- exercisePrice parameter
The exercise price of the BondOption.
- Vol parameter
The volatility of the Bond. You indicate the type of vol via the 'VolType' parameter. If a yield vol is passed in, it is converted to a price vol internally.
- VolType parameter
The type of volatility passed in : Either 'Yield' or 'Price' vol.
- reporate parameter
A repurchase rate (repo rate) value.
- compounding parameter
The compounding of the repurchase rate (repo rate) passed in. 'Discounted' 1/(1-r*t), 'Simple' (1+r*t), 'Compounded' (1+r/N)^(t*N), where N is the number of coupons per year, 'Continuous' e^{r*t} and 'SimpleThenCompounded' (Simple up to the first period then Compounded).
- Freq parameter
Frequency of the repo rate. (
- DayCount parameter
The DayCounter of the repo rate.
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.