Skip to content

Commit 4ba1495

Browse files
rolandlichtersjenkins
authored andcommitted
merge with master
1 parent f09e6cf commit 4ba1495

3 files changed

Lines changed: 121 additions & 134 deletions

File tree

Docs/UserGuide/userguide.tex

Lines changed: 85 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
%\title{Open Source Risk Engine \\ User Guide }
129129
\title{ORE User Guide}
130130
\author{Acadia Inc.}
131-
\date{27 March 2023}
131+
\date{3 March 2023}
132132
\maketitle
133133

134134
\newpage
@@ -149,7 +149,7 @@ \section*{Document History}
149149
30 June 2021 & Acadia & updates for release 6\\
150150
16 September 2022 & Acadia & updates for release 7\\
151151
6 December 2022 & Acadia & updates for release 8\\
152-
27 March 2023 & Acadia & updates for release 9\\
152+
3 March 2023 & Acadia & updates for release 9\\
153153
\hline
154154
\end{supertabular}
155155
\end{center}
@@ -221,15 +221,25 @@ \subsubsection*{Scope and Roadmap}
221221
The sensitivity framework yields further {\bf market risk measures} such as ORE's parametric Value at Risk which takes deltas, vegas, gammas and cross gammas into account. This may be used to benchmark initial margin models such ISDA's Standard Initial Margin Model. \\
222222

223223
\medskip
224-
Subsequent ORE releases will also compute {\bf regulatory capital charges} for counterparty credit risk under the new standardised approach (SA-CCR), and the Monte Carlo based market risk measures will be complemented by parametric methods, e.g. for benchmarking various initial margin calculation models applied in cleared and non-cleared derivatives business.
224+
Subsequent ORE releases will also compute {\bf regulatory capital charges} for counterparty credit risk under the standardised approach (SA-CCR), and the market risk measures will be extended , e.g. for benchmarking various initial margin calculation models applied in cleared and non-cleared derivatives business.
225+
226+
\medskip
227+
In September 2022 Acadia announced to contribute a wide range of financial instruments (currently in its proprietary extension of ORE) in a series of quarterly releases:
228+
\begin{itemize}
229+
\item Commodity products (Swaps, Basis Swaps, Av. Price Options, Swaptions), released December 22 with ORE v8
230+
\item Credit products (Index CDS and Index CDS Options, Credit-Linked Swaps, Synthetic CDOs), released March 23 with ORE v9
231+
\item Bond products and Hybrids (Bond Options, Bond Repos, Bond TRS, Convertible Bonds, Generic TRS with mixed basket underlyings, CFDs), to be released in June 23
232+
\item Exotics (Scripted trade framework for modelling highly structured hybrid payoffs such as Accumulators, TARFs, PRDCs, etc.), to be released in September 23
233+
\end{itemize}
234+
These contributions were (and will be) accompanied by analytics extensions to enhance ORE usability:
235+
\begin{itemize}
236+
\item Credit exposure including Commodity and American Monte Carlo for Exotics, released in December 22 with ORE v8
237+
\item Market Risk including multi-threaded sensitivities, par sensitivity, delta/gamma VaR, released in March 23 with ORE v9
238+
\item Portfolio Credit Model, to be released in June 23
239+
\end{itemize}
225240

226241
\medskip
227-
%The first release of ORE in October 2016 covers the simulation of interest rate and FX risk factors and
228-
%portfolios of Interest Rate Swaps, Caps/Floors, Swaptions, FX Forwards, Cross Currency Swaps and FX Options. Subsequent
229-
%releases from Q1 2017 onwards will extend the derivative product and the risk factor range to Inflation, Credit, Equity
230-
%and Commodity. With the introduction of credit risk factors, the scope will also be extended to cover cash products
231-
%(loans and bonds) and related portfolio analytics.
232-
The product coverage of the seventh release of ORE in September 2022 is sketched in Table \ref{tab_coverage}.
242+
The product coverage of the 9th release of ORE in March 2023 is sketched in Table \ref{tab_coverage}.
233243
\begin{table}[hbt]
234244
\scriptsize
235245
\begin{center}
@@ -281,17 +291,20 @@ \subsubsection*{Scope and Roadmap}
281291
\hline
282292
Year-on-Year Inflation Caps/Floors & Y & Y & N & N\\
283293
\hline
284-
Credit Default Swaps & Y & Y & N & N \\
294+
Credit Default Swaps, Options & Y & Y & N & Y \\
295+
\hline
296+
Index Credit Default Swaps, Options & Y & Y & N & Y \\
297+
\hline
298+
Credit Linked Swaps & Y & Y & N & Y \\
299+
\hline
300+
Index Tranches, Synthetic CDOs & Y & Y & N & Y \\
285301
\hline
286-
287302
\end{tabular}
288303
\caption{ORE product coverage. FX/Equity Exotics include Barrier, Digital, Digital Barrier (FX only), Double Barrier, European Barrier, KIKO Barrier (FX only), Touch and Double Touch Options.}
289304
\label{tab_coverage}
290305
\end{center}
291306
\end{table}
292307

