ExtGaussian2FParam-class: Two-factor extendible Gaussian calibration parameters

ExtGaussian2FParam-classR Documentation

Two-factor extendible Gaussian calibration parameters

Description

CalibrationParam-class with two parameters for the extendible equi-correlation Gaussian-copula model with Exponential margins*(average) default counting process*.

Usage

## S4 method for signature 'ExtGaussian2FParam'
initialize(.Object, dim, lambda, nu, rho, tau)

## S4 method for signature 'ExtGaussian2FParam'
simulate_dt(object, ..., n_sim = 10000L)

## S4 method for signature 'ExtGaussian2FParam'
probability_distribution(object, times, ...)

## S4 method for signature 'ExtGaussian2FParam'
expected_pcds_equation(
  object,
  times,
  discount_factors,
  recovery_rate,
  coupon,
  upfront,
  ...,
  method = c("default", "prob", "mc")
)

## S4 method for signature 'ExtGaussian2FParam'
expected_cdo_equation(
  object,
  times,
  discount_factors,
  recovery_rate,
  lower,
  upper,
  coupon,
  upfront,
  ...,
  method = c("default", "prob", "mc")
)

## S4 method for signature 'ExtGaussian2FParam'
show(object)

Arguments

.Object

An object: see the “Initialize Methods” section.

dim

Dimension.

lambda

Marginal intensity.

nu

(Internal) dependence parameter.

rho

Bivariate Spearman's Rho.

tau

Bivariate Kendall's Tau.

object

A CalibrationParam-object.

...

arguments to specify properties of the new object, to be passed to initialize().

n_sim

Number of samples.

times

A non-negative numeric vector of timepoints.

discount_factors

Non-negative numeric vector for the discount factors for the timepoints.

recovery_rate

Non-negative number between zero and one for the recovery rate..

coupon

Numeric number for the running coupon.

upfront

Numeric number for the upfront payment.

method

Calculation method (either "default", "prob", or "mc").

lower

Non-negative number between zero and one for the lower attachment point.

upper

Non-negative number between zero and one for the upper attachment point.

Details

The model is defined by the assumption that the multivariate default times τ = (τ_1, …, τ_d) are extendible equi-correlation Gaussian with Exponential margins. The (internal) dependence parameter nu (Pearson correlation) has a one-to-one relationship and can be replaced by Spearman's Rho rho or Kendall' Tau tau. The possible range for rho or tau is from zero to one (boundaries might not be included). The link between the Pearson correlation coefficient and Spearman's Rho and Kendall's Tau is

  • ρ = 2 \sin(ρ_S \cdot π / 6) and ρ_S = 6 / π \cdot \arcsin(ρ/2)

  • ρ = \sin(τ \cdot π / 2) and τ = 2 / π \cdot \arcsin(ρ)

Functions

  • initialize(ExtGaussian2FParam): Constructor

  • simulate_dt(ExtGaussian2FParam): simulates the vector of default times and returns a matrix x with dim(x) == c(n_sim, getDimension(object)).

  • probability_distribution(ExtGaussian2FParam): calculates the probability vector for the average default count process and returns a matrix x with dim(x) == c(getDimension(object)+1L, length(times)).

  • expected_pcds_equation(ExtGaussian2FParam): calculates the payoff equation for a portfolio CDS (vectorized w.r.t. the argumentes recovery_rate, coupon, and upfront).

  • expected_cdo_equation(ExtGaussian2FParam): calculates the payoff equation for a CDO (vectorized w.r.t. the argumentes recovery_rate, coupon, and upfront).

  • show(ExtGaussian2FParam): Display the object.

Slots

lambda

A non-negative number for the marginal rate.

nu

A numeric number for the model specific dependence parameter (Pearson correlation between zero and one, use rho or tau to set dependence parameter).

Simulation

The default times are sampled in a two-stage procedure: First a sample is drawn from the equi-correlation Gaussian copula, see copula::normalCopula and copula::rCopula(); then the results are transformed using stats::qexp().

Probability distribution

The probability of j portfolio items being defaulted at time t is calculated by numeric integration with stats::integrate() using

\mathbb{P}≤ft( L_t = \frac{j}{d} \right) = \int_{-∞}^{∞} \binom{d}{j} G(t; x)^{j} [1 - G(t; x)]^{d-k} φ(x)\mathrm{d}x ,

with

G(x; t) = Φ≤ft( \frac{Φ^{-1}(F(t)) - √{ν}x}{√{1 - ν}} \right)

and F being the Exponential distribution function for rate λ.

Expected CDO tranche loss

The expected loss of a CDO tranche with upper and lower attachment points l and u and recovery rate R is calculated using that

\mathbb{E}[g(L_t)] = (1 - R) ≤ft( C_2≤ft(≤ft[1 - \frac{l}{1-R} \right] \vee 0, F(t); -√{1 - ν}\right) - C_2≤ft(≤ft[1 - \frac{u}{1-R} \right] \vee 0, F(t); -√{1 - ν}\right) \right)

with g(x) = \{[(1 - R) x - l] \vee (u-l)\} \wedge 1, C_2 being the bivariate Gaussian copula, and F being the Exponential distribution function for λ.

Expected portfolio CDS loss

The expected portfolio CDS loss for recovery rate R is calculated using that

\mathbb{E}[g(L_t)] = (1 - R) \cdot F(t)

with g(x) = (1 - R) \cdot x and F being the Exponential distribution function for rate λ.

Examples

ExtGaussian2FParam()
ExtGaussian2FParam(dim = 2L, lambda = 0.05, rho = 0.4)
parm <- ExtGaussian2FParam(5L, 8e-2, rho = 4e-1)
simulate_dt(parm, n_sim = 5L)

parm <- ExtGaussian2FParam(5L, 8e-2, rho = 4e-1)
probability_distribution(parm, 0.3)
probability_distribution(parm, seq(0, 1, by = 0.25))
probability_distribution(parm, seq(0, 1, by = 0.25),
  method = "CalibrationParam", seed = 1623, sim_args(n_sim  = 1e2L))

parm <- ExtGaussian2FParam(75L, 8e-2, rho = 4e-1)
expected_pcds_equation(
  parm, times = seq(25e-2, 5, by = 25e-2), discount_factors = rep(1, 20L), recovery_rate = 0.4,
  coupon = 1e-1, upfront = 0)
expected_pcds_equation(
  parm, times = seq(25e-2, 5, by = 25e-2), discount_factors = rep(1, 20L), recovery_rate = 0.4,
  coupon = 1e-1, upfront = 0, method = "mc", n_sim = 1e1)

parm <- ExtGaussian2FParam(5L, 8e-2, rho = 4e-1)
expected_cdo_equation(
  parm, times = seq(25e-2, 5, by = 25e-2), discount_factors = rep(1, 20L),
  recovery_rate = 0.4, lower = c(0, 0.1, 0.2, 0.35), upper = c(0.1, 0.2, 0.35, 1),
  coupon = c(rep(5e-2, 3L), 0), upfront = c(8e-1, 5e-1, 1e-1, -5e-2))
expected_cdo_equation(
  parm, times = seq(25e-2, 5, by = 25e-2), discount_factors = rep(1, 20L),
  recovery_rate = 0.4, lower = c(0, 0.1, 0.2, 0.35), upper = c(0.1, 0.2, 0.35, 1),
  coupon = c(rep(5e-2, 3L), 0), upfront = c(8e-1, 5e-1, 1e-1, -5e-2),
  method = "prob")
expected_cdo_equation(
  parm, times = seq(25e-2, 5, by = 25e-2), discount_factors = rep(1, 20L),
  recovery_rate = 0.4, lower = c(0, 0.1, 0.2, 0.35), upper = c(0.1, 0.2, 0.35, 1),
  coupon = c(rep(5e-2, 3L), 0), upfront = c(8e-1, 5e-1, 1e-1, -5e-2),
  method = "mc", n_sim = 1e1)


hsloot/cvalr documentation built on Sept. 24, 2022, 9:25 a.m.