Documentation
¶
Index ¶
- Constants
- Variables
- func NPV(irrValue float64, payments []IPayment, firstPaymentDate *Time, ...) float64
- func NPVDerivative(irrValue float64, payments []IPayment, firstPaymentDate *Time, ...) float64
- func NPVSecondDerivative(irrValue float64, payments []IPayment, firstPaymentDate *Time, ...) float64
- type IPayment
- type Payment
Constants ¶
View Source
const IrrDefaultValue = -0.999999900
View Source
const IrrMinValue = -1.0
Variables ¶
View Source
var BaseDate = Date(1899, 12, 30, 12, 0, 0, 0, UTC)
Functions ¶
Types ¶
type IPayment ¶
type IPayment interface {
//amount of payment
Amount() float64
//date of payment
Date() *Time
//True if current payment is before p
Before(p IPayment) bool
//True if current payment is after p
After(p IPayment) bool
//True if current payment is at the sane date as p
SameDateAs(p IPayment) bool
}
Payment interface
type Payment ¶
type Payment struct {
// contains filtered or unexported fields
}
Basic implementation of Payment interface
func NewPayment ¶
func (*Payment) SameDateAs ¶
Click to show internal directories.
Click to hide internal directories.