calculates yield-to-maturity of a cash-flow stream and returns a scalar
- YIELD( times,flows,freq,value)
The YIELD function returns a scalar containing yield-to-maturity of a
cash-flow stream based on frequency and value specified.
- is an -dimensional column vector of times.
Elements should be nonnegative.
- is an -dimensional column vector of cash flows.
- is a scalar that represents the base of the rates
to be used for discounting the cash flows.
If positive, it represents discrete compounding
as the reciprocal of the number of compoundings.
If zero, it represents continuous compounding.
No negative values are accepted.
- is a scalar that is the discounted present value
of the cash flows.
The present value relationship can be written as
is the present value of the asset,
sequence of cash flows from the asset,
is the time to the
th cash flow in periods from the present, and
is the discount function for time
With continuous compounding:
With discrete compounding:
is the frequency, the reciprocal of the number of
compoundings per unit time period, and
is the yield-to-maturity.
The YIELD function solves for
For example, the following code produces the output shown:
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.