diff options
Diffstat (limited to 'R/thetas-correct.R')
| -rw-r--r-- | R/thetas-correct.R | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/R/thetas-correct.R b/R/thetas-correct.R index f2ac738f..03314340 100644 --- a/R/thetas-correct.R +++ b/R/thetas-correct.R @@ -1,5 +1,7 @@ library(dplyr) library(lazyeval) +library(logging) +basicConfig() code.dir <- "~/projects/code/" source(file.path(code.dir, "R", "yieldcurve.R")) @@ -38,7 +40,7 @@ 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") -for(i in seq_along(quotes$date)) { +for(i in seq_along(quotes$date %>% unique())) { tradedate <- quotes$date[i] exportYC(tradedate, "USD") index <- set.index.desc(index, tradedate) |
