| Financial Toolbox | Search  Help Desk |
| cfdur | Examples See Also |
Cash-flow duration and modified duration.
Syntax
[d, md] = cfdur(cf, yld)
Arguments
cfyldDescription
[d, md] = cfdur(cf, yld)
calculates the duration d and modified duration (volatility) md of a cash flow in periods.
Example
Given a cash flow of nine payments of $2.50 and a final payment $102.50, with a periodic yield of 2.5%:cf=[2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 102.5];
[d, md]=cfdur(cf, 0.025)
d =
8.9709 (periods)
md =
8.7521 (periods)
See Also
bondconv, bonddur, cfconv