diff options
Diffstat (limited to 'R/cds_utils.R')
| -rw-r--r-- | R/cds_utils.R | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/R/cds_utils.R b/R/cds_utils.R index e594ad7c..ec1197bc 100644 --- a/R/cds_utils.R +++ b/R/cds_utils.R @@ -145,11 +145,3 @@ yearFrac <- function(date1, date2, daycount="act/365") { "act/365"=as.numeric( (as.Date(date2) - as.Date(date1)) / 365),
"act/360"=as.numeric( (as.Date(date2) - as.Date(date1)) / 360) )
}
-
-load.index <- function(index.name, file = "index_definitions.yml"){
- ## load index.name into the parent environment
- require(yaml)
- indices <- yaml.load_file(file.path(root.dir, "code", "R", file))
- indices[[index.name]]$maturity <- as.Date(indices[[index.name]]$maturity, as.Date("1970-01-01"))
- assign(index.name, indices[[index.name]], env = parent.env(environment()))
-}
|
