H2ExMarkovParam-class: H2-exchangeable Markovian calibration parameter

H2ExMarkovParam-classR Documentation

H2-exchangeable Markovian calibration parameter

Description

CalibrationParam for the H2-exchangeable Markovian (average) default counting process model. Extends H2ExCalibrationParam and related to ExMarkovParam.

Usage

## S4 method for signature 'H2ExMarkovParam'
initialize(.Object, fraction, models)

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

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

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

Arguments

.Object

An object: see the “Initialize Methods” section.

fraction

The proportion associated with the global model, see details.

models

A list with the global and component models (of the type ExMarkovParam-class).

object

A CalibrationParam-object.

...

Pass-through parameters.

n_sim

Number of samples.

times

A non-negative numeric vector of timepoints.

Details

The model is defined by the assumption that the vector of default times is defined as the component-wise minimum of two vectors of the same length. The first vector is simulated from a (scaled) global ExMarkovParam model and the second vector is the (scaled) conjunction of independent ExMarkovParam models. The inverse scaling factors are a convex combination.

Functions

  • initialize(H2ExMarkovParam): Constructor

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

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

  • show(H2ExMarkovParam): Display the object.

Slots

models

A list with the global and component models (of the type ExMarkovParam-class).

fraction

The proportion associated with the global model, see details.

Simulation

The default times are sampled using the stochastic representation described in details.

Probability distribution

The probability of j > i portfolio items being defaulted at time t > s conditioned on i portfolio items being defaulted at time s is

\mathbb{P}(Z_t = j \mid Z_s = i) = ∑_{i + i_0 + i_1 + \cdots + i_J = j} δ_{i}^\top \operatorname{e}^{(t-s) Q^{(1)}} δ_{i_1} \cdot δ_{i_1}^\top \operatorname{e}^{(t-s) Q^{(2)}} δ_{i_2} \cdot \cdots \cdot δ_{i_{J-1}}^\top \operatorname{e}^{(t-s) Q^{(J)}} δ_{i_J} \cdot δ_{i_J}^\top \operatorname{e}^{(t-s) Q^{(0)}} δ_{i_0} ,

where Q^{(i)}, …, Q^{(J)} are the Markovian generator matrices of the partition models and Q^{(0)} is the Markovian generator matrix of the global model.

Examples

H2ExMarkovParam()
composition <- c(2L, 4L, 2L)
d <- sum(composition)
model_global <- ExMarkovParam(rmo::exQMatrix(rmo::AlphaStableBernsteinFunction(0.4), d))
model_partition <- purrr::map(composition, ~{
  ExMarkovParam(rmo::exQMatrix(rmo::AlphaStableBernsteinFunction(0.5), .x))
  })
models <- c(list(model_global), model_partition)
H2ExMarkovParam(fraction = 0.4, models = models)

composition <- c(2L, 4L, 2L)
d <- sum(composition)
model_global <- ExMarkovParam(rmo::exQMatrix(rmo::AlphaStableBernsteinFunction(0.4), d))
model_partition <- purrr::map(composition, ~{
  ExMarkovParam(rmo::exQMatrix(rmo::AlphaStableBernsteinFunction(0.5), .x))
  })
models <- c(list(model_global), model_partition)
parm <- H2ExMarkovParam(fraction = 0.4, models = models)
simulate_dt(parm, n_sim = 5e1)

probability_distribution(ArmageddonH2ExtMO3FParam(
  composition = c(2L, 4L, 2L), lambda = 0.05, rho = c(3e-1, 6e-1)), 0.3)
probability_distribution(AlphaStableH2ExtMO3FParam(
  composition = c(2L, 4L, 2L), lambda = 0.05, rho = c(3e-1, 6e-1)), 0.3)
probability_distribution(PoissonH2ExtMO3FParam(
  composition = c(2L, 4L, 2L), lambda = 0.05, rho = c(3e-1, 6e-1)), 0.3)
probability_distribution(ExponentialH2ExtMO3FParam(
  composition = c(2L, 4L, 2L), lambda = 0.05, rho = c(3e-1, 6e-1)), 0.3)


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