spotrate() function creates SpotRate objects.

spotrate(x, compounding, daycount, calendar, .copyfrom = NULL)

Arguments

x

a numeric vector representing spot rate values.

compounding

a Compounding object.

daycount

a Daycount object.

calendar

a bizdays calendar.

.copyfrom

a SpotRate object used as reference to copy attributes.

Value

A SpotRate object.

Examples

spotrate(0.06, "continuous", "actual/365", "actual")
#> [1] "0.06 continuous actual/365 actual"
spotrate(c(0.06, 0.07, 0.08), "continuous", "actual/365", "actual")
#> [1] "0.06 continuous actual/365 actual" "0.07 continuous actual/365 actual"
#> [3] "0.08 continuous actual/365 actual"