Skip to content

Commit 957ff87

Browse files
author
jenkins
committed
git subrepo pull (merge) ore
subrepo: subdir: "ore" merged: "c3f5db2f47" upstream: origin: "git@gitlab.acadiasoft.net:qs/ore.git" branch: "master" commit: "9bb1303269" git-subrepo: version: "0.4.6" origin: "https://github.com/ingydotnet/git-subrepo" commit: "110b9eb"
2 parents fb32eac + 9bb1303 commit 957ff87

109 files changed

Lines changed: 3722 additions & 1117 deletions

File tree

Some content is hidden

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

Docker/.env

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ DEBIAN_TAG=11.7
55

66
QL_TAG=1.31.1_d2327d5a7135
77
ORE_TAG=latest
8-
BOOST_TAG=1.78.0
9-
BOOST_DIR=1_78_0
108

119
# debug or release
1210

Docs/UserGuide/userguide.tex

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6000,6 +6000,7 @@ \subsection{Sensitivity Analysis: {\tt sensitivity.xml}}\label{sec:sensitivity}
60006000
\item {\tt ShiftType:} Both absolute or relative shifts can be used to compute a sensitivity, specified by the key words
60016001
{\tt Absolute} resp. {\tt Relative}.
60026002
\item {\tt ShiftSize:} The size of the shift to apply.
6003+
\item {\tt ShiftScheme:} The finite difference scheme to use ({\tt Forward}, {\tt Backward}, {\tt Central}), if not given, this parameter defaults to {\tt Forward}
60036004
\item {\tt ShiftTenors:} For curves, the tenor buckets to apply shifts to, given as a comma separated list of periods.
60046005
\item {\tt ShiftExpiries:} For volatility surfaces, the option expiry buckets to apply shifts to, given as a comma
60056006
separated list of periods.
@@ -6012,6 +6013,53 @@ \subsection{Sensitivity Analysis: {\tt sensitivity.xml}}\label{sec:sensitivity}
60126013
\item {\tt CurveType:} In the context of Yield Curves used to identify an equity ``risk free'' rate forecasting curve; set to {\tt EquityForecast} in this case
60136014
\end{itemize}
60146015

6016+
The ShiftType, ShiftSize, ShiftScheme nodes take an optional attribute key that allows to configure different values for
6017+
different sensitivity templates. The sensitivity templates are defined in the pricing engine configuration. This is best
6018+
explained by an example: In Example 15 the product type BermudanSwaption has a sensitivity template \verb+IR_FD+
6019+
attached, see \ref{lst:sensi_template}. This can be used to specify different shifts for trades that were built against
6020+
this engine configuration, see \ref{lst:sensi_config_template}: For Bermudan swaptions a larger shift size of 10bp and a
6021+
central difference scheme is used to compute discount curve sensitivities in EUR. Since no separate shift type is
6022+
specified, the default shift type {\tt Absolute} is used. Note regarding the reports:
6023+
6024+
\begin{itemize}
6025+
\item the sensi scenario report contains scenario NPVs related to the possibly product specific configured shift sizes
6026+
\item the sensi report contains renormalized sensitivities, i.e. sensitivities are always expressed w.r.t. the default shift sizes
6027+
\item the sensi config report only contains the default configuration
6028+
\end{itemize}
6029+
6030+
\begin{longlisting}
6031+
\begin{minted}[fontsize=\scriptsize]{xml}
6032+
<Product type="BermudanSwaption">
6033+
<Model>LGM</Model>
6034+
<ModelParameters>
6035+
...
6036+
</ModelParameters>
6037+
<Engine>Grid</Engine>
6038+
<EngineParameters>
6039+
...
6040+
<Parameter name="SensitivityTemplate">IR_FD</Parameter>
6041+
</EngineParameters>
6042+
</Product>
6043+
\end{minted}
6044+
\caption{Sensitivity template definition}
6045+
\label{lst:sensi_template}
6046+
\end{longlisting}
6047+
6048+
\begin{longlisting}
6049+
\begin{minted}[fontsize=\scriptsize]{xml}
6050+
<DiscountCurve ccy="EUR">
6051+
<ShiftType>Absolute</ShiftType>
6052+
<ShiftSize>0.0001</ShiftSize>
6053+
<ShiftScheme>Forward</ShiftScheme>
6054+
<ShiftSize key="IR_FD">0.001</ShiftSize>
6055+
<ShiftScheme key="IR_FD">Central</ShiftScheme>
6056+
<ShiftTenors>6M,1Y,2Y,3Y,5Y,7Y,10Y,15Y,20Y</ShiftTenors>
6057+
</DiscountCurve>
6058+
\end{minted}
6059+
\caption{Sensitivity template definition}
6060+
\label{lst:lst:sensi_config_template}
6061+
\end{longlisting}
6062+
60156063
The cross gamma filter section contains a list of pairs of sensitivity keys. For each possible pair of sensitivity keys
60166064
matching the given strings, a cross gamma sensitivity is computed. The given pair of keys can be (and usually are)
60176065
shorter than the actual sensitivity keys. In this case only the prefix of the actual key is matched. For example, the

