oasbycir

Determine option adjusted spread using Cox-Ingersoll-Ross model

Syntax

[OAS,OAD,OAC] = oasbycir(CIRTree,Price,CouponRate,Settle,Maturity,OptSpec,Strike,ExerciseDates)
[OAS,OAD,OAC] = oasbycir(___,Name,Value)

Description

example

[OAS,OAD,OAC] = oasbycir(CIRTree,Price,CouponRate,Settle,Maturity,OptSpec,Strike,ExerciseDates) calculates the option adjusted spread from a Cox-Ingersoll-Ross (CIR) interest-rate tree. oasbycir computes the price of an option adjusted spread for bonds with embedded options using a CIR++ model with the Nawalka-Beliaeva (NB) approach.

example

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

Examples

collapse all

Create a RateSpec using the intenvset function.

ValuationDate = 'October-25-2018';
Rates = [0.0355; 0.0382; 0.0427; 0.0489];
StartDates = ValuationDate;
EndDates = datemnth(ValuationDate, 12:12:48)';
Compounding = 1;

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

Create a CIR tree.

NumPeriods = length(EndDates); 
Alpha = 0.03; 
Theta = 0.02;  
Sigma = 0.1;    
Maturity = '01-Jan-2023'; 
CIRTimeSpec = cirtimespec(ValuationDate, Maturity, NumPeriods); 
CIRVolSpec = cirvolspec(Sigma, Alpha, Theta); 

CIRT = cirtree(CIRVolSpec, RateSpec, CIRTimeSpec)
CIRT = struct with fields:
      FinObj: 'CIRFwdTree'
     VolSpec: [1x1 struct]
    TimeSpec: [1x1 struct]
    RateSpec: [1x1 struct]
        tObs: [0 1.0462 2.0924 3.1386]
        dObs: [737358 737740 738122 738504]
     FwdTree: {[1.0373]  [1.0750 1.0443 1.0229]  [1x5 double]  [1x7 double]}
     Connect: {[3x1 double]  [3x3 double]  [3x5 double]}
       Probs: {[3x1 double]  [3x3 double]  [3x5 double]}

Define the OAS instrument.

CouponRate = 0.045;
Settle = ValuationDate;
Maturity = '25-October-2019';
OptSpec = 'call';
Strike = 100;
ExerciseDates = {'25-October-2018','25-October-2019'};
Period = 1;
AmericanOpt = 0;
Price = 97;

Compute the OAS.

[OAS,OAD] = oasbycir(CIRT,Price,CouponRate,Settle,Maturity,OptSpec,Strike,ExerciseDates,'Period',Period,'AmericanOpt',AmericanOpt)
OAS = 416.9457
OAD = 0.9282

Input Arguments

collapse all

Interest-rate tree structure, specified by using cirtree.

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, date character vectors, string arrays, or datetime arrays.

Note

The Settle date for every bond with an embedded option is set to the ValuationDate of the CIR tree. The bond argument Settle is ignored.

Data Types: double | char | string | datetime

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

Data Types: double | char | string | datetime

Definition of option, specified as a NINST-by-1 cell array of character vectors or string arrays with values 'call' or 'put'.

Data Types: char | cell | string

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, date character vectors, string arrays, or datetime arrays 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 | string | datetime

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 = oasbycir(CIRTree,Price,CouponRate,Settle,Maturity,OptSpec,Strike,ExerciseDates,'Period',4)

Option type, specified as the comma-separated pair consisting of 'AmericanOpt' and a 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, date character vectors, string arrays, or datetime arrays.

Data Types: double | char | string | datetime

Irregular first coupon date, specified as the comma-separated pair consisting of 'FirstCouponDate' and a NINST-by-1 vector using serial date numbers date, date character vectors, string arrays, or datetime arrays.

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 | string | datetime

Irregular last coupon date, specified as the comma-separated pair consisting of 'LastCouponDate' and a NINST-by-1 vector using serial date numbers, date character vectors, string arrays, or datetime arrays.

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 | string | datetime

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, date character vectors, string arrays, or datetime array.

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

Data Types: char | double | string | datetime

Face or par value, specified as the comma-separated pair consisting of 'Face' and a NINST-by-1 vector.

Data Types: double

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

Bond with Embedded Options

A bond with embedded option allows the issuer to buy back (callable) or redeem (puttable) the bond at a predetermined price at specified future dates.

Financial Instruments Toolbox™ software supports American, European, and Bermuda callable and puttable bonds. The pricing for a bond with embedded options is as follows:

  • Callable bond — The holder bought a bond and sold a call option to the issuer. For example, if interest rates go down by the time of the call date, the issuer is able to refinance its debt at a cheaper level and can call the bond. The price of a callable bond is:

    Price callable bond = Price Option free bondPrice call option

  • Puttable bond — The holder bought a bond and a put option. For example, if interest rates rise, the future value of coupon payments becomes less valuable. Therefore, the investor can sell the bond back to the issuer and then lend proceeds elsewhere at a higher rate. The price of a puttable bond is:

    Price puttable bond = Price Option free bond + Price put option

References

[1] Cox, J., Ingersoll, J., and S. Ross. "A Theory of the Term Structure of Interest Rates." Econometrica. Vol. 53, 1985.

[2] Brigo, D. and F. Mercurio. Interest Rate Models - Theory and Practice. Springer Finance, 2006.

[3] Hirsa, A. Computational Methods in Finance. CRC Press, 2012.

[4] Nawalka, S., Soto, G., and N. Beliaeva. Dynamic Term Structure Modeling. Wiley, 2007.

[5] Nelson, D. and K. Ramaswamy. "Simple Binomial Processes as Diffusion Approximations in Financial Models." The Review of Financial Studies. Vol 3. 1990, pp. 393–430.

Introduced in R2018a