293-
Future releases will further extend the product range and analytics coverage indicated in the table above, expand on the market risk analytics, add integrated credit/market risk analytics.
294-
295308
\medskip The simulation models applied in ORE's risk factor evolution implement the models discussed in detail in {\em
296309
Modern Derivatives Pricing and Credit Exposure Analysis} \cite{Lichters}: The IR/FX/INF/EQ risk factor evolution is based on
297310
a cross currency model consisting of an arbitrage free combination of Linear Gauss Markov models for all interest rates
@@ -320,92 +333,92 @@ \subsubsection*{Organisation of this document}
320333
\section{Release Notes}\label{sec:releasenotes}
321334
%========================================================
322335

323-
This section summarises the notable changes between release 7 (September 2022) and 8 (December 2022).
336+
This section summarises the notable changes between release 8 (December 2022) and 9 (March 2023).
324337

325338
\bigskip
326339
INSTRUMENTS
327340
\begin{itemize}
328-
\item roll out Commodity derivatives, thanks to Acadia Inc., as announced in September 22:
341+
\item roll out of Credit derivatives, thanks to Acadia Inc., as announced in September 22:
329342
\begin{itemize}
330-
\item add Commodity Swap
331-
\item add Commodity Swaption
332-
\item add Commodity Average Price Option
333-
\item add Commodity Option Strips and Digital Option Strip
343+
\item Bond Option
344+
\item Bond Repo
345+
\item Bond Total Return Swap
346+
\item Credit-Linked Swap
347+
\item Index Credit Default Swap
348+
\item Index Credit Default Swap Option
349+
\item Credit Index Tranche, Synthetic CDO
334350
\end{itemize}
335-
see user guide and in particular Example 24
336-
\item add Equity Cliquet Option, missed in the 7th release, thanks to Acadia
337-
\item add Equity/FX/Commodity Variance Swap, missed in the 7th release, thanks to Acadia
338-
\item introduce separate trade types for Cross Currency and Inflation Swap
339-
\item merge QuantExt and QuantLib CDS and midpoint engine in ORE's QuantLib fork;
340-
QuantLib pull request to follow
351+
including related models and pricing engines
352+
\item optimize performance for the analytical Commodity Swaption engine
353+
\item add missing FxIndex registrations in Commodity APO and Commodity Indexed Average Cashflows
354+
\item include leg NPVs in additional results of CDS products
355+
\item fix LGM Swaption pricing for cases where fixing date < exercise date
341356
\end{itemize}
342357

343358
\bigskip
344-
MARKETS
359+
MARKETS \& TERM STRUCTURES
345360

346361
\begin{itemize}
347-
\item performance optimizations for curve builders
348-
\item extend the market interface to optionally handle precious metals and crypto currencies as commodities instead of FX
349-
\end{itemize}
350-
351-
\bigskip
352-
TERM STRUCTURES
353-
354-
\begin{itemize}
355-
\item (no notable changes)
362+
\item fix shifted lognormal Swaption vol surface (SwaptionVolCubeWithATM, add missing shift)
356363
\end{itemize}
357364

358365
\bigskip
359366
ANALYTICS
360367