Examples/Example_15/ExpectedOutput/flows.csv

Lines changed: 115 additions & 115 deletions
Large diffs are not rendered by default.

Examples/Example_15/ExpectedOutput/npv.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#TradeId,TradeType,Maturity,MaturityTime,NPV,NpvCurrency,NPV(Base),BaseCurrency,Notional,NotionalCurrency,Notional(Base),NettingSet,CounterParty
2-
BERMUDAN_SWAPTION,Swaption,2038-10-01,22.652317,-3140651.967156,EUR,-3140651.967156,EUR,10000000.00,EUR,10000000.00,CPTY_A,CPTY_A
2+
BERMUDAN_SWAPTION,Swaption,2038-10-01,22.652317,-3115851.065563,EUR,-3115851.065563,EUR,10000000.00,EUR,10000000.00,CPTY_A,CPTY_A
33
BOND,Bond,2021-02-03,4.994783,12902649.282760,EUR,12902649.282760,EUR,10000000.00,EUR,10000000.00,CPTY_A,CPTY_A
44
Bond_Floating,Bond,2021-02-03,4.994783,10765048.489931,EUR,10765048.489931,EUR,10000000.00,EUR,10000000.00,,CPTY_C
55
CAP_EUR,CapFloor,2026-02-09,10.011221,-6881.951398,EUR,-6881.951398,EUR,1000000.00,EUR,1000000.00,CPTY_A,CPTY_A
66
CAP_USD,CapFloor,2026-02-09,10.011221,-14245.033135,USD,-12580.206366,EUR,1000000.00,USD,883129.32,CPTY_A,CPTY_A
77
CC_SWAP_EUR_USD,Swap,2026-02-05,10.000262,-23643219.533172,USD,-20880020.288282,EUR,100000000.00,USD,88312931.57,CPTY_A,CPTY_A
8-
CC_SWAP_EUR_USD_RESET,Swap,2026-02-05,10.000262,-22174553.893030,USD,-19582998.606448,EUR,100000000.00,USD,88312931.57,CPTY_A,CPTY_A
8+
CC_SWAP_EUR_USD_RESET,Swap,2026-02-05,10.000262,-22174553.893030,USD,-19582998.606449,EUR,100000000.00,USD,88312931.57,CPTY_A,CPTY_A
99
CDS,CreditDefaultSwap,2026-03-20,10.118070,805.422071,USD,711.291842,EUR,10000000.00,USD,8831293.16,CPTY_B,CPTY_B
1010
CPI_Swap,Swap,2021-07-19,5.449577,829612.548929,GBP,1021768.347989,EUR,10000000.00,GBP,12316211.34,CPTY_A,CPTY_A
1111
EQ_CALL_LUFT,EquityOption,2018-03-01,2.066015,1872.588407,EUR,1872.588407,EUR,9486.00,EUR,9486.00,CPTY_A,CPTY_A

0 commit comments

Comments
 (0)