diff options
Diffstat (limited to 'R/cds_utils.R')
| -rw-r--r-- | R/cds_utils.R | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/R/cds_utils.R b/R/cds_utils.R index 235e4f88..77e3a86d 100644 --- a/R/cds_utils.R +++ b/R/cds_utils.R @@ -133,8 +133,10 @@ couponSchedule <- function(nextpaydate=NULL, maturity, frequency, coupontype, cu nextIMMDate <- function(date) {
startyear <- as.numeric(format(date, "%Y"))
nextimmdates <- seq(as.Date(paste(startyear, 3, 20, sep="-")), length=5, by="3 months")
- return( adjust(calendar = "UnitedStates/GovernmentBond",
- nextimmdates[nextimmdates >= date][1] ) )
+ val <- adjust(calendar = "UnitedStates/GovernmentBond",
+ nextimmdates[nextimmdates >= date][1] )
+ names(val) <- NULL
+ return( val )
}
cdsMaturity <- function(tenor, date=Sys.Date()){
|
