Cash flow convexity
Compute the Convexity of a Cash Flow
This example shows how to return the convexity of a cash flow, 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]; Convex = cfconv(CashFlow, 0.025)
Convex = 90.4493
CashFlow — Cash flow
vector of real numbers
Cash flow, specified as a vector of real numbers.
Yield — Periodic yield
Periodic yield, specified as a scalar decimal.
CFlowConvexity — Convexity
Convexity returned as a scalar.
Introduced before R2006a