diff options
Diffstat (limited to 'R/cds_functions_generic.R')
| -rw-r--r-- | R/cds_functions_generic.R | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/R/cds_functions_generic.R b/R/cds_functions_generic.R index 8ad7e5c7..9f31d226 100644 --- a/R/cds_functions_generic.R +++ b/R/cds_functions_generic.R @@ -161,16 +161,6 @@ setMethod("dcouponleg", signature("data.frame", "shapedcurve", "missing"), ## return( as.numeric(crossprod(dSPadj, cs$coupons * cs$df)) )
## })
-## test.shape <- splinefun(0:5, rep(1,6))
-## eps <- 1e-8
-## test.sc.flat <- new("flatcurve", h=0.07)
-## test.sc <- new("shapedcurve", h=0.07, shape=test.shape, alpha=.25, beta=15)
-## test.scplus <- new("shapedcurve", h=0.07+eps, shape=test.shape, alpha=.25, beta=15)
-## test.scminus <- new("shapedcurve", h=0.07-eps, shape=test.shape, alpha=.25, beta=15)
-
-## (couponleg(cs, test.scplus)-couponleg(cs, test.scminus))/(2 * eps)
-
-
## define cdsduration generic
setGeneric("cdsduration", function(sc, maturity, ...) {
standardGeneric("cdsduration")
@@ -545,6 +535,7 @@ portfoliospread <- function(portfolio, maturity){ S <- S/sum(d)
return(S)
}
+
tweakcurves <- function(portfolio, index){
## computes the tweaking factor
epsilon <- 0
@@ -673,6 +664,3 @@ forwardportfolioprice <- function(portfolio, startdate, rollingmaturity, coupont }
return(mean(r))
}
-
-portfoliospread <- function
-
|
