aboutsummaryrefslogtreecommitdiffstats
path: root/R/load_cds_data.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/load_cds_data.R')
-rw-r--r--R/load_cds_data.R10
1 files changed, 5 insertions, 5 deletions
diff --git a/R/load_cds_data.R b/R/load_cds_data.R
index 7c9590ff..63e74835 100644
--- a/R/load_cds_data.R
+++ b/R/load_cds_data.R
@@ -1,8 +1,8 @@
library(Rbbg)
-source("mlpdb.R")
+source("serenitasdb.R")
download.cdscurves <- function(date=Sys.Date()){
- tickers <- dbGetQuery(mlpdbCon, "select cds_curve[6] from CDS_Issuers")$cds_curve
+ tickers <- dbGetQuery(serenitasdb, "select cds_curve[6] from CDS_Issuers")$cds_curve
bbg.data <- bds(bbgConn, paste(tickers, "Curncy"), "cds_curve_info")
stmt <- "INSERT INTO cds_quotes VALUES('%s', '%s', 0, 0, %s, %s, %s, %s)"
for(i in 1:nrow(bbg.data)){
@@ -12,9 +12,9 @@ download.cdscurves <- function(date=Sys.Date()){
}else{
Source <- paste0("'", Source, "'")
}
- dbSendQuery(mlpdbCon, sprintf(stmt, format(date,"%m/%d/%y"),
- bbg.data[i,2], bbg.data[i,4], bbg.data[i,5],
- Source, bbg.data[i,6]))
+ dbSendQuery(serenitasdb, sprintf(stmt, format(date,"%m/%d/%y"),
+ bbg.data[i,2], bbg.data[i,4], bbg.data[i,5],
+ Source, bbg.data[i,6]))
}
}