aboutsummaryrefslogtreecommitdiffstats
path: root/R/thetas-durations.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/thetas-durations.R')
-rw-r--r--R/thetas-durations.R4
1 files changed, 2 insertions, 2 deletions
diff --git a/R/thetas-durations.R b/R/thetas-durations.R
index 54e79f8f..b70b1726 100644
--- a/R/thetas-durations.R
+++ b/R/thetas-durations.R
@@ -76,11 +76,11 @@ sqlstr.duration <- paste("UPDATE index_quotes set duration=$1 where date=$2 and
"and series=$4 and tenor=$5")
sqlstr.theta <- paste("UPDATE index_quotes set theta=$1 where date=$2 and index=$3",
"and series=$4 and tenor=$5")
-for(index in c('IG', 'HY')){
+for(index in c('IG', 'HY')) {
recov <- if(index=='IG') 0.4 else 0.3
coupon <- if(index=='IG') 0.01 else 0.05
tenors <- if(index=='IG') c("3yr", "5yr", "7yr", "10yr") else c("3yr", "5yr", "7yr")
- for(series in 18:27){
+ for(series in 18:28) {
indexquotes <- get.indexquotes.table(index, series, tenors)
if(nrow(indexquotes)==0){
next