Description Usage Arguments Value References Examples
This method determines a portfolio's CVA capital charge in accordance with
APS 180, Att. A, para. 17. You supply three sets of arguments to this
function: counterparty (CP) exposures, CP exposure single name hedges and
index CVA hedges. The arguments to this function are vectorised so that each
element of CP exposure and single name hedge arguments relate to one
counterparty (or netting set if a counterparty has more than one netting set)
and each element of the macro CVA hedge arguments relate to one CDS index. If
a vector of length greater than one is supplied for cp_rating
, the
multiple counterparty CVA capital charge is calculated. In this case, if the
cp_hedge_wam
or cva_hedge_weight
arguments are not NULL
,
hedging benefits accrue. The lengths of each of the CP exposures and single
name hedge arguments must be consistent (or zero in case of df = NULL
)
while the index CVA hedge arguments must have the same length (or zero in
case of df = NULL
).
1 2 3 |
cp_rating |
the CP's long term credit rating which are mapped to
weighting factors in accordance with APS 180, Att. A, para. 18. The credit
ratings are defined in APS 120, Att. F, para. 13. with unrated
exposures mapped to credit rating 4. Must be a numeric vector with unrated
exposure ratings set to |
cp_wam |
the weighted average maturity of derivative cash flows with the CP (M). Must be greater than zero. |
cp_ead |
the exposure at default (Exposure^total) which must be no less than 0.0 |
cp_df |
the discount factor (D) which must be no more than 1.0 or
|
cp_hedge_wam |
the maturity of single name CDS cash flows referencing the CPs (M). Must be greater than zero. |
cp_hedge_notional |
notional amount of purchased single name CDS |
cp_hedge_df |
the discount factor (D) which must be no more than
1.0 or |
cva_hedge_rating |
the index CDS counterparty's long term external
credit rating. See |
cva_hedge_wam |
maturity in years of the index CDS |
cva_hedge_notional |
the notional amount of the index CDS |
cva_hedge_df |
the discount factor (D) which must be no more than
1.0 or |
the CVA capital charge for the counterparty or an error if an invalid argument values are supplied.
1 2 3 4 5 6 7 | # Single counterparty
cva_capital(1, 2.3, 1e6, 0.8)
# Multiple counterparties
cva_capital(c(1, 2), c(1, 0.5), c(100, 8000))
# Multiple counterparties with hedges
cva_capital(c(2, 3), c(1, 0.5), c(100, 8000), NULL,
c(1, 0.5), c(50, 1000), NULL, 1, 1, 2000, NULL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.