Products Market risk and margin

SA-CVA

Standardised approach for credit valuation adjustment risk

CVA capital from CVA and hedge sensitivities, with the hedge benefit shown.

SA-CVA sizes the capital held against changes in counterparty credit spreads and the market risks inside CVA. GraphAtlas takes CVA and hedge sensitivities, applies the hedging disallowance and the aggregation of the Basel text, and shows the capital, what the hedges save and the part of the capital that rests on each risk factor.

Try the calculation Request a walkthrough

Regime
Basel Framework, MAR50
Set by
  • Basel Committee on Banking Supervision
Built for
  • CVA desks
  • Counterparty credit risk
  • Regulatory reporting
Version
2.7
The capital of an example desk by risk class, with and without its hedgesThe capital of the example desk against CVA risk is 2,011,083 euros, and would be 6,354,264 without its hedges, so the hedges take 68 per cent off it. There is one column for each of the 5 risk classes, as high as the capital of the class without hedges, with the part that remains solid and the part that the hedges take off hatched. A tag says that the parameters are prescribed.CAPITAL BY RISK CLASSRATESDELTA0.38MFXDELTA0.12MCREDITDELTA1.02MRATESVEGA0.30MFXVEGA0.20MWITH HEDGESTAKEN OFF BY HEDGESWITHOUT HEDGES6,354,264CAPITAL2,011,083PRESCRIBEDENGINESA-CVA V2.7SET BYBCBSDATASAMPLERECEIPTf71a292a The capital of an example desk by risk class, with and without its hedgesThe capital of the example desk against CVA risk is 2,011,083 euros, and would be 6,354,264 without its hedges, so the hedges take 68 per cent off it. There is one column for each of the 5 risk classes, as high as the capital of the class without hedges, with the part that remains solid and the part that the hedges take off hatched. A tag says that the parameters are prescribed.CAPITAL BY RISK CLASSIRDELTA0.38MFXDELTA0.12MCSDELTA1.02MIRVEGA0.30MFXVEGA0.20MWITH HEDGESHEDGEDWITHOUT HEDGES6,354,264CAPITAL2,011,083PRESCRIBEDENGINEV2.7DATASAMPLERECEIPTf71a292a

Try it

Run it on sample data

Choose the desk or the book of one bucket, or type positions of your own, and read the capital of each class as you type. Then change how much of the hedges the book keeps. The capital falls while a hedge offsets the CVA it is set against and rises again once the hedges are larger than the exposure. The parts below the chart say which risk factors carry it.

Fig. 1 The SA-CVA capital of a book of CVA sensitivities, and what its hedges do

Verifying receipt

The book

The positions

Its rates have the six factors of a specified currency, and it has no FX risk.

33 positions read. They make 32 risk factors in 15 buckets, across 5 risk classes.

How a line is written

A line is the risk, the bucket, the factor, the CVA sensitivity and the hedge sensitivity, and for a credit spread the name, the quality and the group. Separate them with commas, tabs or two spaces, so that a name can have a single space in it. A line that is wider than the box scrolls sideways. The sensitivities are what a basis point of a rate or a spread, or one per cent of an FX rate or a volatility, does to the CVA and to its hedges, in the reporting currency. A hedge that offsets has the sign of the CVA.

The hedges

per cent of the amounts in the box
At 100% of the hedges the capital is 2,011,083. The lowest is 1,395,195, at 130%.

The capital requirement is 2,011,083 EUR, which is 25,138,534 of risk-weighted assets. Without the hedges it would be 6,354,264, so the hedges save 4,343,181, which is 68%.

  • Capital at each share of the hedges
  • With no hedge
  • The lowest
05M10M15M0%100%200%300%400%Capital, EURno hedgelowest, 130%as booked100% of the hedgesshare of the hedges in the box
Move the pointer along the chart, or use the slider above it, to keep more or less of the hedges. The capital falls while a hedge offsets the CVA it is against, and rises again once the hedge is larger than that.

At 100% of the hedges the capital is 2,011,083. The lowest is 1,395,195, at 130%.

The capital of each risk class
Risk classFactorsCapitalShare of the largest classNo hedgeHedges save
Rates delta13381,6022,051,3891,669,787
FX delta3116,415421,718305,303
Credit spread delta111,015,7182,473,2051,457,487
Rates vega3298,792975,171676,379
FX vega2198,557432,782234,224
The book322,011,0836,354,2644,343,181

Delta is 1,513,734 and vega is 497,349. The capital is their sum, which is not the root of anything, so no class offsets another.

Where the capital comes from

Each risk factor has the part of the capital that rests on it, the CVA and the hedge apart. A hedge that offsets takes a negative part. The parts add up to the capital.

The part of the capital that rests on each risk factor, the largest first
Risk factorFrom the CVAFrom the hedgePartSize of the part
Aldermoor Bank 3yCredit spread deltaCVA 461,377, hedge none461,377–461,377
Aldermoor Bank 10yCredit spread deltaCVA 377,697, hedge none377,697–377,697
Aldermoor Securities 3yCredit spread deltaCVA none, hedge −320,546–−320,546−320,546
Calder Retail 3yCredit spread deltaCVA 220,998, hedge none220,998–220,998
Aldermoor Bank 1yCredit spread deltaCVA 170,902, hedge none170,902–170,902
EUR rates volatilityRates vegaCVA 687,190, hedge −520,006687,190−520,006167,184
GBP volatilityFX vegaCVA 108,785, hedge none108,785–108,785
NOK curveRates deltaCVA 100,850, hedge none100,850–100,850
USD rates volatilityRates vegaCVA 193,938, hedge −95,999193,938−95,99997,938
USD volatilityFX vegaCVA 295,721, hedge −205,949295,721−205,94989,773
Aldermoor Bank 0.5yCredit spread deltaCVA 72,096, hedge none72,096–72,096
EUR inflationRates deltaCVA 64,636, hedge none64,636–64,636
NOK spot rateFX deltaCVA 58,933, hedge none58,933–58,933
GBP 10yRates deltaCVA 50,323, hedge none50,323–50,323
GBP spot rateFX deltaCVA 80,247, hedge −44,02480,247−44,02436,223
GBP 5yRates deltaCVA 115,228, hedge −81,436115,228−81,43633,792
EUR inflation volatilityRates vegaCVA 33,669, hedge none33,669–33,669
USD 5yRates deltaCVA 135,309, hedge −109,715135,309−109,71525,595
USD 2yRates deltaCVA 92,932, hedge −70,26592,932−70,26522,667
USD spot rateFX deltaCVA 104,658, hedge −83,400104,658−83,40021,259
Brightwater Utilities 5yCredit spread deltaCVA 20,910, hedge none20,910–20,910
EUR 30yRates deltaCVA 42,315, hedge −24,24442,315−24,24418,071
USD 10yRates deltaCVA 86,942, hedge −71,39386,942−71,39315,549
EUR 10yRates deltaCVA 155,879, hedge −142,402155,879−142,40213,476
Calder Retail 5yCredit spread deltaCVA 217,300, hedge −206,631217,300−206,63110,669
EUR 5yRates deltaCVA 211,936, hedge −201,569211,936−201,56910,367
NOK inflationRates deltaCVA 10,334, hedge none10,334–10,334
Aldermoor Bank 5yCredit spread deltaCVA 749,402, hedge −759,021749,402−759,021−9,618
EUR 1yRates deltaCVA 85,482, hedge −76,73185,482−76,7318,751
Brightwater Utilities 1yCredit spread deltaCVA 7,401, hedge none7,401–7,401
EUR 2yRates deltaCVA 121,992, hedge −114,804121,992−114,8047,189
Republic of Marland 5yCredit spread deltaCVA 3,832, hedge none3,832–3,832
The buckets of each class

The capital of a class puts the capital of each bucket together with the sum of its weighted sensitivities, which is held between minus and plus the capital of the bucket first. A bucket whose sum was held is marked.

Each bucket, with its capital, its sum of weighted sensitivities and whether the sum was held
BucketCapitalSumHeld
EURRates delta149,717146,150–
GBPRates delta109,142111,000to the capital
NOKRates delta137,605150,100to the capital
USDRates delta86,16388,050to the capital
GBPFX delta44,34244,000–
NOKFX delta66,00066,000–
USDFX delta34,70319,250–
Bucket 1Credit spread delta17,50017,500–
Bucket 2Credit spread delta841,127775,000–
Bucket 4Credit spread delta425,493425,000–
Bucket 6Credit spread delta141,128144,000to the capital
EURRates vega215,711235,000to the capital
USDRates vega125,623125,000–
GBPFX vega120,000120,000–
USDFX vega103,078100,000–

Against a second program

Agrees to fourteen digits

The program takes the tables of MAR50 as printed and the one square root of each bucket and class at sixty digits. Its capital for this book is set beside the capital here.

The capital of each class here and in the second program, with the difference
Risk classHereSecond programDifference
Rates delta381,601.6261381,601.62611.5×10−16
FX delta116,414.6817116,414.68170
Credit spread delta1,015,717.61931,015,717.61930
Rates vega298,791.5313298,791.53130
FX vega198,557.2965198,557.29650
The book2,011,082.75502,011,082.75501.2×10−16
The book with no hedge6,354,263.80376,354,263.80371.5×10−16

Receiptf71a292a 67c0c8c1 … 489e1c31

Choose a book or type your own. The formulas run in this page and nothing leaves it.

Inputs and outputs

What goes in. What comes out

The plate runs a slice of the engine. This is the whole shape of it.

What goes in

Positions
One line for each sensitivity. A line names the risk, the bucket and the factor, and gives the sensitivity of the CVA and the sensitivity of its hedges. A credit spread adds the name, the quality and the group. Up to 200 lines.
Reporting currency
Three capital letters. Its rates have the six factors of a specified currency, and it has no FX risk. The seven currencies of the rule keep six factors whatever the reporting currency is.
Hedges kept
The share of the hedge sensitivities that the run counts, from none to four times the amounts in the box. At 100 per cent the book is as typed.

What comes out

Capital and risk-weighted assets
The delta capital and the vega capital of each class, their sum, and twelve and a half times it.
Hedge benefit
The capital of the same book with the hedges taken away, and what the hedges save or add.
Capital by share of the hedges
The capital at every share of the hedges from none to four times the book, with the share at which it is lowest.
Parts of the capital
For every risk factor, the part of the capital that rests on its CVA sensitivity and the part that rests on its hedge. The parts add up to the capital.
Buckets
The capital and the sum of weighted sensitivities of each bucket, with a mark where the sum was held to the capital of the bucket.
Receipt
A hash of the rule, the book as it was netted and every number that came out. Anyone can recompute it.

What the plate covers

In the plate above

  • Interest rate delta and vega, FX delta and vega, and counterparty credit spread delta, which are five of the eleven classes of the rule.
  • The weights, correlations and cross-bucket factors of those classes as the July 2020 text prints them, with the seven buckets and the two qualities of credit spread risk.
  • The netting of positions that name the same line, the weighted sensitivities, the capital of a bucket with the hedging disallowance, and the capital of a class with the sums held to the range of their buckets.
  • The hedges at any share of the book, and the capital that each share leaves.
  • The part of the capital that rests on each factor, the CVA and the hedge apart, and a second program in exact fractions that agrees on the two built-in books.

In the licensed engine, not the plate

  • The rest of the product. Reference credit spread, equity and commodity risk, the vega of the last two and of reference credit spreads, and the index buckets are not here.
  • The sensitivities. The plate takes them as given. The exposure models that price the CVA and shift it by a basis point, and the hedges that the desk holds, belong to the product and not to a page.
  • Whether a hedge may be recognised. The rule allows whole transactions that are managed to reduce CVA risk, and not tranched credit. The plate counts every hedge that is in the box.
  • The scope. Which transactions are covered, what is carved out to the basic approach, and the approval that the standardised approach needs are decisions for the bank and its supervisor.
  • National texts. The plate follows the Basel text. A rule that a jurisdiction has made from it can differ.

Clause map

Every rule has an address

Each row names the clause, the function that carries it and the statements that check it. A test opens each file and confirms the function exists.

Rules of the regulation, the code that carries each one and the statements that check it
Reference Rule Carried by Checked by
Basel Framework, MAR50.1 The risk-weighted assets for CVA risk are the capital requirement multiplied by 12.5. RWA_FACTOR src/kernel/sacva.ts Tested SC-06 Tested SC-11
MAR50.40 and MAR50.41, as revised in July 2020 The multiplier on the aggregated capital is 1. It was 1.25 before the revision. A supervisor may require a higher value for a bank whose model risk warrants it, and the plate uses 1. MULTIPLIER src/kernel/sacva.ts Tested SC-06
MAR50.42, MAR50.43 and MAR50.45 The capital is the sum of the delta capital and the vega capital. Delta is the simple sum over its risk classes and so is vega. There is no vega capital for counterparty credit spread risk. The plate has three delta classes and two vega classes, and no class offsets another. sacva src/kernel/sacva.ts Tested SC-11 Tested SC-16
MAR50.51 The weighted sensitivity of a risk factor is its risk weight times the sensitivity of the CVA, and the same for the hedge. A risk weight depends on the class, the factor and for credit spreads on the sector and the quality. weightOf src/kernel/sacva.ts Tested SC-07 Tested SC-08
MAR50.52 The net weighted sensitivity of a factor is the weighted sensitivity of the CVA less that of the hedge. A hedge that offsets has the sign of the CVA, and a hedge with the opposite sign counts as more exposure. sacva src/kernel/sacva.ts Tested SC-09
MAR50.53 (1) The capital of a bucket is the root of the squares of the net weighted sensitivities, the products of each pair with their correlation, and the hedging disallowance of 0.01 times the squares of the weighted hedges. A hedge as large as the CVA never takes a bucket to zero. A hedge of a little under twice the CVA costs as much as no hedge, and a larger one costs more. HEDGING_DISALLOWANCE src/kernel/sacva.ts Proved SC-01 Proved SC-02 Tested SC-09
MAR50.53 (2) and (3) The capital of a class puts the capital of its buckets together with their correlations and the multiplier. The sum of the weighted sensitivities of a bucket enters at no more than its capital and no less than minus it, and a bucket that is held says so. The capital of a class is a real number and is never above the sum of its buckets. sacva src/kernel/sacva.ts Proved SC-04 Tested SC-10
MAR50.54 to MAR50.56, Table 3 Interest rate buckets are the currencies. The factors of a specified currency, which are the reporting currency and the seven of the rule, are the yields at 1, 2, 5, 10 and 30 years and inflation, with the weights of Table 3. The sensitivity is per basis point. IR_WEIGHT_TEXT src/kernel/sacva.ts Tested SC-06 Tested SC-07
MAR50.56 (4), Table 4 The correlation of two interest rate factors of a specified currency is the entry of Table 4. The matrix is positive definite, which an exact factorisation shows, so that no book can give a bucket a quantity under the root below zero. IR_CORRELATION_TEXT src/kernel/sacva.ts Certified SC-05 Tested SC-06
MAR50.55 The correlation between two currencies, which is the cross-bucket correlation of interest rate delta and vega, is 0.5 for every pair. IR_GAMMA_TEXT src/kernel/sacva.ts Proved SC-04 Tested SC-06 Tested SC-10
MAR50.57 A currency that is not specified has two factors, the whole yield curve and inflation, with a weight of 1.58 per cent each and a correlation of 0.4. IR_OTHER_WEIGHT_TEXT src/kernel/sacva.ts Tested SC-06 Tested SC-07
MAR50.58 Interest rate vega has two factors for each currency, the volatilities of rates and of inflation, with a weight of 100 per cent and a correlation of 0.4. The sensitivity is for one per cent of the volatility. VEGA_WEIGHT_TEXT src/kernel/sacva.ts Tested SC-06 Tested SC-07
MAR50.59 to MAR50.62 FX buckets are the currencies except the reporting currency. Delta has one factor, the spot rate, with a weight of 11 per cent. Vega has one factor, the volatility, with a weight of 100 per cent. Both are for one per cent of the rate or the volatility. FX_DELTA_WEIGHT_TEXT src/kernel/sacva.ts Tested SC-06 Tested SC-07
MAR50.60 The correlation between two FX buckets, for delta and for vega, is 0.6 for every pair. FX_GAMMA_TEXT src/kernel/sacva.ts Proved SC-04 Tested SC-06 Tested SC-10
MAR50.63, Table 5 Counterparty credit spread delta has seven buckets by sector, and the sectors 1a and 1b share the first. A position names its entity, its quality and its group of legally related names, and the positions of one entity agree on its sector, its quality and its group. There is no vega capital for it. CS_SECTORS src/kernel/sacva.ts Tested SC-07 Tested SC-13
MAR50.64, Table 6 The correlations across the seven credit buckets are the entries of Table 6. The matrix is positive definite, which an exact factorisation shows. CS_GAMMA_TEXT src/kernel/sacva.ts Certified SC-05 Tested SC-06 Tested SC-10
MAR50.65 (3), Table 7 The risk weight of a credit spread depends on the sector and on whether the name is investment grade or high yield or not rated. It is the same at every tenor. The tenors are half a year, 1, 3, 5 and 10 years, and the sensitivity is per basis point. CS_WEIGHT_TEXT src/kernel/sacva.ts Tested SC-06 Tested SC-07
MAR50.65 (4) The correlation of two credit spread factors in a bucket is the product of three. The tenors give 1 if they are the same and 0.9 if not. The names give 1 for the same name, 0.9 for names that are legally related and 0.5 for the rest. The qualities give 1 if they are the same and 0.8 if not. CS_TENOR_CORRELATION_TEXT src/kernel/sacva.ts Tested SC-06 Tested SC-08
Rule of this product, netting Positions that name the same line are added before anything else, in the CVA and in the hedge. Positions that differ in the risk, the bucket, the factor or the name are not netted. The order of the positions changes nothing, and the lines are listed in the order of the tables. sacva src/kernel/sacva.ts Tested SC-12
Rule of this product, what a book may say A book has a reporting currency of three capital letters and from one to 200 positions. Every sensitivity is a finite number of at most 1,000,000,000,000 in size. A factor is one that the risk has in that bucket. A message names the position, counting from one, and the checks of a position run in a fixed order. sacva src/kernel/sacva.ts Tested SC-13
Rule of this product, the hedges at a share A share of the hedges scales every hedge sensitivity and nothing else. The capital of a book at each share of its hedges is listed in the order of the shares, and at none it is the capital with no hedge. withHedgeRatio src/kernel/sacva.ts Tested SC-09
Rule of this product, where the capital comes from Each bucket has the part of the capital of its class that the capital changes by when the bucket is scaled. Each factor has the part of its bucket that is its share of the quadratic form of the bucket, and the CVA and the hedge are apart. MAR50 has no allocation rule, and this is the Euler allocation. The parts add up to the capital, and a hedge that offsets takes a negative part. sacva src/kernel/sacva.ts Proved SC-03 Tested SC-15
Rule of this product, a second program A program that shares no code with the engine works the capital in exact fractions and takes each square root once, at sixty digits. For 26 books that use every class, a bucket that is held on each side and one that is not, the two agree to 3e-15. sacva src/kernel/sacva.ts Tested SC-14
Rule of this product, what the capital does The capital doubles when every sensitivity doubles, is the same when every sign is reversed, and is the same in any order. The capital of a class is not above the sum of its buckets, and the capital of the book is not below its largest class. The hedges never save more than the capital with no hedge. capitalByRatio src/kernel/sacva.ts Tested SC-16
Receipt of a book The receipt covers the rule, the book as the calculation took it, which is netted and in a fixed order, and every number that came out. It is the same for the same book in another order when its amounts are whole, because a sum taken in another order can differ in its last digit, and it changes when any input moves by one unit. sacvaReceiptPayload src/kernel/sacva.ts Tested SC-17 Tested KE-03

Verification

What we claim, and how it is checked

Every statement is registered, and each says which level of assurance it has earned. The ladder is explained on the verification page.

Proved

True for every input.

  • SC-01

    When the hedges of a bucket offset every one of its risk factors in the same proportion, the quantity under the root of its capital is (1 − ratio)² × Q + R × ratio² × N, where Q is the form of the CVA weighted sensitivities through the correlation matrix, N is the sum of their squares and R is the hedging disallowance of 0.01. No ratio takes it below R × Q × N / (Q + R × N), the ratio Q / (Q + R × N) reaches that value, and so the capital of a bucket with a position is never zero.

    3 checks, decided by Z3 5.3.3.0 (WebAssembly) and rerun from the emitted file by Z3 5.3.3 (native) and cvc5 1.4.2 (native, nl-cov). 4 broken variants are refuted. proofs/smt2/SC-01.smt2

  • SC-02

    With the hedges of the previous statement, a ratio of hedging above zero and below 2 × Q / (Q + R × N) lowers the quantity under the root of the capital of a bucket, that ratio leaves it where it was with no hedge, and a ratio above it or below zero raises it. With the disallowance of 0.01 and a single factor, a hedge of more than 198 per cent of the exposure costs more capital than no hedge.

    4 checks, decided by Z3 5.3.3.0 (WebAssembly) and rerun from the emitted file by Z3 5.3.3 (native) and cvc5 1.4.2 (native, nl-cov). 3 broken variants are refuted. proofs/smt2/SC-02.smt2

  • SC-03

    In an interest rate bucket of six factors, the share that rests on the CVA sensitivity of each factor, which is the CVA weighted sensitivity times the matching entry of the correlation matrix times the net weighted sensitivities, and the share that rests on its hedge, which is the weighted hedge times R times itself less that entry, add up to the quantity under the root, whatever the sensitivities are. Divided by the capital, the shares add up to it.

    1 check, decided by Z3 5.3.3.0 (WebAssembly) and rerun from the emitted file by Z3 5.3.3 (native) and cvc5 1.4.2 (native, nl-cov). 3 broken variants are refuted. proofs/smt2/SC-03.smt2

