| Contents | Index |
[OAS, OAD, OAC] = oasbyhw(HWTree, Price, CouponRate,
Settle,
Maturity, OptSpec, Strike, ExerciseDates)
[OAS, OAD, OAC] = oasbyhw(HWTree, Price, CouponRate,
Settle,
Maturity, OptSpec, Strike, ExerciseDates, Name,Value)
[OAS, OAD, OAC] = oasbyhw(HWTree, Price, CouponRate, Settle, Maturity, OptSpec, Strike, ExerciseDates) calculates option adjusted spread (OAS), duration (OAD), and convexity (OAC) using an HW model.
[OAS, OAD, OAC] = oasbyhw(HWTree, Price, CouponRate, Settle, Maturity, OptSpec, Strike, ExerciseDates, Name,Value) calculates option adjusted spread (OAS), duration (OAD), and convexity (OAC) using an HW model with additional options specified by one or more Name,Value pair arguments.
HWTree |
Interest-rate tree structure created by hwtree. |
Price |
NINST-by-1 vector of market prices of bonds with embedded options. |
CouponRate |
NINST-by-1 vector for decimal annual rate. |
Settle |
NINST-by-1 vector for settlement date. |
Maturity |
NINST-by-1 vector for maturity date. |
OptSpec |
NINST-by-1 cell array of strings for 'call' or 'put'. |
Strike |
Matrix of strike price values for supported option types:
|
ExerciseDates |
Matrix of exercise callable or puttable dates for supported option types:
|
Specify optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
'AmericanOpt' |
NINST-by-1 vector for option flags: 0 (European/Bermuda) or 1 (American). Default: 0 (European/Bermuda) |
'Basis' |
Day-count basis of the instrument. A vector of integers.
For more information, see basis. Default: 0 (actual/actual) |
'EndMonthRule' |
NINST-by-1 vector for end-of-month rule. Values are 1 (in effect) and 0 (not in effect). Default: 1 (in effect) |
'Face' |
NINST-by-1 vector for face value. Default: 100 |
'IssueDate' |
NINST-by-1 vector of bond issue date. Default: If you do not specify an IssueDate, the cash flow payment dates are determined from other inputs. |
'FirstCouponDate' |
NINST-by-1 vector. Date when a bond makes its first coupon payment; used when bond has an irregular first coupon period. When FirstCouponDate and LastCouponDate are both specified, FirstCouponDate takes precedence in determining the coupon payment structure. Default: If you do not specify a FirstCouponDate, the cash flow payment dates are determined from other inputs. |
'LastCouponDate' |
NINST-by-1 vector. Last coupon date of a bond before the maturity date; used when bond has an irregular last coupon period. In the absence of a specified FirstCouponDate, a specified LastCouponDate determines the coupon structure of the bond. The coupon structure of a bond is truncated at the LastCouponDate, regardless of where it falls, and is followed only by the bond's maturity cash flow date. Default: If you do not specify a LastCouponDate, the cash flow payment dates are determined from other inputs. |
'Period' |
NINST-by-1 vector for coupons per year. Default: 2 per year |
'Options' |
Structure created with derivset containing derivatives pricing options. Default: None |
OAS |
NINST-by-1 vector for option adjusted spread. |
OAD |
NINST-by-1 vector for option adjusted duration. |
OAC |
NINST-by-1 vector for option adjusted convexity. |
A bond with embedded option allows the issuer to buy back (callable) or redeem (puttable) the bond at a predetermined price at specified future dates. Financial Derivatives Toolbox software supports American, European, and Bermuda callable and puttable bonds.
The pricing for a bond with embedded options is as follows:
Callable bond — The holder bought a bond and sold a call option to the issuer. For example, if interest rates go down by the time of the call date, the issuer is able to refinance its debt at a cheaper level and can call the bond. The price of a callable bond is:
Price callable bond = Price Option free bond − Price call option
Puttable bond — The holder bought a bond and a put option. For example, if interest rates rise, the future value of coupon payments becomes less valuable. Therefore, the investor can sell the bond back to the issuer and then lend proceeds elsewhere at a higher rate. The price of a puttable bond is:
Price puttable bond = Price Option free bond + Price put option
Compute OAS and OAD using the Hull-White (HW) model with:
ValuationDate = 'October-25-2010';
Rates = [0.0355; 0.0382; 0.0427; 0.0489];
StartDates = ValuationDate;
EndDates = datemnth(ValuationDate, 12:12:48)';
Compounding = 1;
% Define RateSpec
RateSpec = intenvset('ValuationDate', ValuationDate,...
'StartDates', StartDates, 'EndDates', EndDates, ...
'Rates', Rates,'Compounding', Compounding);
% Specify VolsSpec and TimeSpec
Sigma = 0.05;
Alpha = 0.01;
VS = hwvolspec(ValuationDate, EndDates, Sigma*ones(size(EndDates)),...
EndDates, Alpha*ones(size(EndDates)));
TS = hwtimespec(ValuationDate, EndDates, Compounding);
% Build the HW tree
HWTree = hwtree(VS, RateSpec, TS);
% Instrument information
CouponRate = 0.045;
Settle = ValuationDate;
Maturity = '25-October-2014';
OptSpec = 'call';
Strike = 100;
ExerciseDates = {'25-October-2010','25-October-2013'};
Period = 1;
AmericanOpt = 0;
Price = 97;
% Compute the OAS
[OAS, OAD] = oasbyhw(HWTree, Price, CouponRate, Settle, Maturity,...
OptSpec, Strike, ExerciseDates, 'Period', Period, 'AmericanOpt', AmericanOpt)
OAS =
-12.4436
OAD =
3.3045At a 5% volatility, the OAS is -12.44 basis points. A negative OAS means that the callable bond is expensive (overvalued) on a relative value basis. OAS depends on the assumed interest rate volatility, so, if a 1% interest rate volatility is assumed (Sigma = 0.01), the OAS is 51 basis points (positive), and in this case the bond is attractive (underpriced).
Use treeviewer to observe the tree you created:
treeviewer(HWTree)

Fabozzi, F., Handbook of Fixed Income Securities, McGraw-Hill, 7th edition, 2005.
Windas, T., Introduction to Option-Adjusted Spread Analysis, Bloomberg Press, 3rd edition, 2007.
hwprice | hwtree | instoptembnd | oasbybdt | oasbybk | oasbyhjm | optembndbyhw
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |