oasbyhjm

Determine option adjusted spread using Heath-Jarrow-Morton model

Description

example

[OAS,OAD,OAC] = oasbyhjm(HJMTree,Price,CouponRate,Settle,Maturity,OptSpec,Strike,ExerciseDates) calculates option adjusted spread using a Heath-Jarrow-Morton model.

oasbyhjm computes prices of vanilla bonds with embedded options, stepped coupon bonds with embedded options, amortizing bonds with embedded options, and sinking fund bonds with call embedded option. For more information, see More About.

example

[OAS,OAD,OAC] = oasbyhjm(___,Name,Value) adds optional name-value pair arguments.

Examples

collapse all

This example shows how to compute OAS using the Heath-Jarrow-Morton (HJM) model using the following data.

ValuationDate = 'Nov-1-2010';
Rates = [0.0356; 0.0427; 0.0478; 0.0529];
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 VolSpec and TimeSpec
Sigma = 0.02;
VS = hjmvolspec('Constant', Sigma);
TS = hjmtimespec(ValuationDate, EndDates, Compounding);
 
% build the HJM tree
HJMTree = hjmtree(VS, RateSpec, TS);
HJMTreenew = cvtree(HJMTree);
 
% instrument information
CouponRate = 0.05;
Settle = ValuationDate;
Maturity = '01-Nov-2014';
OptSpec = 'call';
Strike = 100;
ExerciseDates ='01-Nov-2011';
Period = 1;
Price = 97.5;

% compute the OAS
OAS = oasbyhjm(HJMTree, Price, CouponRate, Settle, Maturity, OptSpec, Strike,...
ExerciseDates, 'Period', Period)
OAS = 5.0057

This example shows how to compute the OAS for amortizing callable bond using an HJM lattice model.

Create a RateSpec.

Rates = [0.035; 0.042147; 0.047345; 0.052707];
ValuationDate = 'Jan-1-2012';
StartDates = ValuationDate;
EndDates = {'Jan-1-2013'; 'Jan-1-2014'; 'Jan-1-2015'; 'Jan-1-2016'};
Compounding = 1;
RS = intenvset('ValuationDate', ValuationDate, 'StartDates', StartDates,...
'EndDates', EndDates,'Rates', Rates, 'Compounding', Compounding);

Build a HJM tree.

VolSpec = hjmvolspec('Constant', 0.01)
VolSpec = struct with fields:
          FinObj: 'HJMVolSpec'
    FactorModels: {'Constant'}
      FactorArgs: {{1x1 cell}}
      SigmaShift: 0
      NumFactors: 1
       NumBranch: 2
         PBranch: [0.5000 0.5000]
     Fact2Branch: [-1 1]

TimeSpec = hjmtimespec(ValuationDate, EndDates, Compounding)
TimeSpec = struct with fields:
           FinObj: 'HJMTimeSpec'
    ValuationDate: 734869
         Maturity: [4x1 double]
      Compounding: 1
            Basis: 0
     EndMonthRule: 1

HJMTree = hjmtree(VolSpec, RS, TimeSpec)
HJMTree = struct with fields:
      FinObj: 'HJMFwdTree'
     VolSpec: [1x1 struct]
    TimeSpec: [1x1 struct]
    RateSpec: [1x1 struct]
        tObs: [0 1 2 3]
        dObs: [734869 735235 735600 735965]
        TFwd: {[4x1 double]  [3x1 double]  [2x1 double]  [3]}
      CFlowT: {[4x1 double]  [3x1 double]  [2x1 double]  [4]}
     FwdTree: {[4x1 double]  [3x1x2 double]  [2x2x2 double]  [1x4x2 double]}

Define the callable bond.

CouponRate = 0.05;
Settle = 'Jan-1-2012';
Maturity =  'Jan-1-2016';
Period = 1;
    
    Face = { 
                 {'Jan-1-2014'  100; 
                  'Jan-1-2015'   70;
                  'Jan-1-2016'   50};
                 };
 
OptSpec = 'call'; 
Strike = [97 95 93];
ExerciseDates ={'Jan-1-2014' 'Jan-1-2015' 'Jan-1-2016'};

Compute the OAS for a callable amortizing bond using the HJM tree.

Price = 99;
BondType = 'amortizing';
OAS = oasbyhjm(HJMTree, Price, CouponRate, Settle, Maturity,...
OptSpec, Strike, ExerciseDates, 'Period', Period, 'Face', Face,'BondType', BondType)
OAS = -19.1325

