wilsonfreitas / R-fixedincome

Fixed income tools for R
http://wilsonfreitas.github.io/R-fixedincome/
Other
51 stars 25 forks source link

Create spotratecurve passing numeric values #3

Closed wilsonfreitas closed 2 years ago

wilsonfreitas commented 10 years ago

To create a spotratecurve we need to instantiate a spotrate object and pass it as an argument to the spotratecurve constructor.

rates <- as.spotrate(value, compounding, daycount, calendar)
as.spotratecurve(terms, rates, refdate=date,
        interp=interp, name=ticker)

It might be useful to have another spotratecurve constructor accepting numeric values instead of a spotrate object. Something like:

as.spotratecurve(terms, value, compounding, daycount, calendar, refdate=date, interp=interp, name=ticker)