Module

x/financial/src/financial.ts>mirr

A Zero-dependency TypeScript/JavaScript financial library (based on numpy-financial) for Node.js, Deno and the browser
Latest
function mirr
import { mirr } from "https://dotland.deno.dev/x/financial@v0.1.3/src/financial.ts";

Calculates the Modified Internal Rate of Return.

Parameters

values: number[]
  • Cash flows (must contain at least one positive and one negative value) or nan is returned. The first value is considered a sunk cost at time zero.
financeRate: number
  • Interest rate paid on the cash flows
reinvestRate: number
  • Interest rate received on the cash flows upon reinvestment

Returns

number

Modified internal rate of return