import { npv } from "https://dotland.deno.dev/x/financial@v0.1.3/src/financial.ts";
Returns the NPV (Net Present Value) of a cash flow series.
Parameters
- The values of the time series of cash flows. The (fixed) time
interval between cash flow "events" must be the same as that for
which
rate
is given (i.e., ifrate
is per year, then precisely a year is understood to elapse between each cash flow event). By convention, investments or "deposits" are negative, income or "withdrawals" are positive;values
must begin with the initial investment, thusvalues[0]
will typically be negative.