Financial Toolbox    
prbyzero

Price bonds in a portfolio by a set of zero curves

Syntax

Arguments

Bonds
Coupon bond information used to compute prices. A number of bonds (NUMBONDS) by 6 matrix where each row describes a bond. The first two columns are required; the rest are optional but must be added in order. All rows in Bonds must have the same number of columns. Columns are [Maturity CouponRate Face Period Basis EndMonthRule] where:

Maturity
Maturity date as a serial date number or date string

CouponRate
Decimal number indicating the annual percentage rate used to determine the coupons payable on a bond

Face
(Optional) Face or par value of the bond. Default = 100.

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

Basis
(Optional) Day-count basis of the bond. 0 = actual/actual (default), 1 = 30/360, 2 = actual/360, 3 = actual/365.

EndMonthRule
(Optional) End-of-month rule. 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.
Settle
Serial date number of the settlement date.
ZeroRates
NUMDATES-by-NUMCURVES matrix of observed zero rates, as decimal fractions. Each column represents a rate curve. Each row represents an observation date.
ZeroDates
NUMDATES-by-1 column of dates for observed zeros

Description

BondPrices = prbyzero(Bonds, Settle, ZeroRates, ZeroDates) computes the bond prices in a portfolio using a set of zero curves.

BondPrices is a NUMBONDS-by-NUMCURVES matrix of clean bond prices. Each column is derived from the corresponding zero curve in ZeroRates.

Examples

This example uses zbtprice to compute a zero curve given a portfolio of coupon bonds and their prices. It then reverses the process, using the zero curve as input to prbyzero to compute the prices.

Set semi-annual compounding for the zero curve, on an actual/365 basis. Derive the zero curve within 50 iterations.

Execute zbtprice

which returns the zero curve at the maturity dates.

Now execute prbyzero

which returns

In this example zbtprice and prbyzero do not exactly reverse each other. Many of the bonds have the end-of-month rule off (EndMonthRule = 0). The rule subtly affects the time factor computation. If you set the rule on (EndMonthRule = 1) everywhere in the Bonds matrix, then prbyzero returns the original prices, except when the two incompatible prices fall on the same maturity date.

See Also

tr2bonds, zbtprice


  portvrisk prdisc