361368
\begin{itemize}
362-
\item add American Monte Carlo simulation components to support fast Bermudan Swaption
363-
exposure simulation and more, thanks to Acadia;\\
364-
the integration into the ORE command line app will follow with the next release (March 23)
365-
as it requires some refactoring.
366-
\item add Commodity simulation to the cross asset model and market simulation, integraded
367-
with the LGM-based Cross Asset Model, thanks to Acadia
368-
\item add a multi-factor Hull-White / FX / Commodity simulation model, thanks to Acadia;
369-
calibration to be added
369+
\item integrate American Monte Carlo simulation, see the {\bf new Example 39}
370+
\item add Par Sensitivity Analysis, see the {\bf new Example 40}
371+
\item add more parametric VaR types (delta-gamma normal, delta-gamma Saddlepoint)
372+
\item support multi-threading in sensitivity analysis
373+
\item support multi-threading in exposure simulation, see the {\bf new Example 41}
374+
\item fix exposure/XVA analytics with simulation of fixings for ceased IBOR indices
370375
\end{itemize}
371376

372377
\bigskip
373378
TESTS
374379

375380
\begin{itemize}
376-
\item QuantExt: 242 test functions (vs 214 in the previous release)
377-
\item OREData: 199 test functions (vs. 192 in the previous release)
378-
\item OREAnalytics: 66 test functions (vs. 65 in the previous release)
381+
\item QuantExt: 263 test functions (vs 242 in the previous release)
382+
\item OREData: 203 test functions (vs. 199 in the previous release)
383+
\item OREAnalytics: 68 test functions (vs. 66 in the previous release)
379384
\end{itemize}
380-
with associated increases in the number of data driven test cases
381385

382386
\bigskip
383387
DOCUMENTATION
384388

385389
\begin{itemize}
386-
\item the user guide is maintained continuously incorporating user feedback, in particular
387-
from Acadia service clients; it has grown from 404 to 440 pages, mainly due to the
388-
migration of Commodity and Equity/FX instruments into ORE
390+
\item The user guide has grown from 440 to 480 pages, mainly due to the
391+
migration of Credit derivative instruments into ORE, as well as new examples
389392
\end{itemize}
390393

391394
\bigskip
392395
LANGUAGE BINDUNGS
393396

