Simple Derivatives CVA Calculation Example (credit valuation adjustment) excel

Here we show simplest method called current net exposure

for more elaborated Monte-Carlo method using python see CVA with monte carlo calculation

for online interest rate swaps and OTC derivatives valuation with CVA see Derivatives accounting calculators

CVA calculation online with current net exposure method online

derivatives CVA calculation example:

lets say we have derivatives portfolio with the same counterparty which consist of 2 amortizing swaps
one approximate method for would be to calculate Net exposure at valuation time

lets say swap1 worth today 2M$
swap2 worth -1M$

if there’s a netting agreement then total today’s exposure is (1-R)*(2M-1M) = (1-R)*1M $
R is recovery normally supposed to be at 40%

then CVA would be price to hedge this exposure with CDS (fixed leg of CDS)

lets say counterparty Credit Defualt Swap spread is flat 300 pb (3%)

then the cost of this hedge would be approximately

CVA=3% * (maturity in years) * (1-R) *1M $

if we want to improve the quality of this approximation we could take average exposure of swaps until maturity (at maturity exposure to swap is 0) which equals exposure today /2

so final formula would be

CVA=0.5*3% * (maturity in years) * (1-R) *1M $

in case that two swaps have different maturity then we would have to weight the exposure by maturity factor of each instrument

if total exposure is negative with this method CVA=0 and we would have to take own CDS spread to calculate DVA (debit valuation adjustment)

example cva calculation in Excel (you can edit cells)

FAS 157 require derivatives CVA to be calculated for fair value of derivatives, as well as basel 3 for banks

Derivatives CVA calculation example excel

to calculate value of annuity properly we can use quantlib addin from http://quantlib.org/quantlibxl/

1) first install quantlib addin at http://quantlib.org/quantlibxl/ -> download
2) open file at QuantLibXL\xll\QuantLibXL-vc90-mt-s-1_2_0.xll
3) open spreadsheet ctrl-alt-f9 to recalculate all

Here we calculate simplified derivatives CVA/DVA for a portfolio of 3 OTC derivatives with the same counterparty
if net current exposure is negative then we’ll have only DVA and we’ll use institution’s own CDS spread, else we’ll have only CVA and we’ll need to apply counterparty CDS spreads (both found on bloomberg or reuters terminals).

In this example we use sample flat curve for discounting. For proper use we’ll need to paste real curve for desired valuation date (also found on bloomberg or reuters)
the standard recovery of 40% is used.

to calculate annuity we’ll calculate swap value with 0 floating leg using quantlib addin functions for swap.

download excel:

cva calculation excel

cva calculation excel

references:
Stein_H_FeSeminar_Sp12.pdf
investopedia

credit value adjustement

credit value adjustement

Posted in OTC derivatives valuation Tagged with: , , ,

what is an OAS spread for bond

Option Adjusted spread (OAS) is usually calculated for bonds with embedded options (call or put)
OAS is a constant spread over discounting curve you have to apply to back up market price of the bond
this spread is adjusted to embedded options

example
company A senior bond with embedded call feature is worth today 101$
if OAS spread is 5% it means that if you want to calculate senior bond of the same company A , which does not have this optionality you would have to shift the discounting curve up 5% (constant spread) to get market price of this simple bond

OAS spread could be used as CDS spread on this company A , if no other CDS quotes are available

Posted in OTC derivatives valuation

call option 101

what is a call option?

it’s an option which give right (=option) to buyer to buy a stock at fixed price called strike

example of call option

company A buys a european call option on Microsoft stock with strike 10 and maturity 1 jan 2015

it means that if on 1/jan/2015 MSFT costs 12$ A would buy from B MSFT stocks at 10$ each . making profit of 2$/option

if MSFT costs less than 10$ ,then A would not buy the stock and let the option expire

Payoff

Black-Scholes Valuation

european option (exercicable only on maturity date) can be valued with Black-Scholes formula

Black-Scholes formula explanation

