summaryrefslogtreecommitdiffstats
path: root/man/recovdist.Rd
blob: c6da216b81af977ca2a4878885856112fff9eaa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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.
}