aboutsummaryrefslogtreecommitdiffstats
path: root/R/tests/test.cds_functions.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/tests/test.cds_functions.R')
-rw-r--r--R/tests/test.cds_functions.R6
1 files changed, 4 insertions, 2 deletions
diff --git a/R/tests/test.cds_functions.R b/R/tests/test.cds_functions.R
index c30651ba..1d17ae21 100644
--- a/R/tests/test.cds_functions.R
+++ b/R/tests/test.cds_functions.R
@@ -1,9 +1,11 @@
library("RUnit")
-root = "//WDSENTINEL/share/CorpCDOs/R"
+root <- "/home/share/CorpCDOs/code/R"
source(file.path(root, "yieldCurve.R"))
-source(file.path(root, "cds_functions.R"))
+source(file.path(root, "cds_functions_generic.R"), chdir = T)
#unit tests
+trade_date <- as.Date("2012-09-28")
+exportYC(trade_date)
cs <- couponSchedule(as.Date("2012-09-28"), as.Date("2016-04-22"),"Q", "FLOAT", 0.075,0.0703)
#test that the curve version gives the same result as the flat version for flat curves
h <- rep(0.05, nrow(cs))