Input Arguments

collapse all

Interest-rate tree structure, specified by using hjmtree.

Data Types: struct

Market prices of bonds with embedded options, specified as an NINST-by-1 vector.

Data Types: double

Bond coupon rate, specified as an NINST-by-1 decimal annual rate.

Data Types: double

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 with an embedded option 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

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

Data Types: char | cell

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. Each row is the schedule for one option.

  • 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 is exercised between the underlying bond Settle date and the single listed exercise date.

Data Types: double | char

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: OAS = oasbybk(BDTTree,Price,CouponRate,Settle,Maturity,OptSpec,Strike,ExerciseDates,'Period',4)

Option type, specified as the comma-separated pair consisting of 'AmericanOpt' and NINST-by-1 positive integer flags with values:

  • 0 — European/Bermuda

  • 1 — American

Data Types: double

Coupons per year, specified as the comma-separated pair consisting of 'Period' and a NINST-by-1 vector.

Data Types: double

Day-count basis, specified as the comma-separated pair consisting of 'Basis' and 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

End-of-month rule flag, specified as the comma-separated pair consisting of 'EndMonthRule' and 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 the comma-separated pair consisting of 'IssueDate' and a NINST-by-1 vector using serial date numbers or date character vectors.

Data Types: double | char

Irregular first coupon date, specified as the comma-separated pair consisting of 'FirstCouponDate' and a 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 the comma-separated pair consisting of 'LastCouponDate' and 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

Forward starting date of payments (the date from which a bond cash flow is considered), specified as the comma-separated pair consisting of 'StartDate' and 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 the comma-separated pair consisting of 'Face' and a NINST-by-1 vector or a NINST-by-1 cell array where each element is a NumDates-by-2 cell array where the first column is dates and the second column is associated face value. The date indicates the last day that the face value is valid.

Data Types: double

Type of underlying bond, specified as the comma-separated pair consisting of 'BondType' and a NINST-by-1 cell array of character vectors or string array specifying if the underlying is a vanilla bond, an amortizing bond, or a callable sinking fund bond. The supported types are:

  • 'vanilla' is a standard callable or puttable bond with a scalar Face value and a single coupon or stepped coupons.

  • 'callablesinking' is a bond with a schedule of Face values and a sinking fund call provision with a single or stepped coupons.

  • 'amortizing' is an amortizing callable or puttable bond with a schedule of Face values with single or stepped coupons.

Data Types: char | string

Derivatives pricing options, specified as the comma-separated pair consisting of 'Options' and a structure that is created with derivset.

Data Types: struct

Output Arguments

collapse all

Option adjusted spread, returned as a NINST-by-1 vector.

Option adjusted duration, returned as a NINST-by-1 vector.

Option adjusted convexity, returned as a NINST-by-1 vector.

More About

collapse all

Vanilla Bond with Embedded Option

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. A vanilla bond with an embedded option is where an option contract has an underlying asset of a vanilla bond.

Stepped Coupon Bond with Callable and Puttable Features

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. Stepped coupon bonds can have options features (call and puts).

Sinking Fund Bond with Call Embedded Option

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.

The bond may have a sinking fund call option provision allowing the issuer to retire the sinking fund obligation either by purchasing the bonds to be redeemed from the market or by calling the bond via a sinking fund call, whichever is cheaper. If interest rates are high, then the issuer buys back the requirement amount of bonds from the market since bonds are cheap, but if interest rates are low (bond prices are high), then most likely the issuer is buying the bonds at the call price. Unlike a call feature, however, if a bond has a sinking fund call option provision, it is an obligation, not an option, for the issuer to buy back the increments of the issue as stated. Because of this, a sinking fund bond trades at a lower price than a non-sinking fund bond.

Amortizing Callable or Puttable Bond

Amortizing callable or puttable bonds work under a scheduled Face.

An amortizing callable bond give the issuer the right to call back the bond, but instead of paying the Face amount at maturity, it repays part of the principal along with the coupon payments. An amortizing puttable bond, repays part of the principal along with the coupon payments and gives the bondholder the right to sell the bond back to the issuer.

References

[1] Fabozzi, F. Handbook of Fixed Income Securities. 7th Edition. McGraw-Hill, 2005.

[2] Windas, T. Introduction to Option-Adjusted Spread Analysis. 3rd Edition. Bloomberg Press, 2007.

Introduced in R2011a