diff options
| -rw-r--r-- | R/thetas-correct.R | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/R/thetas-correct.R b/R/thetas-correct.R index dbc738d3..f2ac738f 100644 --- a/R/thetas-correct.R +++ b/R/thetas-correct.R @@ -1,4 +1,5 @@ library(dplyr) +library(lazyeval) code.dir <- "~/projects/code/" source(file.path(code.dir, "R", "yieldcurve.R")) @@ -9,7 +10,6 @@ source(file.path(code.dir, "R", "creditIndex.R")) data.src <- src_postgres("serenitasdb", "debian", 5432, "serenitas_user") index.closeprice <- function(index=c("IG", "HY", "EU", "XO"), series) { - require(lazyeval, quietly=T) index <- match.arg(index) index.quotes <- tbl(data.src, "index_quotes") df <- index.quotes %>% filter_(lazyeval::interp(~series == s, s=series)) %>% @@ -34,7 +34,7 @@ get.maturities <- function(index=c("IG", "HY", "EU", "XO"), series) { maturities <- get.maturities("IG", 26) quotes <- index.closeprice("IG", 26) -index <- creditIndex("IG27", "10yr") +index <- creditIndex("IG26", "10yr") sqlstr <- paste("UPDATE index_quotes SET duration2=$1, theta2=$2", "WHERE date=$3 AND index=$4 AND series=$5 AND tenor=$6") |
