Skip to content

Commit c996e3b

Browse files
mgronckijenkins
authored andcommitted
Merge remote-tracking branch 'origin/master' into QPR-12148
1 parent f998e87 commit c996e3b

59 files changed

Lines changed: 8590 additions & 1831 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Docs/UserGuide/parameterisation/stressconfig.tex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ \subsection{Stress Scenario Analysis: {\tt stressconfig.xml}}\label{sec:stress}
1919
In case of the swaption volatility shifts, the single value given as {\tt Shift} (without the attributes {\tt expiry}
2020
and {\tt term}) represents a default value that is used whenever no explicit value is given for a expiry / term pair.
2121

22+
In case of discount, index, yield and survival probability curves and cap floor surfaces the shifts can be defined as parRateShifts {\tt ParShift}.
23+
It's default to shifts on the zero rates. If a curve in a asset class (e.g. rates) is defined as par rate shift,
24+
all curves in this asset class has to be defined as par rate shift.
25+
2226
\begin{longlisting}
2327
%\hrule\medskip
2428
\begin{minted}[fontsize=\scriptsize]{xml}
@@ -29,6 +33,7 @@ \subsection{Stress Scenario Analysis: {\tt stressconfig.xml}}\label{sec:stress}
2933
<ShiftType>Absolute</ShiftType>
3034
<ShiftTenors>6M,1Y,2Y,3Y,5Y,7Y,10Y,15Y,20Y</ShiftTenors>
3135
<Shifts>0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01</Shifts>
36+
<ParShift>true</ParShift>
3237
</DiscountCurve>
3338
...
3439
</DiscountCurves>
@@ -68,6 +73,7 @@ \subsection{Stress Scenario Analysis: {\tt stressconfig.xml}}\label{sec:stress}
6873
<ShiftType>Absolute</ShiftType>
6974
<ShiftExpiries>6M,1Y,2Y,3Y,5Y,10Y</ShiftExpiries>
7075
<Shifts>0.001,0.001,0.001,0.001,0.001,0.001</Shifts>
76+
<ParShift>false</ParShift>
7177
</CapFloorVolatility>
7278
</CapFloorVolatilities>
7379
</StressTest>

Docs/UserGuide/userguide.tex

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6134,10 +6134,16 @@ \subsection{Stress Scenario Analysis: {\tt stressconfig.xml}}\label{sec:stress}
61346134
This file {\tt stressconfig.xml} specifies how stress tests can be configured. The general structure is shown in listing
61356135
\ref{lst:stress_config}.
61366136

6137-
In this example, two stress scenarios ``parallel\_rates'' and ``twist'' are defined. Each scenario definition contains
6137+
In this example, two zero stress scenarios ``parallel\_rates'' and ``twist'' and one par rate ``par_parallel'' are defined.
6138+
Each scenario definition contains
61386139
the market components to be shifted in this scenario in a similar syntax that is also used for the sensitivity
61396140
configuration, see \ref{sec:sensitivity}. Components that should not be shifted, can just be omitted in the definition
6140-
of the scenario.
6141+
of the scenario. Shifts for rate curves, credit curves and interest rate cap/floors can be given as par or zero rate shifts.
6142+
By default shifts are zero rate shifts. If shifts are marked as par rate shifts all components (rate/credit/caps) shifts are
6143+
par shifts in that category, for example it is not possible to have par rate first for one yield curve and zero rate for
6144+
another curve in the same scenario. In case of par stress scenario, the shifted par instruments and related conventions are defined
6145+
in a sensitivity configuration. The number number stress shifts (tenors/expiries and strikes) need to be allign with
6146+
the tenors/expiries and strikes of par instruments \ref{sec:sensitivity}.
61416147

61426148
However, instead of specifying one shift size per market component, here a whole vector of shifts can be given, with
61436149
different shift sizes applied to each point of the curve (or surface / cube).
@@ -6148,7 +6154,6 @@ \subsection{Stress Scenario Analysis: {\tt stressconfig.xml}}\label{sec:stress}
61486154
UseSpreadedTermStructures: If set to true, spreaded termstructures over t0 will be used for the scenario calculation, to
61496155
improve the alignment of the scenario sim market and t0 curves.
61506156

