getPIT: Estimation of credit transition probabilities

Description Usage Arguments Value Author(s) Examples

Description

This function is used to estimate Point-in-Time transition probabilities and counts given historical credit data (a.k.a., credit migration data).

Usage

1
getPIT(data, startDate, endDate, method, snapshots, interval)

Arguments

data

a table containing historical credit ratings data (i.e., credit migration data). A dataframe of size nRecords x 3 where each row contains an ID (column 1), a date (column 2), and a credit rating (column 3); The credit rating is the rating assigned to the corresponding ID on the corresponding date.

startDate

start date of the estimation time window, in string or numeric format. The default start date is the earliest date in 'data'.

endDate

end date of the estimation time window, in string or numeric format. The default end date is the latest date in 'data'. The end date cannot be a date before the start date.

method

estimation algorithm, in string format. Valid values are 'duration' or 'cohort'.

snapshots

integer indicating the number of credit-rating snapshots per year to be considered for the estimation. Valid values are 1, 4, or 12. The default value is 1, i.e., one snapshot per year. This parameter is only used in the 'cohort' algorithm.

interval

the length of the transition interval under consideration, in years. The default value is 1, i.e., 1-year transition probabilities are estimated.

Value

Returns the following objects:

sampleTotals

a list containing the following count components:

totalsVec

A vector of size 1-by-nRatings. For 'duration' calculations, the vector stores the total time spent on rating i. For 'cohort' calculations, the vector stores the initial counts (start vector) in rating i.

totalsMat

A matrix of size nRatings-by-nRatings. For 'duration' calculations, the matrix contains the total transitions observed out of rating i into rating j (all the diagonal elements are zero). For 'cohort' calculations, the matrix contains the total transitions observed from rating i to rating j.

algorithm

A character vector with values 'duration' or 'cohort'.

transMat

Matrix of transition probabilities in percent. The size of the transition matrix is nRatings-by-nRatings.

genMat

Generator Matrix. use only with duration method

Author(s)

Abdoulaye (Ab) N'Diaye

Examples

1
2
3
4
5
6
7
8
## Not run: 
snapshots <- 4     #This uses quarterly snapshots
interval <- .25     #This gives quarterly transition matrix
startDate  <- "2000-01-01"
endDate    <- "2005-01-01"
Example<-getPIT(data,startDate, endDate,'cohort', snapshots, interval)

## End(Not run)

RTransProb documentation built on May 2, 2019, 6:49 a.m.