aboutsummaryrefslogtreecommitdiffstats
path: root/R/parse_intex.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/parse_intex.R')
-rw-r--r--R/parse_intex.R18
1 files changed, 0 insertions, 18 deletions
diff --git a/R/parse_intex.R b/R/parse_intex.R
deleted file mode 100644
index b9c52e07..00000000
--- a/R/parse_intex.R
+++ /dev/null
@@ -1,18 +0,0 @@
-root = "//WDSENTINEL/share/CorpCDOs"
-source(file.path(root, "R", "intex_deals_functions.R"))
-source(file.path(root, "R", "etdb.R"))
-dealnames <- c("limes", "stonln1")
-cusips <- cusipsfromdealnames(dealnames)
-
-deals.universe <- dbGetQuery(dbCon, "select distinct dealname from clo_universe order by dealname asc")$dealname
-cusips.universe <- cusipsfromdealnames(deals.universe)
-n.scenarios <- 100
-offset <- 2
-r <- data.frame()
-for(cusip in cusips){
- data <- read.table(paste(cusip, "-PY.txt", sep=""), sep="\t", header=T, nrow=3)
- price <- sum(as.numeric(sub("\\((.*)\\)", "-\\1", data[1,1:n.scenarios+offset])), na.rm=T)/n.scenarios
- wal <- sum(as.numeric(sub("\\((.*)\\)", "-\\1", data[2,1:n.scenarios+offset])), na.rm=T)/n.scenarios
- duration <- sum(as.numeric(sub("\\((.*)\\)", "-\\1", data[3,1:n.scenarios+offset])), na.rm=T)/n.scenarios
- r <- rbind(r, data.frame(cusip, price, wal, duration))
-}