aboutsummaryrefslogtreecommitdiffstats
path: root/R/mlpdb.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/mlpdb.R')
-rw-r--r--R/mlpdb.R3
1 files changed, 2 insertions, 1 deletions
diff --git a/R/mlpdb.R b/R/mlpdb.R
index 2c8eadba..08a0721d 100644
--- a/R/mlpdb.R
+++ b/R/mlpdb.R
@@ -51,7 +51,8 @@ indexsplit <- function(indexname){
get.tranchequotes <- function(indexname, tenor='5yr', date=Sys.Date()){
sqlstr <- paste("select * from tranche_quotes where index='%s'",
- "and series=%s and quotedate='%s' and tenor = '%s' order by attach asc")
+ "and series=%s and quotedate='%s' and tenor = '%s'",
+ "and quotesource='MKIT' order by attach asc")
temp <- indexsplit(indexname)
r <- dbGetQuery(mlpdbCon, sprintf(sqlstr, temp$index, temp$series, date, tenor))
return( r )