Documentation ¶
Index ¶
- func CompoundedRate(rates []float64, dateInit, dateFinal time.Time, holidays []time.Time, ...) (float64, error)
- func CompoundedRateSimple(rates []float64, dateInit, dateFinal time.Time, daysPerYear int, rounding int) (float64, error)
- func RateFactor(date time.Time, holidays []time.Time) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompoundedRate ¶
func CompoundedRate(rates []float64, dateInit, dateFinal time.Time, holidays []time.Time, daysPerYear int, rounding int) (float64, error)
CompoundedRate returns the compounded index for the rate values given by the slice @rate. @rates is a slice with daily rates for all business days in the respective period. @dateInit, @dateFinal determine the period of the loan. @holidays is a slice of strings where each entry corresponds to a special holiday (i.e. not a
saturday or sunday) in the respective period.
@daysPerYear determines the total number of days per business year. @rounding is a float of type 1e-n which rounds the result to n digits. If @rounding == 0 no rounding
func CompoundedRateSimple ¶
func CompoundedRateSimple(rates []float64, dateInit, dateFinal time.Time, daysPerYear int, rounding int) (float64, error)
CompoundedRateSimple returns the compounded index for the rate values given by the slice @rate. @rates is a slice with daily rates for all calendar days in the respective period. @dateInit, @dateFinal determine the period of the loan. @daysPerYear determines the total number of days per business year. @rounding is a float of type 1e-n which rounds the result to n digits. If @rounding == 0 no rounding
Types ¶
This section is empty.