diff options
Diffstat (limited to 'R')
| -rw-r--r-- | R/cds_functions_generic.R | 6 | ||||
| -rw-r--r-- | R/intex_deal_functions.R | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/R/cds_functions_generic.R b/R/cds_functions_generic.R index 08b5f508..336c84eb 100644 --- a/R/cds_functions_generic.R +++ b/R/cds_functions_generic.R @@ -668,9 +668,9 @@ SPmatrix2 <- function(portfolio, dealdata, freq="3 months"){ return(list(DP=DP, PP=PP))
}
-forwardportfolioprice <- function(portfolio, startdate, rollingmaturity, coupontype, margin, recovery){
- forwardcs <- couponSchedule(nextpaydate=startdate+45, maturity=startdate+rollingmaturity,
- frequency="Q", "FLOAT", margin, margin, startdate=startdate)
+forwardportfolioprice <- function(portfolio, startdate, maturity, coupontype, margin, recovery){
+ forwardcs <- couponSchedule(nextpaydate=startdate+45, maturity,
+ frequency="Q", "FLOAT", margin, margin, startdate=startdate)
r <- rep(0, length(portfolio$SC))
for(i in 1:length(portfolio$SC)){
cl <- couponleg(forwardcs, portfolio$SC[[i]]@curve, startdate=startdate)
diff --git a/R/intex_deal_functions.R b/R/intex_deal_functions.R index aaff1bb7..306ebc0e 100644 --- a/R/intex_deal_functions.R +++ b/R/intex_deal_functions.R @@ -64,7 +64,7 @@ dealnamefromcusip <- function(cusips){ cusipsfromdealnames <- function(dealnames){
sqlstring <-
- sprintf("select unnest(\"Deal Cusip List\") from clo_universe where dealname in ('%s')",
+ sprintf("select unnest(\"Deal Cusip List\") from latest_clo_universe where dealname in ('%s')",
paste(dealnames, collapse="','"))
return( dbGetQuery(dbCon, sqlstring)$unnest )
}
@@ -279,7 +279,7 @@ buildSC.portfolio <- function(dealname, dealdata, cusipdata, global.params, star }
return( list(notional=notionalvec, SC=SCvec, beta=betavec, price = pricevec,
cdopercentage = cdonotional/totalnotional,
- stale = missingpricenotional/totalnotional, totalnotional) )
+ stale = missingpricenotional/totalnotional, collatbalance = totalnotional) )
}
cdrfromscenarios <- function(scenarios, dates){
|
