Previous Topic

Next Topic

oBond3_Yield( ) - Generic Bond Yield Function 3


Resolution - Bond Pricing



Function Definition

oBond3_Yield(CleanPrice, Dates, FaceValue, CouponRate, CouponFreq, CompoundingFreq, BusinessDayCon, YieldMethod, FPYieldMethod, DaysBasis, ExDateConvention, ExDayUnit, CouponType, PPHRounding, AdjEndOfMonth, FinalPeriodStart, HolidaySchedule, OutputFlag)

Calculates the bond yield using a generic bond pricing solution. Returns the bond's yield, dirty price, and accrued interest, as well as the risk statistics.


Bond Types

All bonds. No pricing conventions are assumed.


Function Parameters





Parameter Type






Clean price per one hundred (PPH) of the bond



CleanPrice >= 0



5 dates entered as an array:

Array (of Dates)





SettlementDate: Valuation date of the bond



SetDate < MatDate



DatedDate: Date on which the bond begins to accrue interest.






FirstCpnDate: Date that the first coupon is paid (if bond does not have an odd first period, leave blank)



F.C.D > DatedDate
< P.C.D
F.C.D <



PenultCpnDate: Date that the penultimate coupon is paid (if bond does not have an odd last period, leave blank)



P.C.D > DatedDate
> F.C.D
< MatDate



MaturityDate: Maturity date of the bond






Redemption value for the bond paid at maturity.




FaceValue >= 0



Coupon rate of the bond, expressed as a decimal.



Coupon Rate >= 0



Frequency of coupons per annum.


Enumerated Constant



1 - Annual
2 - Semi-Annual
3 - Quarterly
4 - Monthly


Number of compounding periods per annum, relating to quoted yield.


Enumerated Constant


1- Annual
2 - Semi-Annual
3 - Quarterly
4 - Monthly



Business day convention for coupon payments dates.

see Business Day Conventions


Enumerated Constant


1 - No Adjustment
2 - Previous
3 - Following
4 - Mod Previous
5 - Mod Following
6 - EOM No Adjust
7 - EOM previous
8 - EOM following



Yield convention for all coupon periods except for the final period.


Enumerated Constant


1 - Compound Yield
2 - Money Market
3 - True Yield
4 - Iterative Yield
5 - JGB



Yield convention for the final coupon period.


Enumerated Constant



1 - Compound Yield
2 - MM (Act/360)
3 - MM (Act/365)
4 - MM (Act/Act)
5 - True Yield
6 - Iterative Yield
7 - JGB



Array of two Enumerated Constants

Discount Basis: Basis for determining present and future values of cash flows

Accrual Basis: Basis for determining accrued interest

see Day Count Conventions

If both conventions are identical then just enter a single Enumerated Constant.


Enumerated Constant, or an Array of Enumerated Constants


1 - Act/Act (actual)
2 - Act/Act (bond)
3 - Act/360
4 - Act/365
5 - Act/365 ISDA
6 - Act/365 JGB (NL)
7 - 30/360 ISDA
8 - 30/360 PSA
9 - 30E/360
10 - 30E+/360
11 - Act/365L



Basis for which the ex-dividend method is determined (if applicable). Used in conjunction with ExDayUnit.

see Ex-Dividend Conventions


Enumerated Constant


1 - No Ex-Date
2 - Calendar Days
3 - Business Days
4 - Day of Month
5 - Day of Prev Mth
6 - Months Prior



No. of days in the ex-dividend period (if ExDateConvention = 1, 2, or 3), day of month (if ExDateConvention = 4, 5), or No. months (if ExDateConvention = 6).




ExDayUnit >= 0



Flags whether coupons are 'equal' throughout bond schedule or are 'exact'. exact coupons vary according to number of days in coupon period.


Enumerated Constant


1 - Equal Coupons
2 - Exact Coupons



Array of 3 entries indicating the number of decimal places the following outputs are to be rounded to:

Clean Price
Accrued Interest
Dirty Price

Alternatively, if all 3 follow the same rounding convention then just enter a single number.


Long, or an Array of Longs


PPHRounding >= 0



If coupon falls at end of month, do you wish to adjust all other coupons to fall at end of a month accordingly?


Enumerated Constant


0 - Not Applicable
1 - Yes
2 - No



Determines whether the final period starts on the ex-date of the penultimate coupon (if applicable) or on the actual day of the penultimate coupon.


Enumerated Constant


1 - Ex-Date of P.C
2 - Act Date of P.C



Schedule of non-business days (excluding weekends).

Date Range


Leave blank if not applicable



Indicates which result, or set of results, will be displayed in the worksheet. When returning more than one value, the function must be entered as an array function. Entering a 0 will output: Yield, Clean Price, Accrued Interest, Dirty Price, Macaulay Duration, Modified Duration, Convexity, and Present Value of a Basis Point. Entering a 4 will output: Macaulay Duration, Modified Duration, Convexity, and Present Value of a Basis Point.


Enumerated Constant

0 - All eight outputs
1 - Yield only
2 - Acc Interest only
3 - Dirty Price only
4 - Risk Statistics
5 - Mac Duration
6 - Mod Duration
7 - Convexity only
8 - PVBP only







See Also

Parameter Types

oBond3_Price( ) - Generic Bond Price Function 3

oBond3_CFM( ) - Generic Bond Cash Flow Map Function 3

oBond3_EYield( ) - Generic Bond Equivalent Yield Function 3

Return to website

Copyright 2013 Hedgebook Ltd.