| Financial Toolbox | ![]() |
www.kxcad.net Home > CAE Software Index > MATLAB Index >
Cash-flow duration and modified duration
[Duration, ModDuration] = cfdur(CashFlow, Yield)
CashFlow | A vector of real numbers. |
Yield | Periodic yield. A scalar. Enter as a decimal fraction. |
[Duration, ModDuration] = cfdur(CashFlow, Yield) calculates the duration and modified duration of a cash flow in periods.
Given a cash flow of nine payments of $2.50 and a final payment $102.50, with a periodic yield of 2.5%
CashFlow=[2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 102.5];
[Duration, ModDuration] = cfdur(CashFlow, 0.025)
Duration =
8.9709 (periods)
ModDuration =
8.7521 (periods)
bndconvp, bndconvy, bnddurp, bnddury, cfconv
| cfdates | cfport | ![]() |
© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments