API Reference finance v#1.7.0

Copy Markdown View Source

Modules

Financial calculations for cash-flow analysis, time value of money, depreciation, and risk.

Fixed income: pricing a bond, solving for its yield, and the standard risk metrics (Macaulay and modified duration, convexity).

Discounting a series of cash flows: net present value (npv/2, xnpv/2) and internal rate of return (irr/1, xirr/2, mirr/3).

Day-count conventions — the fraction of a year between two dates.

Writing an asset down from its cost to its salvage value over its life.

Converting between the different ways an interest rate can be quoted.

Performance and risk metrics.

The root-finding strategy behind the rate functions (Finance.CashFlow.irr/2, Finance.CashFlow.xirr/2, Finance.TVM.rate/6).

A Finance.Solver using Brent's method (zbrent): bracketing with a secant step, inverse-quadratic interpolation, and a bisection safeguard.

The default Finance.Solver: a safeguarded Newton-Raphson (the classic rtsafe).

Time-value-of-money scalars: fv/5, pv/5, pmt/5, nper/5, and rate/6.