summaryrefslogtreecommitdiffstats
path: root/man/recovdist.Rd
diff options
context:
space:
mode:
Diffstat (limited to 'man/recovdist.Rd')
-rw-r--r--man/recovdist.Rd37
1 files changed, 37 insertions, 0 deletions
diff --git a/man/recovdist.Rd b/man/recovdist.Rd
new file mode 100644
index 0000000..c6da216
--- /dev/null
+++ b/man/recovdist.Rd
@@ -0,0 +1,37 @@
+% Generated by roxygen2 (4.1.1): do not edit by hand
+% Please edit documentation in R/distrib.R
+\name{recovdist}
+\alias{recovdist}
+\title{Recovery distribution of a portfolio}
+\usage{
+recovdist(dp, pp, w, S, N)
+}
+\arguments{
+\item{dp}{Numeric, vector of default probabilities}
+
+\item{pp}{Numeric, vector of prepay probabilities}
+
+\item{w}{Numeric, vector of weights}
+
+\item{S}{Numeric, vector of severities}
+
+\item{N}{Integer, number of ticks in the grid}
+}
+\value{
+a Numeric vector of size \code{N} computing the recovery distribution
+}
+\description{
+\code{recovdist} computes the recovery distribution of portfolio
+described by a vector of default probabilities, and prepay probabilities.
+\eqn{R=\sum_{i=1}^n w_i X_i} where \eqn{X_i=0} w.p. \eqn{1-dp_i-pp_i},
+\eqn{X_i=1-S_i} with probability \eqn{dp_i}, and \eqn{X_i=1} w.p. \eqn{pp_i}
+}
+\details{
+It is a recursive algorithm with first-order correction. For a unit of loss
+\eqn{lu}, each non-zero value \eqn{v} is interpolated on the grid
+as the pair of values
+\eqn{\left\lfloor\frac{v}{lu}\right\rfloor} and
+\eqn{\left\lceil\frac{v}{lu}\right\rceil} so that \eqn{X_i} has
+four non zero values.
+}
+