payoff could be written as $$ (S-K)^+ $$ ‘+’ means that if expression inside is negative we take it as 0
formula de Black-Scholes tells us that call’s price is an approximation to payoff formula as equals
$$ Call= S Proba1 – DiscountFactor K Proba2 $$
where Proba2 is a probability that S> K at time T and Proba1 is the same , but “in another probability measure” (whoch makes a small difference between Proba1 y Proba2)

Posted in OTC derivatives valuation

financial derivatives 101

what are the financial derivatives?

basically it’s a contract which price is based on price of another financial asset

example of a derivative

company A buys a derivative form bank B by which
B will pay 1 million euros if Ibex 35 index is bigger than 20000 points in one year’s time (this on is called digital call option)

Types of derivatives

there’re derivatives which can be bought in organized markets , like stock exchanges , and there are other type which are negotiated in private
OTC derivatives (over the counter)

also, derivatives could be classified by underlying security:

interest rate derivatives

example: dirivatives whose payout depends on level of Euribor , for example swaps

FX derivatives

example: payout depens on EURUSD exchange rate

Equity derivatives

example: payout depends on Santander stock price

credit derivatives

example: A pays B 1 million if company C goes broke

commodity derivatives

A pays B difference between precio del crudo Brent crude price and Ural crude price

another way to classify them is by exercise type:

american exercise

option can be exercised at any date before maturity

european exercise

option can be executed only at maturity

bermudan exercise

option can be executed at various time points

derivatives markets

OTC derivatives market is huge: total outstanding notion at the end of 2011 was 10 time bigger than world GDP (700 trillion $)

Posted in OTC derivatives valuation Tagged with:

quanto adjustment formula example

what is a quanto adjustment?

it’s an adjustment to forward price of underlying if payoff’s currency is diferent from underlying’s currency

example

if payoff currency is EUREUR and underlying is in USD (for example DowJones index)
then we’ll need to adjust dividend yield of Dow jones by this quanto adjustment formula:
FX=EURUSD   (numeraire USD)
S= DJ index (USD)
$$ q=q-\rho \sigma_{FX} \sigma_{S}$$
$$\rho$$ is a correlation between EURUSD and and Dow Jones
Posted in OTC derivatives valuation Tagged with:

how to value Eonia swap

what is an EONIA swap (call money swap)?

it’s a swap where we exchange fixed rate for variable rate calculated with dayly EONIA rate (Euro OverNight Index Average)
the payments are based on average EONIA rate , which corresponds to reinvest both notional and received interest at EONIA rate

How to value Eonia swap?

for a Eonia – Fixed swap payout is calculated as:

$$ r_{efrective}=\frac{1}{\delta_{periodBegin->periodEnd} } (\prod_{i=1}^{N} [1+\delta_{i->i+1}r_{i} ] – 1 ) $$
so, to value floating leg we’ll need EONIA fixings from init of the period until valuation date
year fraction $$\delta$$ is based on Actual/360
for future fixings instead of calculating forwards every day we could calculate
$$ r_{effective}=\frac{1}{\delta_{periodBegin->periodEnd}} (\frac{df_{periodBegin}}{df_{periodEnd}}-1) $$

Posted in OTC derivatives valuation Tagged with:

accounting for stock options

What is a stock option plan?

it’s a executive’s incentive plan whoch consists in giving employee a number of stock options which can be exercised only after certain period have passed (vesting period), normally few years

Accounting for stock options

normally we could value it like an american call option.
Black -Scholes formula is not applicable here , because it hold only for european options (it could be applied if stock pays on dividends though).

one can use numerical methods like binary trees or approximative methods (like approximation of Barone-Adesi and Whaley , for example)

Vesting period generally lasts several years.Valuation of these options normally do not depend on this period as in the contracts there are additional clauses whoch stipulate that option could be executed before vesting period ends and there fore it would be generally hedged with american option.
vesting period plays role in accounting as the cost of option is generally divided between vesting years [from start of plan until vesting period ends]

to value these plans you can use following Accounting for stock options calculator
employee stock option plan calculator

Posted in OTC derivatives valuation Tagged with:

hedge effectiveness testing – hedge accounting

What is a hedge effectiveness testing?

it’s a numerical test in hedge accounting to determine if hedging financial instrument effectively hedges underlying loan.
In case when hedge is effective company can apply “hedge accounting” and would not be obliged to appy derivatives profit/loss to accounts , helping reduce accounts volatility.

example

if company has a 10 years loan of 1 million euros with floating rate euribor 6m
as a heding instrument company chooses fixed-floating interest rate swap with fixed rate 2% and loan and swap payment dates coincide

hedge effectivness test would consist in 2 parts:

1) retrospective test
which measures ratio (dollar offset) between change in value of hypothetical derivative (ideal hedge) and hedging instrument

if R(t) is real derivative fair value at time t (derivative bought for hedging)
and H(t) is Hypothetical derivative fair value at time t (derivative which would be an ideal hedge for the loan)
and T is valuation date for hedge effectiveness testing and t is inception date (when the hedge instrument was bought)
then dollar offset D would be

$$R=\frac{R(T)-R(t)}{H(T)-H(t)}$$
and this value normally supposed to be between 80% and 125%

2) prospective test
it would measure statistically correlation (R squared) and slope by changing current yield curve and calculating the ratio for various interest rate scenarios

in this hedge effectiveness testing we would take the yield curve for valuation date and then shift it for example 1% up , then recalculate change of value for real and hypothetical derivative , thus obtaining various points ,
then just feed these points to excel RSQR function and it will give the ratio and to excel SLOPE function to get the slope

Posted in hedge accounting Tagged with: , , , , , , ,

CVA credit valuation adjustment

CVA (Credit Valuation Adjustment) = market value of counterparty credit risk

Recent high levels of CDS spreads make CVA an important quantity in valuation of OTC derivatives.

Before, the same interest rate swap would have the same value for two different counterparties, while now , the same swap would have different price , depending on credit rating of the bank’s client and portfolio of exiting derivatives.

what is CVA?

CVA= (value portfolio taking into account counterparty credit risk)- (value of risk-free portfolio).

in simplified form it’s equivalent to Exposure to default * probability of default * Loss given default

Exposure to default (EAD) = non-negative market value of portfolio at time of default , usually is calculated using monte carlo techniques
probability of default could be estimated from market CDS prices (or OAS spread of bonds)
LGD is based on expected recovery in case of counterparty default (in simple case it’s just (1-Recovery) Recovery is usually set to 40% )

example

let’s take interest rate swap with notional 100 euros , maturity in 5 years , coupon of 1% (near market)
it’s risk-free price would be around 0.36 euros
when counterparty is tier-1 European bank counterparty CVA would be 0.10 eur (supposing we have no other OTC derivatives with Santander)
while when counterparty is tier-2 bank CVA would be around 0.25 eur , therefore Credit Risk adjusted value almost doubles the original risk free fair-value
(calculations of sept 2012, for spanish banks)

deploying CVA

Deploying CVA implied changes in valuation systems, introduction of new systems of CVA pricing and risk-management, and in appropriate case, creation of CVA desk

CVA desk

For managing and aggregating efficiently Counterparty risk many banks have created CVA desk: trading desk which centralizes managing of Counterparty Credit Risk (CRR) for all other trading desks (equity OTC derivatives desk, fx OTC derivatives desk etc).CVA desk charges a fee for this management . and these fees normally would be passed onto banks clients. once all these risks a aggregated CVA desk hedges the exposure with CDS contracts or Credit indices contracts (iTraxx for example)

possible deploing difficulties

CVA required very complicated calculations which needs powerful IT systems.It’s of great importance especially for Front Office which need to get CVA charge in real time (incremental CVA).Normally this would require highly parallelized grid systems.

Another heavy calculation step is obtaining CVA greeks which wold also require grid system.

Problems can arise while integrating 3 systems into one – portfolio data with each client, real time market data, netting agreements with clients)

