Skip to Main Content Skip to Search
Product Documentation

bondbyhjm - Price bond from Heath-Jarrow-Morton interest-rate tree

Syntax

[Price, PriceTree] = bondbyhjm(HJMTree, CouponRate, Settle,
Maturity, Period, Basis, EndMonthRule, IssueDate,
FirstCouponDate, LastCouponDate, StartDate, Face, Options)

Arguments

HJMTree

Forward rate tree structure created by hjmtree.

CouponRate

Decimal annual rate. CouponRate is a NINST-by-1 vector or NINST-by-1 cell array of decimal annual rates, or decimal annual rate schedules. For the latter case of a variable coupon schedule, each element of the cell array is a NumDates-by-2 cell array, where the first column is dates and the second column is its associated rate. The date indicates the last day that the coupon rate is valid.

Settle

Settlement date. A vector of serial date numbers or date strings. Settle must be earlier than Maturity.

Maturity

Maturity date. A vector of serial date numbers or date strings.

Period

(Optional) Coupons per year of the bond. A vector of integers. Allowed values are 1, 2, 3, 4, 6, and 12. Default = 2.

Basis

(Optional) Day-count basis of the instrument. A vector of integers.

  • 0 = actual/actual (default)

  • 1 = 30/360 (SIA)

  • 2 = actual/360

  • 3 = actual/365

  • 4 = 30/360 (BMA)

  • 5 = 30/360 (ISDA)

  • 6 = 30/360 (European)

  • 7 = actual/365 (Japanese)

  • 8 = actual/actual (ICMA)

  • 9 = actual/360 (ICMA)

  • 10 = actual/365 (ICMA)

  • 11 = 30/360E (ICMA)

  • 12 = actual/actual (ISDA)

  • 13 = BUS/252

For more information, see basis.

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; 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. If you do not specify a FirstCouponDate, the cash flow payment dates are determined from other inputs.

LastCouponDate

(Optional) 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. If you do not specify a LastCouponDate, the cash flow payment dates are determined from other inputs.

StartDate

(Optional) Date when a bond actually starts (the date from which a bond cash flow is considered). To make an instrument forward-starting, specify this date as a future date. If you do not specify StartDate, the effective start date is the Settle date.

Face

(Optional) Face or par value. Face is a NINST-by-1 vector or NINST-by-1 cell array of face values, or face value schedules. For the latter case, each element of the cell array is a NumDates-by-2 cell array, where the first column is dates and the second column is its associated face value. The date indicates the last day that the face value is valid. Default = 100.

Options

(Optional) Derivatives pricing options structure created with derivset.

The Settle date for every bond is set to the ValuationDate of the HJM tree. The bond argument Settle is ignored.

Description

[Price, PriceTree] = bondbyhjm(HJMTree, CouponRate, Settle,Maturity, Period, Basis, EndMonthRule, IssueDate,FirstCouponDate, LastCouponDate, StartDate, Face, Options) computes the price of a bond from an HJM forward-rate tree.

Price is a number of instruments (NINST)-by-1 matrix of expected prices at time 0.

PriceTree is a structure of trees containing vectors of instrument prices and accrued interest, and a vector of observation times for each node. Within PriceTree

bondbyhjm computes prices of vanilla bonds, stepped coupon bonds, and sinking fund bonds with no market purchase option and no call provisions.

Definitions

Vanilla Bond

A vanilla coupon bond is a security representing an obligation to repay a borrowed amount at a designated time and to make periodic interest payments until that time. The issuer of a bond makes the periodic interest payments until the bond matures. At maturity, the issuer pays to the holder of the bond the principal amount owed (face value) and the last interest payment.

Stepped Coupon Bond

A step-up and step-down bond is a debt security with a predetermined coupon structure over time. With these instruments, coupons increase (step up) or decrease (step down) at specific times during the life of the bond.

Sinking Fund Bond

A sinking fund bond is a coupon bond with a sinking fund provision. This provision obligates the issuer to amortize portions of the principal prior to maturity, affecting bond prices since the time of the principal repayment changes. This means that investors receive the coupon and a portion of the principal paid back over time. These types of bonds reduce credit risk, since it lowers the probability of investors not receiving their principal payment at maturity.

