| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Financial Toolbox |
| Contents | Index |
| Learn more about Financial Toolbox |
[Duration, ModDuration] = cfdur(CashFlow, Yield)
CashFlow | A vector or matrix of real numbers. When using a matrix, each column of the matrix is a separate CashFlow. |
Yield | Periodic yield. A scalar or vector. 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 | ![]() |
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |