diff options
Diffstat (limited to 'R/cds_functions_generic.R')
| -rw-r--r-- | R/cds_functions_generic.R | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/R/cds_functions_generic.R b/R/cds_functions_generic.R index 0e559304..c0a89633 100644 --- a/R/cds_functions_generic.R +++ b/R/cds_functions_generic.R @@ -55,7 +55,7 @@ setMethod("couponleg", signature("data.frame", "flatcurve"), setMethod("couponleg", signature("data.frame", "defaultcurve"),
## computes the pv of the risky coupon leg based on a given coupon schedule
## and a survival curve. Also called premium leg or fixed leg.
- function(cs, sc, stardate=Sys.Date(), accruedondefault=TRUE){
+ function(cs, sc, startdate=Sys.Date(), accruedondefault=TRUE){
stopifnot(class(startdate)=="Date")
stopifnot(is.logical(accruedondefault))
x1T <- yearFrac(Sys.Date(), sc@dates)
@@ -225,7 +225,7 @@ setMethod("defaultleg", signature("data.frame", "defaultprepaycurve", "numeric") ## Computes the pv of the default leg of a cds based on a given
## coupon schedule, hazard rates curve, prepay curves, and recovery.
function(cs, sc, recovery, startdate=Sys.Date()){
- stopifnot(class(stardate)=="Date")
+ stopifnot(class(startdate)=="Date")
x2T <- yearFrac(startdate, cs$dates)
x1T <- yearFrac(Sys.Date(), sc@dates)
dT <- diff(c(0, x2T))
|
