analyze_AssetCorr: Function to evaluate several default time series...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/analyze_AssetCorr.R

Description

To give a first insight of several default time series, this function combines multiple estimator functions (intra and inter) and visualize the results.

Usage

1
2
3
analyze_AssetCorr(DTS,N, B=NA, DB=NA, JC=FALSE, CI_Boot=NA, Adjust=0.0001,
type="bca", Intra=c("AMM","FMM","CMM","JDP1","JDP2","MLE","AMLE","Beta","Mode"),
Inter=c("Copula","Cov","JDP","MLE"))

Arguments

DTS

a matrix, containing the default time series of each sector.

N

a matrix, containing the number of obligors at the beginning of the period of sector.

B

an integer, indicating how many bootstrap repetitions should be used for the single bootstrap corrected estimate (intra and inter).

DB

a combined vector, indicating how many bootstrap repetitions should be used for the inner (first entry) and outer loop (second entry) to correct the bias using the double bootstrap (intra and inter).

JC

a logical variable, indicating if the jackknife corrected estimate should be calculated (intra and inter).

CI_Boot

a number, indicating the desired confidence interval if the single bootstrap correction is specified. By default, the interval is calculated as the bootstrap corrected and accelerated confidence interval (Bca). Furthermore, the analytical confidence intervals are provided, using the same value as CI_Boot(intra and inter).

Adjust

a number, which should be added to a observed default rate of 0 or subtracted form a observed default rate of 1 (only for the intraAMLE).

type

a string, indicating the desired method to calculate the bootstrap confidence intervals. For more details see boot.ci. Studendized confidence intervals are not supported.

Intra

a combined string, indicating which intra correlation estimators should be used. All estimators are set as default.

Inter

a combined string, indicating which inter correlation estimators should be used. All estimators are set as default.

Details

To give an first insight, the function provides an overview of the several default time series and estimates using different estimators (intra and inter) simultaneously. The plug-in estimates of the intra correlation using inter correlation methods will be estimated via intraMLE. If DB is specified, the single bootstrap corrected estimate will be calculated by using the bootstrap values of the outer loop.

Value

The returned value is a list, containing the following entries:

Estimators_Intra

Sector

Number of the sector

Sector_Name

Name of the sector

Estimator

Name of the applied estimator

Estimate

Value of the calculated estimate

Type

String, which indicating corrected/non-corrected estimates

correction

Name of the correction method

B

Number of single bootstrap repetitions

DB

Number of the double bootstrap repetitions

CI_Boot

Selected two-sided bootstrap confidence interval

CI

A string, indicating if the corresponding value is the upper or lower bound

Estimators_Inter

Sector_1

Number of the sector

Sector_Name_1

Name of the sector

Sector_2

Number of the sector

Sector_Name_2

Name of the sector

Estimator

Name of the applied estimator to Sector_1 and Sector_2

Estimate

Value of the calculated estimateto Sector_1 and Sector_2

Type

String, which indicating corrected/non-corrected estimates

correction

Name of the correction method

B

Number of single bootstrap repetitions

DB

Number of the double bootstrap repetitions

CI_Boot

Selected two-sided bootstrap confidence interval

CI

A string, indicating if the corresponding value is the upper or lower bound

Author(s)

Kevin Jakob

References

\insertRef

botha2010impliedAssetCorr

\insertRef

chang2015doubleAssetCorr

\insertRef

de2002defaultAssetCorr

\insertRef

dullmann2004systematicAssetCorr

\insertRef

efron1994introductionAssetCorr

\insertRef

frei2017momentAssetCorr

\insertRef

gordy2000comparativeAssetCorr

\insertRef

gordy2010smallAssetCorr

\insertRef

kalkbrener2010validatingAssetCorr

\insertRef

lucas1995defaultAssetCorr

\insertRef

meyer2009estimationAssetCorr

\insertRef

teetor2011rAssetCorr

See Also

intraAMM, intraFMM, intraJDP2, intraMLE, intraJDP1, intraCMM, intraMode,intraBeta, interJDP, interCopula,interCMM, interCov, interMLE, intraALL, interALL

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(mvtnorm)
set.seed(111)
NoO=1000 #Number of obligors in each sector
Years=20
AC=0.3
PD=0.01

Psi=rmvnorm(Years,sigma=matrix(c(1,0.5,0.5,0.5,1,0.5,0.5,0.5,1),3))
PDcond1=pnorm((qnorm(PD)-sqrt(AC)*Psi[,1])/sqrt(1-AC))
PDcond2=pnorm((qnorm(PD)-sqrt(AC/2)*Psi[,2])/sqrt(1-AC/2))
PDcond3=pnorm((qnorm(PD)-sqrt(AC*2)*Psi[,3])/sqrt(1-AC*2))

DTS=cbind(rbinom(Years,NoO,PDcond1),rbinom(Years,NoO,PDcond2),rbinom(Years,NoO,PDcond3))
N=matrix(NoO,nrow = Years,ncol = 3)

Output<-analyze_AssetCorr(DTS,N)

#Bootstrap Correction and CIs

Output<-analyze_AssetCorr(DTS,N,B=100,CI_Boot=0.95)

#Double Bootstrap Correction and Jackknife
Output<-analyze_AssetCorr(DTS,N,DB=c(50,50),JC=TRUE)

AssetCorr documentation built on May 5, 2021, 5:07 p.m.