Examples

Price a 4% bond using an HJM forward-rate tree.

Load the file deriv.mat, which provides HJMTree. The HJMTree structure contains the time and forward-rate information needed to price the bond.

load deriv.mat; 

Set the required values. Other arguments will use defaults.

CouponRate = 0.04;
Settle = '01-Jan-2000';
Maturity = '01-Jan-2004';

Use bondbyhjm to compute the price of the bond.

Price = bondbyhjm(HJMTree, CouponRate, Settle, Maturity)
Warning: Not all cash flows are aligned with the tree. Result will 
be approximated.

Price =

  97.5280
 

Price the following single stepped coupon bonds using the following data:

% The data for the interest rate term structure is as follows:
Rates = [0.035; 0.042147; 0.047345; 0.052707];
ValuationDate = 'Jan-1-2010';
StartDates = ValuationDate;
EndDates = {'Jan-1-2011'; 'Jan-1-2012'; 'Jan-1-2013'; 'Jan-1-2014'};
Compounding = 1;

% Create RateSpec
RS = intenvset('ValuationDate', ValuationDate, 'StartDates', StartDates,...
'EndDates', EndDates,'Rates', Rates, 'Compounding', Compounding);

% Bond Instrument
Settle = '01-Jan-2010';
Maturity = {'01-Jan-2011';'01-Jan-2012';'01-Jan-2013';'01-Jan-2014'};
CouponRate = {{'01-Jan-2012' .0425;'01-Jan-2014' .0750}};
Period = 1;

% Build the tree with the following data
Volatility = [.2; .19; .18; .17];
CurveTerm = [ 1;  2;   3;   4];
HJMTimeSpec = hjmtimespec(ValuationDate, EndDates);
HJMVolSpec = hjmvolspec('Proportional', Volatility, CurveTerm, 1e6);
HJMT = hjmtree(HJMVolSpec,RS,HJMTimeSpec);

% Compute the price of the single stepped coupon bonds
PHJM= bondbyhjm(HJMT, CouponRate, Settle,Maturity , Period)

PHJM =

  100.7246
  100.0945
  101.5900
  102.0820
 

Price a bond with sinking features without option provision with the following data:

% The data for the interest rate term structure is as follows:
Rates = 0.065;
ValuationDate = '1-Jan-2011';
StartDates = ValuationDate;
EndDates=  '1-Jan-2017';
Compounding = 1;

% Create RateSpec
RateSpec = intenvset('ValuationDate', ValuationDate,'StartDates', StartDates,...
'EndDates', EndDates,'Rates', Rates, 'Compounding', Compounding);

% Instrument
% The bond has a coupon rate of 7%, a period of one year and matures in
% 1-Jan-2017.
% Face decreases $10 after the first year and $10 after the second year.
CouponRate = 0.07;
Settle ='1-Jan-2011';
Maturity = '1-Jan-2017';
Period = 1;
Face = {{'1-Jan-2015' 100;'1-Jan-2016' 90;'1-Jan-2017' 80}};

% The data to build the tree is as follows:
Volatility = [.2; .19; .18; .17];
CurveTerm = [ 1;  2;   3;   4];
MaTree = {'Jan-1-2012'; 'Jan-1-2013'; 'Jan-1-2014'; 'Jan-1-2015'; 'Jan-1-2016'; 'Jan-1-2017'};
HJMTimeSpec = hjmtimespec(ValuationDate, MaTree);
HJMVolSpec = hjmvolspec('Proportional', Volatility, CurveTerm, 1e6);
HJMT = hjmtree(HJMVolSpec,RateSpec,HJMTimeSpec);

Price = bondbyhjm(HJMT, CouponRate, Settle, Maturity, Period, [], [], [], [], [], [], Face)

Price =

  102.3155

% Compare results with price of a vanilla bond
PriceVanilla = bondbyhjm(HJMT, CouponRate, Settle, Maturity,Period) 
PriceVanilla =

  102.4205

See Also

cfamounts | hjmprice | hjmtree | instbond

  


Free Interactive Computational Finance CD

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