wilsonfreitas / R-fixedincome

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

as.data.frame.spotrate should return separate columns for spotrate attributes #8

Closed wilsonfreitas closed 2 years ago

wilsonfreitas commented 9 years ago

as.data.frame.spotrate should return separate columns for spotrate attributes. The current implementation returns a data.frame with a single spotrate column. The spotrate class fits into a column. The spotrate class has 4 attributes: rates, compounding, daycount, calendar. The idea is returning a data.frame with 4 columns. compounding, daycount and calendar should be factors and the spotrate object would be created at runtime with its constructor.