calibrate.sbtv {CreditRisk} | R Documentation |
Compares CDS rates quoted on the market with theoric CDS rates calculeted by the function
cds
and looks for the parameters to be used into sbtv
for returning the default intensities corresponding to real market CDS rates performing the
minimization of the objective function.
calibrate.sbtv(V0, p, cdsrate, r, t, ...)
V0 |
firm value at time |
p |
vector of the probability of different scenario (sum of p must be 1). |
cdsrate |
CDS rates from market. |
r |
a vector of risk-free rate. |
t |
a vector of debt maturity structure. |
... |
additional parameters used in |
Inside calibrate.sbtv
, the function objfn
takes the input a
vector of parameters and returns the mean error occurred estimating CDS rates with
cds
function. The inputs used in cds
are the default intensities calculated by
the sbtv
function with the calibrated parameters. In particular the error is
calculated as:
\frac{1}{n}∑_{i=1}^n (c^{ds}-c^{ds}_{mkt})^2.
This quantity is a function of the default intensities and it is the objective function to be minimized in order to take optimal solutions for intensities.
This function returns an object of class list
with calculated parameters of
sbtv
model and the error occurred in the minimization procedure.
Damiano Brigo, Massimo Morini, Andrea Pallavicini (2013) Counterparty Credit Risk, Collateral and Funding. With Pricing Cases for All Asset Classes
calibrate.sbtv(V0 = 1, p = c(0.95, 0.05), cdsrate = cdsdata$Par.spread, r = cdsdata$ED.Zero.Curve, t = cdsdata$Maturity)