diff options
Diffstat (limited to 'R')
| -rw-r--r-- | R/cds_utils.R | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/R/cds_utils.R b/R/cds_utils.R index fb1fb296..09dee081 100644 --- a/R/cds_utils.R +++ b/R/cds_utils.R @@ -117,9 +117,7 @@ IMMDate <- function(tradedate, type="next") { ## matches with Bloomberg calculator
start.protection <- tradedate + 1
startyear <- as.numeric(format(start.protection, "%Y"))
- if(as.numeric(format(tradedate, "%m")) <= 3){
- startyear <- startyear - 1
- }
+ startyear <- startyear - 1
nextimmdates <- seq(as.Date(paste(startyear, 3, 20, sep="-")), length=7, by="3 months")
if(type == "next"){
val <- adjust(calendar = "UnitedStates/GovernmentBond",
|
