dcf | R Documentation |
Day Count Fraction - difference in days divided by days per year
Implemented according to 2006 ISDA Definitions.
dcf(
date_from = Sys.Date(),
date_to = Sys.Date(),
convention = "ACT/365",
silent = FALSE
)
date_from |
Start date (or a vector of dates) |
date_to |
End date (or a vector of dates) |
convention |
Interest rate convention; default is "ACT/365". |
silent |
Should warning messages be suppressed? Default is no. |
Currently implemented conventions are:
Actual / 365 (Fixed) - ISDA Definitions 4.16 (d)
Actual / 360 - ISDA Definitions 4.16 (e)
Bond Basis - ISDA Definitions 4.16 (f)
Eurobond Basis - ISDA Definitions 4.16 (g)
A fraction of year
dcf(as.Date("2019-01-01"), as.Date("2019-01-31"), convention = "30/360")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.