diff options
Diffstat (limited to 'R/tranche_functions.R')
| -rw-r--r-- | R/tranche_functions.R | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/R/tranche_functions.R b/R/tranche_functions.R index c9b1ee1..83e7199 100644 --- a/R/tranche_functions.R +++ b/R/tranche_functions.R @@ -707,7 +707,12 @@ theta.adjust.skew <- function(index, shortened=4){ BCtranche.theta <- function(index, tradedate=Sys.Date(), shortened=4){
temp <- BCtranche.pv(index)
- index$rho <- theta.adjust.skew(index, shortened)
+ rho.adj <- theta.adjust.skew(index, shortened)
+ if(any(rho.adj[-c(1, length(rho.adj))]<=0)){
+ print("probable inverted skew: no adjustment")
+ }else{
+ index$rho <- rho.adj
+ }
N <- nrow(index$cs)-shortened
index$cs <- index$cs[1:N,]
index$defaultprob <- index$defaultprob[,1:N]
|
