| Financial Toolbox™ | ![]() |
Spread = bndspread(SpotInfo, Price, Coupon, Settle, Maturity, Period, Basis, EndMonthRule, IssueDate, FirstCouponDate, LastCouponDate)
SpotInfo | Two-column matrix: [SpotDates ZeroRates] Zero rates correspond to maturities on the spot dates, continuously compounded. You will obtain the best results if you choose evenly spaced rates close together, for example, by using the three-month deposit rates. |
Price | Price for every $100 notional amount of bonds whose spreads are computed. |
CouponRate | Decimal number indicating the annual percentage rate used to determine the coupons payable on a bond. |
Settle | Settlement date. A vector of serial date numbers or date strings. Settle must be earlier than or equal to Maturity. |
Maturity | Maturity date. A vector of serial date numbers or date strings. |
Period | (Optional) Coupons per year of the bond. A scalar or vector of integers. Allowed values are 0, 1, 2 (default), 3, 4, 6, and 12. |
Basis | (Optional) Day-count basis of the instrument. A vector of integers.
|
EndMonthRule | (Optional) End-of-month rule. A vector. This rule applies only when Maturity is an end-of-month date for a month having 30 or fewer days. 0 = ignore rule, meaning that a bond's coupon payment date is always the same numerical day of the month. 1 = set rule on (default), meaning that a bond's coupon payment date is always the last actual day of the month. |
IssueDate | (Optional) Date when a bond was issued. |
FirstCouponDate | (Optional) Date when a bond makes its first coupon payment. When FirstCouponDate and LastCouponDate are both specified, FirstCouponDate takes precedence in determining the coupon payment structure. |
LastCouponDate | (Optional) Last coupon date of a bond before the maturity date. 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 will be followed only by the bond's maturity cash flow date. |
Spread = bndspread(SpotInfo, Price, Coupon, Settle, Maturity, Period, Basis, EndMonthRule, IssueDate, FirstCouponDate, LastCouponDate) computes the static spread to benchmark in basis points.
Compute a FNMA 4 3/8 spread over a Treasury spot-curve.
% Build spot curve.
RefMaturity = [datenum('02/27/2003');
datenum('05/29/2003');
datenum('10/31/2004');
datenum('11/15/2007');
datenum('11/15/2012');
datenum('02/15/2031')];
RefCpn = [0;
0;
2.125;
3;
4;
5.375] / 100;
RefPrices = [99.6964;
99.3572;
100.3662;
99.4511;
99.4299;
106.5756];
RefBonds = [RefPrices, RefMaturity, RefCpn];
Settle = datenum('26-Nov-2002');
[ZeroRates, CurveDates] = zbtprice(RefBonds(:, 2:end), ...
RefPrices, Settle)
% FNMA 4 3/8 maturing 10/06 at 4.30 pm Tuesday, Nov 26, 2002
Price = 105.484;
Coupon = 0.04375;
Maturity = datenum('15-Oct-2006');
% All optional inputs are supposed to be accounted by default,
% except the accrued interest under 30/360 (SIA), so:
Period = 2;
Basis = 1;
SpotInfo = [CurveDates, ZeroRates];
% Compute static spread over treasury curve, taking into account
% the shape of curve as derived by bootstrapping method embedded
% within bndspread.
SpreadInBP = bndspread(SpotInfo, Price, Coupon, Settle, ...
Maturity, Period, Basis)
plot(CurveDates, ZeroRates*100, 'b', CurveDates, ...
ZeroRates*100+SpreadInBP/100, 'r--')
legend({'Treasury'; 'FNMA 4 3/8'})
xlabel('Curve Dates')
ylabel('Spot Rate [%]')
grid;
ZeroRates =
0.0121
0.0127
0.0194
0.0317
0.0423
0.0550
CurveDates =
731639
731730
732251
733361
735188
741854
SpreadInBP =
18.7582

![]() | bndprice | bndyield | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |