Documentation Center 
Yield given optionadjusted spread
[MYield, BEMBSYield] = mbsoas2yield(ZeroCurve, OAS, Settle,
Maturity, IssueDate, GrossRate, CouponRate, Delay, Interpolation,
PrepaySpeed, PrepayMatrix)
ZeroCurve  A matrix of three columns:

OAS  Optionadjusted spreads in basis points. 
Settle  Settlement date (scalar only). A serial date number or date string. Date when optionadjusted spread is calculated. Settle must be earlier than Maturity. 
Maturity  Maturity date. Scalar or vector in serial date number or date string format. 
IssueDate  Issue date. A serial date number or date string. 
GrossRate  Gross coupon rate (including fees), in decimal. 
CouponRate  (Optional) Net coupon rate, in decimal. Default = GrossRate. 
Delay  (Optional) Delay (in days) between payment from homeowner and receipt by bondholder. Default = 0 (no delay between payment and receipt). 
Interpolation  Interpolation method. Computes the corresponding spot rates for the bond's cash flow. Available methods are (0) nearest, (1) linear, and (2) cubic spline. Default = 1. See interp1 for more information. 
PrepaySpeed  (Optional) Relation of the conditional payment rate (CPR) to the benchmark model. Default = end of month's CPR. Set PrepaySpeed to [] if you input a customized prepayment matrix. 
PrepayMatrix  (Optional) Customized prepayment matrix. A matrix of size max(TermRemaining)byNMBS. Missing values are padded with NaNs. Each column corresponds to a mortgagebacked security, and each row corresponds to each month after settlement. 
All inputs (except PrepayMatrix) are number of mortgagebacked securities (NMBS) by 1 vectors.
[MYield, BEMBSYield] = mbsoas2yield(ZeroCurve, OAS, Settle, Maturity, IssueDate, GrossRate, CouponRate, Delay, Interpolation, PrepaySpeed, PrepayMatrix) computes the mortgage and bondequivalent yields of a passthrough security.
MYield is the yield to maturity of the mortgagebacked security (the mortgage yield). This yield is compounded monthly (12 times per year). For example:
0.075 (7.5%)
BEMBSYield is the corresponding bond equivalent yield of the mortgagebacked security. This yield is compounded semiannually (two times per year). For example:
0.0761 (7.61%)