YIELD Function
calculates yield-to-maturity of a cash-flow stream and returns a scalar
The YIELD function returns a scaler containing yield-to-maturity of a
cash-flow stream based on frequency and value specified.
- times
- is an n-dimensional column vector of times.
Elements should be non-negative.
- flows
- is an n-dimensional column vector of cash-flows.
- freq
- is a scalar which 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 allowed.
- value
- is a scalar which is the discounted present value
of the cash-flows.
The present value relationship can be written as:
where P is the present value of the asset,
{c(k)}k = 1,..K is the
sequence of cash-flows from the asset, tk is the time to the
k-th cash-flow in periods from the present, and
D(t) is the discount function for time t.
With continuous compunding:
-
D(t) = e-y t
With discrete compunding:
-
D(t) = (1+fy)-(t/f)
where f > 0 is the frequency, the reciprocal of the number of
compoundings per unit time period and y is the yield-to-maturity.
The YIELD function solves for y.
Example
proc iml;
timesn=do(1,100,1);
timesn=T(timesn);
flows=repeat(10,100);
freq=0;
do while(freq<50);
freq=freq+.25;
end;
value=682.31027;
yield=yield(timesn,flows,freq,value);
print yield;
quit;
YIELD
0.0100001
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.