2020-01-22 15:43:54 +03:00
2020-01-16 16:04:08 +03:00
2020-01-17 13:27:01 +03:00
2020-01-16 16:10:19 +03:00
2020-01-16 16:04:08 +03:00
2020-01-17 14:29:13 +03:00
2020-01-17 13:14:42 +03:00
2020-01-21 12:50:47 +03:00

goxirr

GoDoc

Goxirr is a simple implementation of a function for calculating the Internal Rate of Return for irregular cash flow (XIRR).

Example

import "time"

import "github.com/maksim77/goxirr"

firstDate := time.Date(2019, time.January, 1, 0, 0, 0, 0, time.UTC)
t1 := goxirr.Transaction{
	Date: firstDate,
	Cash: -100,
}
t2 := goxirr.Transaction{
    Date: firstDate.Add(time.Hour * 24 * 365),
    Cash: 112,
}

tas := goxirr.Transactions{t1, t2}
fmt.Println(goxirr.Xirr(tas))
Description
Goxirr is a simple implementation of a function for calculating the Internal Rate of Return for irregular cash flow (XIRR).
Readme GPL-3.0 54 KiB
Languages
Go 100%