konimarti / daycount

Day count conventions in Go for finance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Day Count Conventions in Golang

License GoDoc goreportcard

Implements different day counting conventions for finance applications.

The following counting conventions are implemented:

  • 30E/360
  • Act/360
  • Act/Act
  • Eurobond
  • Bondbasis

This package implements two public functions Days(date1, date2, convention) and Fraction(date1, date2, date3, convention)

  • Days returns the number of days between two dates (date2 - date1) for the given counting convention
  • Fraction returns the fraction of days between two dates ((date2-date1)/(date3-date1))

About

Day count conventions in Go for finance

License:MIT License


Languages

Language:Go 100.0%