xirr

package module
v0.0.0-...-c7224a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 4 Imported by: 0

README

xirr

XIRR calculations on Go

Documentation

Index

Constants

View Source
const (
	RateTypeIrr      = 0
	RateTypeArsagera = 1
)

Variables

This section is empty.

Functions

func YearsBetween

func YearsBetween(start, finish time.Time) float64

Types

type Payment

type Payment struct {
	Date   time.Time
	Amount float64
}

type RateInfo

type RateInfo struct {
	StartDate  time.Time
	FinishDate time.Time
	Years      float64
	Rate       float64
	AnnualRate float64
}

func CalculateRate

func CalculateRate(payments []Payment, rateType int) RateInfo

func XIRR

func XIRR(payments []Payment) RateInfo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL