BlackCox {CreditRisk}R Documentation

Black and Cox's model


BlackCox calculates the survival probability Q(τ > t) and default intensity for each maturity according to the structural Black and Cox's model.


BlackCox(L, K = L, V0, sigma, r, gamma, t)



debt face value at maturity t = T (it is a constant value).


positive parameter needed to calculate the safety level.


firm value at time t = 0 (it is a constant value).


volatility (constant for all t).


risk-free rate (constant for all t).


interest rate used to discount the safety level Ht (it is a constant value).


a vector of debt maturity structure (it is a numeric vector).


In Merton's model the default event can occurr only at debt maturity T while in Black and Cox's model the default event can occurr even before. In this model the safety level is given by the output Ht. Hitting this barrier is considered as an erlier default. Assuming a debt face value of L at the final maturity that coincides with the safety level in t = T, the safety level in t≤ T is the K, with K≤ L, value discounted at back at time t using the interest rate gamma, obtaining:

H(t | t≤ T) = K * \exp^{- γ * (T- t)}

The output parameter Default.Intensity represents the default intensity of Δ t. The firm's value Vt is calculated as in the Merton function.


This function returns an object of class data.frame containing firm value, safety level H(t) and the survival probability for each maturity. The last column is the default intensity calculated among each interval Δ t.


David Lando (2004) Credit risk modeling.

Damiano Brigo, Massimo Morini, Andrea Pallavicini (2013) Counterparty Credit Risk, Collateral and Funding. With Pricing Cases for All Asset Classes.


mod <- BlackCox(L = 0.55, K = 0.40, V0 = 1, sigma = 0.3, r = 0.05, gamma = 0.04,
t = c(0.50, 1.00, 2.00, 5.00, 7.00, 10.00, 20.00, 30.00))

plot(c(0.50, 1.00, 2.00, 5.00, 7.00, 10.00, 20.00, 30.00), mod$Ht, type = 'b',
     xlab = 'Maturity', ylab = 'Safety Level H(t)', main = 'Safety level for different
     maturities', ylim = c(min(mod$Ht), 1.5), col = 'red')
abline(h = 0.55, col = 'red')
lines(c(0.50, 1.00, 2.00, 5.00, 7.00, 10.00, 20.00, 30.00), mod$Vt, xlab = 'Maturity',
      ylab = 'V(t)', main = 'Value of the Firm \n at time t', type = 's')

plot(c(0.50, 1.00, 2.00, 5.00, 7.00, 10.00, 20.00, 30.00), mod$Survival, type = 'b',
     main = 'Survival Probability for different Maturity \n (Black & Cox model)',
     xlab = 'Maturity', ylab = 'Survival Probability')

matplot(c(0.50, 1.00, 2.00, 5.00, 7.00, 10.00, 20.00, 30.00), mod$Default.Intensity,
        type = 'l', xlab = 'Maturity', ylab = 'Default Intensity')

[Package CreditRisk version 0.1.3 Index]