6151-
61526157
\begin{longlisting}
61536158
%\hrule\medskip
61546159
\begin{minted}[fontsize=\scriptsize]{xml}
@@ -6205,6 +6210,56 @@ \subsection{Stress Scenario Analysis: {\tt stressconfig.xml}}\label{sec:stress}
62056210
<StressTest id="twist">
62066211
...
62076212
</StressTest>
6213+
<StressTest id="par_parallel">
6214+
<ParShifts>
6215+
<IRCurves>true</IRCurves>
6216+
<SurvivalProbability>true</SurvivalProbability>
6217+
<CapFloorVolatilities>true</CapFloorVolatilities>
6218+
</ParShifts>
6219+
<DiscountCurves>
6220+
<DiscountCurve ccy="EUR">
6221+
<ShiftType>Absolute</ShiftType>
6222+
<ShiftTenors>6M,1Y,2Y,3Y,5Y,7Y,10Y,15Y,20Y</ShiftTenors>
6223+
<Shifts>0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01</Shifts>
6224+
</DiscountCurve>
6225+
...
6226+
</DiscountCurves>
6227+
<IndexCurves>
6228+
...
6229+
</IndexCurves>
6230+
<YieldCurves />
6231+
<FxSpots />
6232+
<FxVolatilities />
6233+
<SwaptionVolatilities />
6234+
<CapFloorVolatilities>
6235+
<CapFloorVolatility key="EUR-EURIBOR-6M">
6236+
<ShiftType>Absolute</ShiftType>
6237+
<ShiftExpiries>1Y, 2Y, 3Y, 4Y, 5Y, 6Y, 7Y, 8Y, 9Y</ShiftExpiries>
6238+
<Shifts>
6239+
<Shift tenor="1Y">0.01</Shift>
6240+
<Shift tenor="2Y">0.01</Shift>
6241+
<Shift tenor="3Y">0.01</Shift>
6242+
<Shift tenor="4Y">0.01</Shift>
6243+
<Shift tenor="5Y">0.01</Shift>
6244+
<Shift tenor="6Y">0.01</Shift>
6245+
<Shift tenor="7Y">0.01</Shift>
6246+
<Shift tenor="8Y">0.01</Shift>
6247+
<Shift tenor="9Y">0.01</Shift>
6248+
</Shifts>
6249+
</CapFloorVolatility>
6250+
</CapFloorVolatilities>
6251+
<EquitySpots />
6252+
<EquityVolatilities />
6253+
<SecuritySpreads />
6254+
<RecoveryRates />
6255+
<SurvivalProbabilities>
6256+
<SurvivalProbability name="Underlying1">
6257+
<ShiftType>Absolute</ShiftType>
6258+
<Shifts>0.01, 0.01, 0.01, 0.01, 0.01</Shifts>
6259+
<ShiftTenors>1Y, 2Y, 3Y, 5Y, 10Y</ShiftTenors>
6260+
</SurvivalProbability>
6261+
</SurvivalProbabilities>
6262+
</StressTest>
62086263
</StressTesting>
62096264
\end{minted}
62106265
\caption{Stress configuration}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#TradeId,TradeType,Maturity,MaturityTime,NPV,NpvCurrency,NPV(Base),BaseCurrency,Notional,NotionalCurrency,Notional(Base),NettingSet,CounterParty
2+
CDS,CreditDefaultSwap,2026-12-21,2.795000,-69177.875463,USD,-64058.630043,EUR,1000000.00,USD,925998.81,NS,CP
3+
Cap,Swap,2026-03-02,1.989520,4988926.691472,EUR,4988926.691472,EUR,100000000.00,EUR,100000000.00,CPTY_A,CPTY_A
4+
EUR6MSwap,Swap,2026-03-02,1.989520,5924803.709084,EUR,5924803.709084,EUR,100000000.00,EUR,100000000.00,CPTY_A,CPTY_A
5+
XccySwap,Swap,2026-01-06,1.838835,278592.728400,USD,257976.533708,EUR,102120250.00,USD,94563229.51,,A
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#TradeId,ScenarioLabel,Base NPV,Scenario NPV,Sensitivity
2+
CDS,cds_spread_par,-64058.63,-40203.77,23854.86
3+
CDS,cds_spread_zero,-64058.63,-49830.73,14227.90
4+
CDS,eur_ester_par,-64058.63,-63725.85,332.78
5+
CDS,eur_ester_par_and_FX,-64058.63,-64363.10,-304.47
6+
CDS,eur_ester_zero,-64058.63,-64055.12,3.51
7+
CDS,xccy_basis_per,-64058.63,-64996.71,-938.08
8+
CDS,xccy_basis_zero,-64058.63,-63292.51,766.12
9+
Cap,eur6m_no_caplet,4988926.69,5688615.63,699688.94
10+
Cap,eur6m_par,4988926.69,5702737.92,713811.23
11+
Cap,eur6m_zero,4988926.69,5551185.80,562259.11
12+
Cap,eur_capfloor_par,4988926.69,4413744.60,-575182.09
13+
Cap,eur_capfloor_zero,4988926.69,4411082.64,-577844.06
14+
Cap,eur_ester_par,4988926.69,4925225.31,-63701.38
15+
Cap,eur_ester_par_and_FX,4988926.69,4925225.31,-63701.38
16+
Cap,eur_ester_zero,4988926.69,4938763.65,-50163.04
17+
EUR6MSwap,eur6m_no_caplet,5924803.71,8061685.03,2136881.32
18+
EUR6MSwap,eur6m_par,5924803.71,8061685.03,2136881.32
19+
EUR6MSwap,eur6m_zero,5924803.71,7615306.91,1690503.20
20+
EUR6MSwap,eur_ester_par,5924803.71,5847119.02,-77684.69
21+
EUR6MSwap,eur_ester_par_and_FX,5924803.71,5847119.02,-77684.69
22+
EUR6MSwap,eur_ester_zero,5924803.71,5867078.77,-57724.94
23+
XccySwap,eur_ester_par,257976.53,1169385.55,911409.01
24+
XccySwap,eur_ester_par_and_FX,257976.53,215657.96,-42318.58
25+
XccySwap,eur_ester_zero,257976.53,13911.60,-244064.94
26+
XccySwap,xccy_basis_per,257976.53,-1013541.78,-1271518.32
27+
XccySwap,xccy_basis_zero,257976.53,1943677.74,1685701.20
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<Conventions>
2+
<CDS>
3+
<Id>CDS-STANDARD-CONVENTIONS</Id>
4+
<SettlementDays>0</SettlementDays>
5+
<Calendar>WeekendsOnly</Calendar>
6+
<Frequency>Quarterly</Frequency>
7+
<PaymentConvention>Following</PaymentConvention>
8+
<Rule>CDS2015</Rule>
9+
<DayCounter>A360</DayCounter>
10+
<SettlesAccrual>true</SettlesAccrual>
11+
<PaysAtDefaultTime>true</PaysAtDefaultTime>
12+
</CDS>
13+
<Deposit>
14+
<Id>EUR-DEPOSIT</Id>
15+
<IndexBased>true</IndexBased>
16+
<Index>EUR-EURIBOR</Index>
17+
</Deposit>
18+
<Deposit>
19+
<Id>EUR-ON-DEPOSIT-ESTER</Id>
20+
<IndexBased>true</IndexBased>
21+
<Index>EUR-ESTER</Index>
22+
</Deposit>
23+
<Deposit>
24+
<Id>USD-ON-SOFR-DEPOSIT</Id>
25+
<IndexBased>true</IndexBased>
26+
<Index>USD-SOFR</Index>
27+
</Deposit>
28+
<Future>
29+
<Id>USD-SOFR-3M-FUTURES</Id>
30+
<Index>USD-SOFR</Index>
31+
</Future>
32+
<Future>
33+
<Id>EURIBOR-3M-FUTURES</Id>
34+
<Index>EUR-EURIBOR-3M</Index>
35+
</Future>
36+
<FRA>
37+
<Id>EUR-6M-FRA</Id>
38+
<Index>EUR-EURIBOR-6M</Index>
39+
</FRA>
40+
<OIS>
41+
<Id>EUR-ESTER-OIS</Id>
42+
<SpotLag>1</SpotLag>
43+
<Index>EUR-ESTER</Index>
44+
<FixedDayCounter>A360</FixedDayCounter>
45+
<PaymentLag>1</PaymentLag>
46+
<EOM>false</EOM>
47+
<FixedFrequency>Annual</FixedFrequency>
48+
<FixedConvention>MF</FixedConvention>
49+
<FixedPaymentConvention>MF</FixedPaymentConvention>
50+
<Rule>Backward</Rule>
51+
</OIS>
52+
<OIS>
53+
<Id>USD-SOFR-OIS</Id>
54+
<SpotLag>0</SpotLag>
55+
<Index>USD-SOFR</Index>
56+
<FixedDayCounter>A360</FixedDayCounter>
57+
<PaymentLag>2</PaymentLag>
58+
<EOM>false</EOM>
59+
<FixedFrequency>Annual</FixedFrequency>
60+
<FixedConvention>MF</FixedConvention>
61+
<FixedPaymentConvention>MF</FixedPaymentConvention>
62+
<Rule>Backward</Rule>
63+
</OIS>
64+
<CrossCurrencyBasis>
65+
<Id>EUR-USD-ON-XCCY-BASIS</Id>
66+
<SettlementDays>2</SettlementDays>
67+
<SettlementCalendar>TARGET,US</SettlementCalendar>
68+
<RollConvention>MF</RollConvention>
69+
<FlatIndex>USD-SOFR</FlatIndex>
70+
<FlatTenor>3M</FlatTenor>
71+
<SpreadIndex>EUR-ESTER</SpreadIndex>
72+
<SpreadTenor>3M</SpreadTenor>
73+
<IsResettable>true</IsResettable>
74+
<FlatIndexIsResettable>true</FlatIndexIsResettable>
75+
</CrossCurrencyBasis>
76+
<FX>
77+
<Id>EUR-USD-FX</Id>
78+
<SpotDays>2</SpotDays>
79+
<SourceCurrency>EUR</SourceCurrency>
80+
<TargetCurrency>USD</TargetCurrency>
81+
<PointsFactor>10000</PointsFactor>
82+
<AdvanceCalendar>TARGET,US</AdvanceCalendar>
83+
<SpotRelative>true</SpotRelative>
84+
</FX>
85+
<Swap>
86+
<Id>EUR-EURIBOR-3M-SWAP</Id>
87+
<FixedCalendar>TARGET</FixedCalendar>
88+
<FixedFrequency>Annual</FixedFrequency>
89+
<FixedConvention>MF</FixedConvention>
90+
<FixedDayCounter>30/360</FixedDayCounter>
91+
<Index>EUR-EURIBOR-3M</Index>
92+
</Swap>
93+
<Swap>
94+
<Id>EUR-EURIBOR-6M-SWAP</Id>
95+
<FixedCalendar>TARGET</FixedCalendar>
96+
<FixedFrequency>Annual</FixedFrequency>
97+
<FixedConvention>MF</FixedConvention>
98+
<FixedDayCounter>30/360</FixedDayCounter>
99+
<Index>EUR-EURIBOR-6M</Index>
100+
</Swap>
101+
<TenorBasisTwoSwap>
102+
<Id>EURIBOR-3M-6M-BASIS</Id>
103+
<Calendar>TARGET</Calendar>
104+
<LongFixedFrequency>Annual</LongFixedFrequency>
105+
<LongFixedConvention>MF</LongFixedConvention>
106+
<LongFixedDayCounter>30/360</LongFixedDayCounter>
107+
<LongIndex>EUR-EURIBOR-6M</LongIndex>
108+
<ShortFixedFrequency>Annual</ShortFixedFrequency>
109+
<ShortFixedConvention>MF</ShortFixedConvention>
110+
<ShortFixedDayCounter>30/360</ShortFixedDayCounter>
111+
<ShortIndex>EUR-EURIBOR-3M</ShortIndex>
112+
<LongMinusShort>true</LongMinusShort>
113+
</TenorBasisTwoSwap>
114+
</Conventions>

0 commit comments

Comments
 (0)