Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

optbndbyhjm

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

Syntax

[Price,PriceTree] = optbndbyhjm(HJMTree,OptSpec,Strike,ExerciseDates,AmericanOpt,CouponRate,Settle,Maturity)
[Price,PriceTree] = optbndbyhjm(___,Period,Basis,EndMonthRule,IssueDate,FirstCouponDate,LastCouponDate,StartDate,Face,Options)

Description

example

[Price,PriceTree] = optbndbyhjm(HJMTree,OptSpec,Strike,ExerciseDates,AmericanOpt,CouponRate,Settle,Maturity) calculates the price for a bond option from a Black-Karasinski interest-rate tree.

Examples

collapse all

Using the HJM forward-rate tree in the deriv.mat file, price a European call and put option on a 4% bond with a strike of 96. The exercise date for the option is Jan. 01, 2003. The settle date for the bond is Jan. 01, 2000, and the maturity date is Jan. 01, 2004.

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; 

Use optbndbyhjm to compute the price of the 'call' option.

[Price,PriceTree] = optbndbyhjm(HJMTree,'Call',96,'01-Jan-2003',...
0,0.04,'01-Jan-2000','01-Jan-2004')
Warning: Not all cash flows are aligned with the tree. Result will be approximated. 
> In optbndbyhjm (line 217) 

Price =

    2.2410


PriceTree = 

  struct with fields:

    FinObj: 'HJMPriceTree'
      tObs: [0 1 2 3 4]
     PBush: {[2.2410]  [1×1×2 double]  [1×2×2 double]  [1×4×2 double]  [0 0 0 0 0 0 0 0]}

Now use optbndbyhjm to compute the price of a 'put' option on the same bond.

[Price,PriceTree] = optbndbyhjm(HJMTree,'Put',96,'01-Jan-2003',...
0,0.04,'01-Jan-2000','01-Jan-2004')
Warning: Not all cash flows are aligned with the tree. Result will be approximated. 
> In optbndbyhjm (line 217) 

Price =

    0.0446


PriceTree = 

  struct with fields:

    FinObj: 'HJMPriceTree'
      tObs: [0 1 2 3 4]
     PBush: {[0.0446]  [1×1×2 double]  [1×2×2 double]  [1×4×2 double]  [0 0 0 0 0 0 0 0]}

Input Arguments

collapse all

Interest-rate tree structure, specified by using hjmtree.

Data Types: struct

Definition of option, specified as a NINST-by-1 cell array of character vectors.

Data Types: char

Option strike price value, specified as a NINST-by-1 or NINST-by-NSTRIKES depending on the type of option:

  • European option — NINST-by-1 vector of strike price values.

  • Bermuda option — NINST by number of strikes (NSTRIKES) matrix of strike price values. Each row is the schedule for one option. If an option has fewer than NSTRIKES exercise opportunities, the end of the row is padded with NaNs.

  • American option — NINST-by-1 vector of strike price values for each option.

Data Types: double

Option exercise dates, specified as a NINST-by-1, NINST-by-2, or NINST-by-NSTRIKES using serial date numbers or date character vectors, depending on the type of option:

  • For a European option, use a NINST-by-1 vector of dates. For a European option, there is only one ExerciseDates on the option expiry date.

  • For a Bermuda option, use a NINST-by-NSTRIKES vector of dates.

  • For an American option, use a NINST-by-2 vector of exercise date boundaries. The option can be exercised on any date between or including the pair of dates on that row. If only one non-NaN date is listed, or if ExerciseDates is a NINST-by-1 vector, the option can be exercised between ValuationDate of the stock tree and the single listed ExerciseDates.

Data Types: double | char

(Optional) Option type, specified as NINST-by-1 positive integer flags with values:

  • 0 — European/Bermuda

  • 1 — American

Data Types: double

Bond coupon rate, specified as an NINST-by-1 decimal annual rate or NINST-by-1 cell array, where each element is a NumDates-by-2 cell array. The first column of the NumDates-by-2 cell array is dates and the second column is associated rates. The date indicates the last day that the coupon rate is valid.

Data Types: double | cell

Settlement date for the bond option, specified as a NINST-by-1 vector of serial date numbers or date character vectors.

Note

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

Data Types: double | char

Maturity date, specified as an NINST-by-1 vector of serial date numbers or date character vectors.

Data Types: double | char

(Optional) Coupons per year, specified as an NINST-by-1 vector.

Data Types: double

(Optional) Day-count basis, specified as a NINST-by-1 vector of integers.

  • 0 = actual/actual

  • 1 = 30/360 (SIA)

  • 2 = actual/360

  • 3 = actual/365

  • 4 = 30/360 (PSA)

  • 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/365 (ISDA)

  • 13 = BUS/252

For more information, see basis.

Data Types: double

(Optional) End-of-month rule flag is specified as a nonnegative integer using a NINST-by-1 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 coupon payment date is always the same numerical day of the month.

  • 1 = Set rule on, meaning that a bond coupon payment date is always the last actual day of the month.

Data Types: double

Bond issue date, specified as an NINST-by-1 vector using serial date numbers or date character vectors.

Data Types: double | char

Irregular first coupon date, specified as an NINST-by-1 vector using serial date numbers date or date character vectors.

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.

Data Types: double | char

Irregular last coupon date, specified as a NINST-by-1 vector using serial date numbers or date character vectors.

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.

Data Types: char | double

(Optional) Forward starting date of payments (the date from which a bond cash flow is considered), specified as a NINST-by-1 vector using serial date numbers or date character vectors.

If you do not specify StartDate, the effective start date is the Settle date.

Data Types: char | double

Face or par value, specified as anNINST-by-1 vector.

Data Types: double

(Optional) Derivatives pricing options, specified as structure that is created with derivset.

Data Types: struct

Output Arguments

collapse all

Expected price of the bond option at time 0, returned as a NINST-by-1 matrix.

Structure containing trees of vectors of instrument prices and accrued interest, and a vector of observation times for each node. Values are:

  • PriceTree.PBush contains the clean prices.

  • PriceTree.tObs contains the observation times.

Introduced before R2006a

Was this topic helpful?