daycount: Day count and year fraction for bond pricing

Description Usage Arguments Author(s) References

Description

Implements 30/360, ACT/360, ACT/360 and 30/360E day count conventions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
yearFraction(
  d1,
  d2,
  r1,
  r2,
  freq = 2,
  convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E")
)

daycount.actual(d1, d2, variant = c("bond"))

daycount.30.360(d1, d2, variant = c("US", "EU", "IT"))

Arguments

d1

The starting date of period for day counts

d2

The ending date of period for day counts

r1

The starting date of reference period for ACT/ACT day counts

r2

The ending date of reference period for ACT/ACT day counts

freq

The frequency of coupon payments: 1 for annual, 2 for semi-annual, 12 for monthly.

convention

The daycount convention

variant

Three variants of the 30/360 convention are implemented, but only one variant of ACT/ACT is currently implemented

Author(s)

Prof. Jayanth R. Varma jrvarma@iima.ac.in

References

The 30/360 day count was converted from C++ code in the QuantLib library


jrvFinance documentation built on April 18, 2021, 5:06 p.m.