394397
\begin{itemize}
395-
\item maintenance to ensure ORE SWIG wrappers build with the current ORE release,
396-
QuantLib-1.28 and QuantLib-SWIG-1.28
397-
\end{itemize}
398+
\item The SWIG wrapper has been extended to provide access to ORE input
399+
construction in memory and to query in-memory results (reports etc), in line
400+
with the refactoring mentioned below.
401+
See the {\bf new Python example} OREAnalytics-SWIG/Python/Examples/ore3.py
402+
\item To facilitate access to ORE Python, we are providing Python wheels for various
403+
OS types and Python versions starting with this release, thanks to Eric Ehlers's
404+
effort and Luigi Ballabio's support to get in up and running using github actions.
405+
See the \href{https://github.com/OpenSourceRisk/ORE-SWIG#readme}{ORE-SWIG repository} for {\bf how to install the ORE module}.
406+
\end{itemize}
398407

399408
\bigskip
400409
OTHER
401410

402411
\begin{itemize}
403-
\item changes to build with QuantLib 1.28
404-
\item extend the CMake setup for Windows / Visual Studio users; \\
405-
We will stop maintaining the *.vcxproj and *.vcxproj.filters from the now on
406-
and rely on CMakeLists for both *nix and Windows. \\
407-
See section 4.2.3 on how to "Generate Visual Studio Projects with CMake"
408-
\end{itemize}
412+
\item Refactor the serialization of NPV cube and market cube (aggregation scenario data)
413+
\item Refactor OREAnalytics/orea/app by separating input construction from processing
414+
and persisting results. This is to faciliate re-using the processing element
415+
(analyticsManager->runAnalytics(...)) in different applications, a command line
416+
application such as ore[.exe] that reads/writes from/to files, an ORE Python wrapper
417+
that receives input and provides results in memory (see language bindings above),
418+
or a REST service built around ORE. Results (reports, cubes etc) are stored in
419+
memory and only saved to files on demand. Inputs for the ORE processor can be
420+
assembled in memory, or read from files.
421+
\end{itemize}
409422

410423
%========================================================
411424
\section{ORE Data Flow}\label{sec:process}
@@ -999,11 +1012,11 @@ \section{Examples}\label{sec:examples}
9991012
\hline
10001013
38 & Cross Currency Exposure using Multifactor Hull-White Models \\
10011014
\hline
1002-
39 & EPE and ENE computed with AMC valuation engine \\
1015+
39 & Exposure Simulation using American Monte Carlo \\
10031016
\hline
1004-
40 & Sensitivity analysis including par sensitivities \\
1017+
40 & Par Sensitivity Analysis \\
10051018
\hline
1006-
41 & Exposure generation using multithreaded valuation engine \\
1019+
41 & Multi-threaded Exposure Simulation \\
10071020
\end{tabular}
10081021
\caption{ORE examples.}
10091022
\label{tab_0}
@@ -2536,22 +2549,7 @@ \subsection{Exposure Simulation using American Monte Carlo}% Example 39
25362549
\label{epe_fxoption}
25372550
\end{figure}
25382551

2539-
%--------------------------------------------------------------------
2540-
\subsection{Sensitivity analysis including par sensitivities}% Example 40
2541-
\label{example:40}
2542-
%--------------------------------------------------------------------
2543-
2544-
The example in folder {\tt Examples/Example\_40} demonstrates the generation of zero and par sensitivities.
2545-
2546-
%--------------------------------------------------------------------
2547-
\subsection{Sensitivity analysis including par sensitivities}% Example 41
2548-
\label{example:41}
2549-
%--------------------------------------------------------------------
2550-
2551-
The example in folder {\tt Examples/Example\_41} uses the multithreaded valuation engine to generate the exposure for a
2552-
portfolio of 8 copies of the vanilla swap in example 1.
2553-
2554-
\subsubsection{Analytic Configuration}
2552+
\subsubsection*{Analytic Configuration}
25552553

25562554
To use the AMC engine for an XVA simulation the following needs to be added to the {\tt simulation} analytic in {\tt ore.xml}:
25572555

@@ -2894,6 +2892,15 @@ \subsection{Par Sensitivity Analysis}% Example 40
28942892
Finally note that par sensitivity analysis requires that the shift tenor grid in the sensitivity data above matches the corresponding grid in the simulation (market) configuration.
28952893
See also section \ref{sec:sensitivity}.
28962894

2895+
%--------------------------------------------------------------------
2896+
\subsection{Multi-threaded Exposure Simultion}% Example 41
2897+
\label{example:41}
2898+
%--------------------------------------------------------------------
2899+
2900+
The example in folder {\tt Examples/Example\_41} demonstrates the multithreaded valuation engine to generate the exposure for a
2901+
portfolio of 8 copies of the vanilla swap in {\tt Example\_1}.
2902+
2903+
28972904
\clearpage
28982905
%========================================================
28992906
\section{Launchers and Visualisation}\label{sec:visualisation}

News.txt

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Changes for the 9th ORE release (1.8.9.0):
22
============================================
33

44
ORE 1.8.9.0 includes the following notable changes, details can be
5-
found in the commits between December 2022 and March 2023.
5+
found in the commits between December 2022 and beginning of March 2023.
66

77
INSTRUMENTS
88
- roll out of Credit derivatives, thanks to Acadia Inc., as announced in September 22:
@@ -12,30 +12,53 @@ INSTRUMENTS
1212
* Credit-Linked Swap
1313
* Index Credit Default Swap
1414
* Index Credit Default Swap Option
15-
* Credit Index Tranches
16-
Including related models and pricing engines
15+
* Credit Index Tranche, Synthetic CDO
16+
including related models and pricing engines
17+
- optimize performance for the analytical Commodity Swaption engine
18+
- add missing FxIndex registrations in Commodity APO and Commodity Indexed Average Cashflows
19+
- include leg NPVs in additional results of CDS products
20+
- fix LGM Swaption pricing for cases where fixing date < exercise date
1721

1822
MARKETS & TERM STRUCTURES
19-
-
23+
- fix shifted lognormal Swaption vol surface (SwaptionVolCubeWithATM, add missing shift)
2024

2125
ANALYTICS
22-
- integrate American Monte Carlo simulation, add related Example 39
23-
- add par sensitivity analysis, see example ???
24-
- add more parametric VaR types (delta-gamma normal, delta-gamma Saddlepoint), see example ???
25-
- add multi-threaded valuation engine for sensitivity analysis, see example ???
26+
- integrate American Monte Carlo simulation, see the new Example 39
27+
- add Par Sensitivity Analysis, see the new Example 40
28+
- add more parametric VaR types (delta-gamma normal, delta-gamma Saddlepoint)
29+
- support multi-threading in sensitivity analysis
30+
- support multi-threading in exposure simulation, see the new Example 41
31+
- fix exposure/XVA analytics with simulation of fixings for ceased IBOR indices
2632

2733
TEST
28-
-
34+
- QuantExt: 263 test functions (vs 242 in the previous release)
35+
- OREData: 203 test functions (vs. 199 in the previous release)
36+
- OREAnalytics: 68 test functions (vs. 66 in the previous release)
2937

3038
DOCUMENTATION
31-
- the user guide has grown from 440 to 475 pages, mainly due to the
32-
migration of Credit derivative instruments into ORE
39+
- The user guide has grown from 440 to 480 pages, mainly due to the
40+
migration of Credit derivative instruments into ORE, as well as new examples
3341

3442
LANGUAGE BINDINGS
35-
-
43+
- The SWIG wrapper has been extended to provide access to ORE input
44+
construction in memory and to query in-memory results (reports etc), in line
45+
with the refactoring mentioned below.
46+
See the new Python example OREAnalytics-SWIG/Python/Examples/ore3.py
47+
- To facilitate access to ORE Python, we are providing Python wheels for various
48+
OS types and Python versions starting with this release, thanks to Eric Ehlers's
49+
effort and Luigi Ballabio's support to get in up and running using github actions.
50+
See the ORE-SWIG repository for how to install the ORE module.
3651

3752
OTHER
38-
-
53+
- Refactor the serialization of NPV cube and market cube (aggregation scenario data)
54+
- Refactor OREAnalytics/orea/app by separating input construction from processing
55+
and persisting results. This is to faciliate re-using the processing element
56+
(analyticsManager->runAnalytics(...)) in different applications, a command line
57+
application such as ore[.exe] that reads/writes from/to files, an ORE Python wrapper
58+
that receives input and provides results in memory (see language bindings above),
59+
or a REST service built around ORE. Results (reports, cubes etc) are stored in
60+
memory and only saved to files on demand. Inputs for the ORE processor can be
61+
assembled in memory, or read from files.
3962

4063

4164
Changes for the 8th ORE release (1.8.8.0):

OREAnalytics/orea/app/inputparameters.hpp

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -625,49 +625,6 @@ inline const std::string& InputParameters::marketConfig(const std::string& conte
625625
auto it = marketConfigs_.find(context);
626626
return (it != marketConfigs_.end() ? it->second : Market::defaultConfiguration);
627627
}
628-
629-
/*
630-
//! Traditional ORE input via ore.xml and various files, output into files
631-
class OREAppInputParameters : public InputParameters {
632-
public:
633-
OREAppInputParameters(const boost::shared_ptr<Parameters>& params) : params_(params) {
634-
loadParameters();
635-
}
636-
637-
void loadParameters() override;
638-
void writeOutParameters() override;
639-
640-
const boost::shared_ptr<CSVLoader>& csvLoader() { return csvLoader_; }
641-
642-
//! map internal report name to the configured external file name
643-
const std::map<std::string, std::string>& fileNameMap() { return fileNameMap_; }
644-
std::string outputFileName(const std::string& internalName, const std::string& suffix);
645-
646-
private:
647-
boost::shared_ptr<Parameters> params_;
648-
boost::shared_ptr<CSVLoader> csvLoader_;
649-
650-
std::map<std::string, std::string> fileNameMap_;
651-
652-
std::string npvOutputFileName_;
653-
std::string cashflowOutputFileName_;
654-
std::string curvesOutputFileName_;
655-
std::string scenarioDumpFileName_;
656-
std::string cubeFileName_;
657-
std::string mktCubeFileName_;
658-
std::string rawCubeFileName_;
659-
std::string netCubeFileName_;
660-
std::string dimEvolutionFileName_;
661-
std::vector<std::string> dimRegressionFileNames_;
662-
std::string sensitivityFileName_;
663-
std::string sensitivityScenarioFileName_;
664-
std::string parSensitivityFileName_;
665-
std::string jacobiFileName_;
666-
std::string jacobiInverseFileName_;
667-
std::string stressTestFileName_;
668-
std::string varFileName_;
669-
};
670-
*/
671628

672629
//! Traditional ORE input via ore.xml and various files, output into files
673630
class OutputParameters {

0 commit comments

Comments
 (0)