pd: Probability of Default

Description Usage Arguments Details Value Examples

Description

Calculates the probability of default for various arrears buckets

Usage

1
2
pd(data = df, default_definition, loss_id_period = 12,
  segmenter_level = 1, var1, var2)

Arguments

data

a monthly loan performance level data frame in standard data dictionary format

default_definition

default definition (in months past due) applicable to the loan portfolio. The pd for all arrears buckets smaller than this will be calculated. I.e. if you only want the PD for the 0 in arrears bucket then make this 1.

loss_id_period

The number of months to look ahead when calculating the PD.

segmenter_level

1, 2 or 3. Default = 1. When 1 then no segmentation will be done when doing vintage analysis. If 2, then segmentation will be done by to the variable entered as var1. If 3, then segmentation will be done by var1 and var2. It is very important to enter the correct value here.

var1

the main variable to segment the vintage analysis by. Must be provided as "string" and must be a categorical variable. See Note below.

var2

if a second level of segmentation is required, this is the second level.

Details

pd

Value

A data frame containing the PD plus the total sum of balance for the total as well as defaulters. This is done by arrears bucket, pointintime_month, and the variables specified in var1 and var2.

Examples

1
2
3
df_pd <- pd(df, 4, 12, 2, "fico_bin")
# 12 month PD's for 0 in arrears only. no segmentation:
df_pd <- pd(df, 1, 12, 1)

TheProfitTable/loanportr documentation built on May 28, 2019, 3:17 p.m.