Documentation
¶
Overview ¶
Package xirr implements the XIRR function found in spreadsheet applications like LibreOffice Calc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidPayments = errors.New("negative and positive payments are required")
ErrInvalidPayments is returned by Compute calls when both positive and negative payments are not provided.
Functions ¶
func Compute ¶
Compute calculates the internal rate of return of a series of irregular payments.
It tries to identify the rate of return using Newton's method with an initial guess of 0.1. If that does not provide a solution, it attempts with guesses from -0.99 to 0.99 in increments of 0.01 and returns NaN if that fails too.
Types ¶
Click to show internal directories.
Click to hide internal directories.