Show the other 1 Show fewer
  • SC-04

    For three buckets that each have the same correlation of 0.5 with every other, or of 0.6, and whose sums of weighted sensitivities are cut to the range of their capital, the quantity under the root of the capital of a class is never below zero and never above the square of the sum of the bucket capitals. The capital of the class is then a real number, and the diversification it gives never lifts it above the plain sum of the buckets.

    17 checks, decided by Z3 5.3.3.0 (WebAssembly) and rerun from the emitted file by Z3 5.3.3 (native) and cvc5 1.4.2 (native, nl-cov). 3 broken variants are refuted. proofs/smt2/SC-04.smt2

Certified

True for the case in hand, with evidence anyone can recheck.

  • SC-05

    The correlation matrix of Table 4, for the interest rates of a specified currency, and that of Table 6, across the seven credit spread buckets, are positive definite. An exact LDL factorisation shows it, and a separate checker accepts the factorisation. A certificate with one pivot or one entry changed is refused. The engine finds no certificate for a table in which two neighbouring factors are perfectly correlated, or a far pair is correlated too much for the pairs between.

    tests/kernel/sacva.test.tssrc/kernel/certify.tssrc/kernel/rational.ts

Tested

True on every input we tried.

  • SC-06

    The rule is as the July 2020 text of the Basel Committee prints it. The multiplier is 1, the hedging disallowance is 0.01 and the risk-weighted assets are 12.5 times the capital. The seven specified currencies, and every risk weight and every correlation of interest rates, FX and counterparty credit spreads, are those of Tables 3 to 7 and paragraphs MAR50.54 to MAR50.65. Every matrix is symmetric, with a diagonal of one and entries from zero to one.

    tests/kernel/sacva.test.ts

  • SC-07

    A specified currency and the reporting currency have six interest rate factors, and any other currency has two. The weighted sensitivity of a line is its sensitivity times the weight of its factor, which is the weight that the tables give for each factor of each risk, and for each sector of credit spread, for investment grade and for the rest. A bucket of one factor and no hedge has a capital equal to its weighted sensitivity, which is the weight times the change that one shift makes, over the size of the shift.

    tests/kernel/sacva.test.ts

  • SC-08

    The correlation of two factors in a bucket is the entry of the table for a specified currency. It is 0.4 for the two factors of any other currency and for the volatilities of rates. For two credit spreads it is the product of three factors, one for the tenors, one for the names and one for the qualities. The two sectors of bucket 1 make one bucket, with their own weights and one correlation between their names.

    tests/kernel/sacva.test.ts

Show the other 9 Show fewer
  • SC-09

    For one factor with an exposure A and a hedge of L times it, the capital of the bucket is A times the square root of (1 - L)^2 + R L^2, with R the hedging disallowance. A perfect hedge leaves A times the square root of R, not zero. The capital is lowest at L = 1 / (1 + R), and is that of no hedge again at 2 / (1 + R). A hedge of the same sign as the CVA offsets it, one of the opposite sign is more exposure, and a hedge alone is exposure of its own. The net weighted sensitivity of a factor enters the correlation and its hedge enters its own R term only. A share of the hedges scales every hedge and nothing else, and the capital at each share is listed in order.

    tests/kernel/sacva.test.ts

  • SC-10

    The capital of a class puts its buckets together at 0.5 for every pair of currencies, 0.6 for every pair of FX buckets and the entries of Table 6 for credit, times the multiplier. The sum of the weighted sensitivities of a bucket enters at no more than its capital and at no less than minus it. A one sided bucket is held to its capital, a bucket whose sum is smaller is left alone, and a bucket of one factor is never held. The class says which of its buckets were held, and the quantity under its root is that of the book with its hedges.

    tests/kernel/sacva.test.ts

  • SC-11

    The capital is the sum of the capital of the three delta classes and of the two vega classes, and the risk-weighted assets are 12.5 times it. The book without its hedges is worked class by class, and the difference is the benefit of the hedges. A class that the book does not name has no buckets and no capital, and a book of zero sensitivities has none. Each factor in the result carries what the book said, its weight and its weighted sensitivities, under a name that a person reads.

    tests/kernel/sacva.test.ts

  • SC-12

    Positions that name the same line are added before anything else, in the CVA and in the hedge. Positions that differ in the risk, the bucket, the factor or the name are not netted. The capital does not depend on the order of the positions, to the last digit when the amounts are whole. The factors of a bucket are listed in the order of the table, the buckets of a class by currency or by sector, and the credit lines by name and then tenor.

    tests/kernel/sacva.test.ts

  • SC-13

    A book that the rule cannot take is refused, and the message names the position, counting from one. A book has a reporting currency of three capital letters and from one to 200 positions, and every sensitivity is a finite number of at most 1,000,000,000,000 in size. A factor is one that the risk has in that bucket, and the message lists the ones it has. A credit spread has a sector of the table, an entity, a quality and a group, and the positions of one entity agree on all three. The checks of a position run in a fixed order, and so do the positions.

    tests/kernel/sacva.test.ts

  • SC-14

    A second program that shares no code with the engine works the capital in exact fractions and takes each square root once. For 26 books that use every risk, with a bucket held on each side and one that is not held, the capital of every class, with the hedges and without, and the capital of the book agree with the engine to a relative error under 3e-15. The saved answers are what the program says now, so that nobody edited them by hand.

    tests/kernel/sacva.test.tsscripts/verify/sacva_oracle.pytests/support/sacva-oracle.json

  • SC-15

    MAR50 has no rule for where the capital comes from, and the product gives one, the Euler allocation. The part of a bucket is what the capital of its class changes by along the bucket, and the factors of a bucket share its part, the CVA and the hedge of each apart. The parts add up to the capital for every book of the second program. A hedge that offsets takes a negative part, a bucket that the others more than offset takes a negative part, and a bucket with no capital takes none. A minus zero never comes out.

    tests/kernel/sacva.test.ts

  • SC-16

    Over generated books of up to 14 positions, the capital doubles when every sensitivity doubles and halves when they halve, to the last digit. It is the same with every sign reversed, and with the positions in another order when the amounts are whole. The capital of a class is a real number and not above the sum of its buckets. The capital of the book is delta plus vega, not below its largest class, and the risk-weighted assets are 12.5 times it. The shares add up to the capital, and the benefit of the hedges is never more than the capital without them.

    tests/kernel/sacva.test.ts

  • SC-17

    The receipt of a calculation holds the rule, the book as the calculation took it, which is netted and in a fixed order, and what came out. It is the same for the same book in another order when its amounts are whole, and different when any input moves by one unit. It lists the lines by risk before the bucket, and never carries a minus zero, which would give another hash.

    tests/kernel/sacva.test.ts

Read the verification statement

Use it

The same call, anywhere

This sample is written from the input the plate starts with, so the code and the numbers cannot drift apart.

Call
import {
  capitalByRatio,
  sacva,
  sacvaReceiptPayload,
} from '@graphatlas/kernel/sa-cva';
import type { Book } from '@graphatlas/kernel/sa-cva';
import { receipt } from '@graphatlas/kernel/receipt';

// Six rate factors of one currency, with a hedge as large as the CVA on each.
// A rate is shifted by a basis point, so a sensitivity is the change per basis point.
const book: Book = {
  reporting: 'EUR',
  positions: [
    { risk: 'ir-delta', bucket: 'EUR', factor: '1y', cva: 1200, hedge: 1200 },
    { risk: 'ir-delta', bucket: 'EUR', factor: '2y', cva: 2000, hedge: 2000 },
    { risk: 'ir-delta', bucket: 'EUR', factor: '5y', cva: 3600, hedge: 3600 },
    {
      risk: 'ir-delta',
      bucket: 'EUR',
      factor: '10y',
      cva: 2600,
      hedge: 2600,
    },
    { risk: 'ir-delta', bucket: 'EUR', factor: '30y', cva: 700, hedge: 700 },
    {
      risk: 'ir-delta',
      bucket: 'EUR',
      factor: 'inflation',
      cva: 500,
      hedge: 500,
    },
  ],
};

const run = sacva(book);
const hash = await receipt(sacvaReceiptPayload(book, run));

// The capital with none of the hedges, half of them, all of them and twice as many.
const byShare = capitalByRatio(book, [0, 0.5, 1, 2]);
Returns
const out = {
  capital: 40753.9507,
  rwa: 509424.3841,
  unhedged: 778849.1574,
  benefit: 738095.2067,
  buckets: [
    {
      risk: 'ir-delta',
      bucket: 'EUR',
      capital: 40753.9507,
      sum: 0,
      clipped: 0,
    },
  ],
  parts: [
    { factor: 'EUR 1y', ws: 0, part: 4353.5019 },
    { factor: 'EUR 2y', ws: 0, part: 8488.9929 },
    { factor: 'EUR 5y', ws: 0, part: 17414.0074 },
    { factor: 'EUR 10y', ws: 0, part: 9083.2323 },
    { factor: 'EUR 30y', ws: 0, part: 658.4 },
    { factor: 'EUR inflation', ws: 0, part: 755.8163 },
  ],
  byShare: {
    0: 778849.1574, 0.5: 389957.3356, 1: 40753.9507, 2: 783102.5144,
  },
  receipt: '0752a7ec29d542976844dd550b35a1cc6cbe08dd8a603b14d6ed7ed5029831fb',
};

The call and the numbers come from the engine that built this page, run on the same input as the plate above. The sample is the book of one bucket, which is short enough to read. The desk book of the plate runs the same way, and the plate compares its own receipt with the one printed here. The parts are the shares of the capital that rest on each factor, with the CVA and the hedge together. Values are rounded to four places for display. The receipt hashes the unrounded numbers.

Runs on

  • Browser
  • Edge
  • Node.js
  • Python
  • JVM
  • .NET
  • Excel
  • Command line
  • Container

Green surfaces are measured on every build of this site. Each must return the same receipt, bit for bit. The others are packaged targets that the build does not measure. How the platform works

Changes

When the rule moves, so does the engine

Publications that touch this regime, and the release that answered each.

  1. BCBS Clarification

    Frequently asked questions on eligible hedges under the CVA framework

    Shipped as SA-CVA 2.6, 9 days later

Open the full feed

The next step

Bring us
one book

A scoping call, a sample book and a parallel run on your data. Most teams have the first reconciled number inside two weeks, and a receipt for it on the day.

Book a demo Work out a price