YIELDP Function

Returns the yield-to-maturity for a periodic cash flow stream, such as a bond.

Categories:Financial
CAS

Syntax

YIELDP(A, c, n, K, k0, p)

Required Arguments

A

specifies the face value.

Rangeupper A greater-than 0

c

specifies the nominal annual coupon rate, expressed as a fraction.

Range0 less-than-or-equal-to c less-than 1

n

specifies the number of coupons per year.

Rangen greater-than 0 and is an integer

K

specifies the number of remaining coupons from settlement date to maturity.

Rangeupper K greater-than 0 and is an integer

k0

specifies the time from settlement date to the next coupon as a fraction of the annual basis.

Range0 less-than k 0 less-than-or-equal-to StartFraction 1 Over n EndFraction

p

specifies the price with accrued interest.

Rangep greater-than 0

Details

The YIELDP function is based on the following relationship:
The following relationships apply to the preceding equation:
  • t Subscript k Baseline equals n k 0 plus k minus 1
  • c left-parenthesis k right-parenthesis equals StartFraction c Over n EndFraction upper A f o r k equals 1 comma ellipsis comma upper K minus 1
  • c left-parenthesis upper K right-parenthesis equals left-parenthesis 1 plus StartFraction c Over n EndFraction right-parenthesis upper A
The YIELDP function solves for y.

Example

In the following example, the YIELDP function returns the yield-to-maturity of a bond that has a face value of 1000, an annual coupon rate of 0.01, 4 coupons per year, and 14 remaining coupons. The time from settlement date to next coupon date is 0.165, and the price with accrued interest is 800.
data _null_;
   y=yieldp(1000, .01, 4, 14, .165, 800);
   put y;
run;  
SAS writes the following output to the log:
0.0775031248
Last updated: March 16, 2017