ratederivatives

package
v1.4.505 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

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

func RateFactor

func RateFactor(date time.Time, holidays []time.Time) (int, error)

RateFactor returns the integer a rate is multiplied by in the computation of (compounded) RFRs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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