For probabilities of default calculations one needs liquid CDS market which only exists for some counterparties, otherwise CDS proxies are needed.

wrong-way risk arises when counterparty exposure is highly correlated with CDS spread, for example in case of short CDS position.in this case one needs to complicate the calculations with correlations beween credit risk and other market variables.

also CVA calculation system would need to take into account Basel III requirements as some hedges are not eligible under Basel 3.

financial impact?

during financial crisis almost 70% of CCR losses were attributed to CVA losses and only 30% were attributed to actual defaults (Basel comitee)

recently JP Morgan declared losses of over 2bn$ in it’s division responsible for CVA hedging
goldman sachs could have a overall negative exposure to AIG thanks to it’s CVA desk

CVAvaluation systems
global banks have spent over 900MM$ in systems supporting CVA

Posted in OTC derivatives valuation Tagged with:

OIS discounting

Swap valuation with OIS discounting

OIS-discounting (from Overnight Indexed Swap)
is a derivatives valuation method considering multiple curves (and not one as before) for discounting and for projecting future cash flows.It’s used for collateralized derivatives.

CSA (Credit Support Annex)
its a contract (read “credit support”=collateral) which defines collateral management between counterparties of the contract. OIS discounting is the same as CSA-discounting.

Derivatives Valuation Changes

After the credit crunch of 2008 euribor rates cannot be considered as risk-free , because of the substantial spread between EONIA and Euribor swap (it used to be few bp before)
So, more and more swaps are getting collateralized now , and the interest rate which is paid on collateral is generally EONIA rate (for EUR cash collateral, for USD cash collateral it would be Fed Funds rate).
Because of this , the cashflows of the derivative should also be discounted with corresponding OIS rate.
from 2010 on LCH.Clearnet (major interest rate swap clearing house) has adopted its valuation method to OIS discounting.

Why negotiate swaps with collateral?
Dodd Frank act in the US and EMIR in Europe require that all eligible swaps be collateralized. In the same line BASEL III creates incentives for financial institutions to collateralize swaps (they would need less regulatory capital)

example

lets take a 5 year fixed-floating swap 100 euros notional , with 5% (out of the market) fixed rate and floating rate Euribor 6m (MTM of the swap about 19 euros)
with old method future cashflows are discounted and projected using the same euribor6m-based curve.
with OIS-discounting the cashflows are discounted using EONIA curve and projected using euribor6m-based curve(adjusted for EONIA discounting, which would slightly change the forward euribor rates)
difference between old and OIS discounting would be around 20 cents.

for at he market swaps the difference would be 0.
[calculations for sept 2012]

Deployment

In order to change to OIS-discounting one needs to make changes in legacy derivatives valuation systems – Front Office, Middle office , risk management, and collateral management systems.basic change is to introduce multiple curves for pricing and relevant changes for forward curves constructions.

difficulties in implementation

In the actual CSA (credit support annex) has many optionalities for both parties to post collateral (for example different currencies, different thresholds) which makes that every contract is unique.
The optionality for posting collateral in different currencies makes it a quanto product.Also some currencies still don’t have a liquid OIS-based swaps.

What is a financial impact?

several big banks has already published financial impact of OIS-discounting. bnp paribas has registered negatives impact of 108 millions EUR (2011),
crédit agricole 120 millions ,while some other banks have registered positive impacts , like Morgan stanley +176 M$ (2010),similar impact on RBS.
The sign of impact depends on the direction of the swap book of the institution.
MTM impact is material for legacy ,off-market , and forward starting swaps.
As a consequence it quite affects asset-swaps with euribor leg.

instruments:

apart from vanilla swap effect is big on instruments with euribor leg (this leg must be revalued).it also introduces dependance on EUrobor-EOnia spread to instruments which only were dependent on Euribor rates.
In general the difference is proportional on EONIA-euribor spread.
apart from the banks there is a big impact on insurers which have highly directional books

Posted in OTC derivatives valuation Tagged with: ,