Implements 30/360, ACT/360, ACT/360 and 30/360E day count conventions.
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"))
The starting date of period for day counts
The ending date of period for day counts
The starting date of reference period for ACT/ACT day counts
The ending date of reference period for ACT/ACT day counts
The frequency of coupon payments: 1 for annual, 2 for semi-annual, 12 for monthly.
The daycount convention
Three variants of the 30/360 convention are implemented, but only one variant of ACT/ACT is currently implemented
The 30/360 day count was converted from C++ code in the QuantLib library