aboutsummaryrefslogtreecommitdiffstats
path: root/R/cds_utils.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/cds_utils.R')
-rw-r--r--R/cds_utils.R4
1 files changed, 2 insertions, 2 deletions
diff --git a/R/cds_utils.R b/R/cds_utils.R
index ccf7ef52..640981ca 100644
--- a/R/cds_utils.R
+++ b/R/cds_utils.R
@@ -43,7 +43,7 @@ couponSchedule <- function(nextpaydate=NULL, maturity,
## maturity: last payment date of the schedule
## frequency: letter specifying the frequency between "Q", "M", "B", "S" or "A"
## if startdate is provided, we generate the forward coupon schedule starting from that date.
- frequency <- match.arg("frequency")
+ frequency <- match.arg(frequency)
bystring <- switch(frequency,
Quarterly = "3 months",
Monthly = "1 month",
@@ -170,7 +170,7 @@ cdsMaturity <- function(tenor, date=Sys.Date()){
}
yearFrac <- function(date1, date2, daycount=c("act/365", "act/360")) {
- daycount <- match.arch(daycount)
+ daycount <- match.arg(daycount)
switch(daycount,
"act/365"=as.numeric( (as.Date(date2) - as.Date(date1)) / 365),
"act/360"=as.numeric( (as.Date(date2) - as.Date(date1)) / 360) )