Skip to content

Commit c88784c

Browse files
Merge remote-tracking branch 'origin/master' into github_modules
2 parents 32a79a8 + 79ab6fb commit c88784c

202 files changed

Lines changed: 7691 additions & 3878 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.

App/ore.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,11 @@ int main(int argc, char** argv) {
7171

7272
string inputFile(argv[1]);
7373

74-
boost::shared_ptr<Parameters> params = boost::make_shared<Parameters>();
7574
try {
75+
auto params = boost::make_shared<Parameters>();
7676
params->fromFile(inputFile);
77-
OREApp ore(params);
78-
79-
// By default we use the refactored version of ORE
80-
bool useAnalytics = true;
81-
// But we can actively switch this off and enable the old behaviour
82-
string tmp = params->get("setup", "useAnalytics", false);
83-
if (tmp != "")
84-
useAnalytics = parseBool(tmp);
85-
ore.run(useAnalytics);
77+
OREApp ore(params, true);
78+
ore.run();
8679
return 0;
8780
} catch (const exception& e) {
8881
cout << endl << "an error occurred: " << e.what() << endl;

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ option(ORE_BUILD_DOC "Build documentation" ON)
1010
option(ORE_BUILD_EXAMPLES "Build examples" ON)
1111
option(ORE_BUILD_TESTS "Build test suite" ON)
1212
option(ORE_BUILD_APP "Build app" ON)
13-
option(ORE_USE_ZLIB "Use compression for boost::iostreams" ON)
13+
option(ORE_USE_ZLIB "Use compression for boost::iostreams" OFF)
1414

1515
include(CTest)
1616

CMakePresets.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"QL_BUILD_BENCHMARK": false,
1717
"MSVC_LINK_DYNAMIC_RUNTIME": true,
1818
"MSVC_WHOLE_PROGRAM_OPTIMIZATION": true,
19-
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
19+
"ENABLE_SESSIONS": true,
2020
},
2121
"architecture": {
2222
"value": "x64",
@@ -46,6 +46,7 @@
4646
"QL_BUILD_BENCHMARK": false,
4747
"MSVC_LINK_DYNAMIC_RUNTIME": false,
4848
"MSVC_WHOLE_PROGRAM_OPTIMIZATION": false,
49+
"ENABLE_SESSIONS": true,
4950
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
5051
},
5152
"architecture": {
@@ -73,6 +74,7 @@
7374
"QL_BUILD_BENCHMARK": false,
7475
"MSVC_LINK_DYNAMIC_RUNTIME": true,
7576
"MSVC_WHOLE_PROGRAM_OPTIMIZATION": true,
77+
"ENABLE_SESSIONS": true,
7678
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
7779
},
7880
"architecture": {
@@ -100,6 +102,7 @@
100102
"QL_BUILD_BENCHMARK": false,
101103
"MSVC_LINK_DYNAMIC_RUNTIME": false,
102104
"MSVC_WHOLE_PROGRAM_OPTIMIZATION": true,
105+
"ENABLE_SESSIONS": true,
103106
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
104107
},
105108
"architecture": {

Docs/UserGuide/nettingdata.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ \subsection{Uncollateralised Netting Set}
5656
Credit Support Annex. For uncollateralised netting sets, this node is not needed.
5757
\end{itemize}
5858
%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
59-
\subsection{Collateralised Netting Set}
59+
\subsection{Collateralised Netting Set} \label{sec:CollNettingSet}
6060
%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
6161
If an ISDA agreement contains a Credit Support Annex, the
6262
portfolio exposures are eligible for collateralisation. In such a

Docs/UserGuide/parameterisation/curveconfig.tex

Lines changed: 55 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ \subsection{Curves: {\tt curveconfig.xml}}\label{sec:curveconfig}
2424
This file also contains other market objects such as FXSpots, Security Spreads and Security Rates which are necessary
2525
for the construction of a market.
2626

27-
\include{curve_configurations/yieldcurves}
28-
\include{curve_configurations/default_curves_from_cds}
29-
\include{curve_configurations/default_curves_other}
27+
\input{curve_configurations/yieldcurves}
28+
\input{curve_configurations/default_curves_from_cds}
29+
\input{curve_configurations/default_curves_other}
3030

3131
\subsubsection{Swaption Volatility Structures}
3232

@@ -68,7 +68,7 @@ \subsubsection{Swaption Volatility Structures}
6868

6969
\begin{itemize}
7070
\item CurveId: Unique identifier of the swaption volatility structure
71-
\item CurveDescription: A description of the volatility structure, may be left blank.
71+
\item CurveDescription [Optional]: A description of the volatility structure, may be left blank.
7272
\item Dimension: Distinguishes at-the-money matrices and full volatility cubes. \\ Allowable values: {\tt ATM, Smile}
7373
\item VolatilityType: Specifies the type of market volatility inputs. \\
7474
Allowable values: {\tt Normal, Lognormal, ShiftedLognormal} \\
@@ -78,25 +78,25 @@ \subsubsection{Swaption Volatility Structures}
7878
\item Calendar: The term structure's calendar used in option tenor to date conversions
7979
\item BusinessDayConvention: The term structure's business day convention used in option tenor to date conversion
8080
\item ATM Matrix specification, required for both Dimension choices:
81-
\begin{itemize}
82-
\item OptionTenors: Option expiry in period form
83-
\item SwapTenors: Underlying Swap term in period form
84-
\item ShortSwapIndexBase: Swap index (ORE naming convention, e.g. EUR-CMS-1Y) used to compute ATM strikes for tenors up to and including the tenor given in the index (1Y in this example)
85-
\item SwapIndexBase: Swap index used to compute ATM strikes for tenors longer than the one defined by the short index
86-
\end{itemize}
81+
\begin{itemize}
82+
\item OptionTenors: Option expiry in period form
83+
\item SwapTenors: Underlying Swap term in period form
84+
\item ShortSwapIndexBase: Swap index (ORE naming convention, e.g. EUR-CMS-1Y) used to compute ATM strikes for tenors up to and including the tenor given in the index (1Y in this example)
85+
\item SwapIndexBase: Swap index used to compute ATM strikes for tenors longer than the one defined by the short index
86+
\end{itemize}
8787
\item Smile section specification, this part is required when Dimension is set to {\tt Smile}, otherwise it can be omitted:
88-
\begin{itemize}
89-
\item SmileOptionTenors: Option expiries, in period form, where smile section data is to be taken into account
90-
\item SmileSwapTenors: Underlying Swap term, in period form, where smile section data is to be taken into account
91-
\item SmileSpreads: Strikes in smile direction expressed as strike spreads, relative to the ATM strike at the expiry/term point of the ATM matrix
92-
\end{itemize}
88+
\begin{itemize}
89+
\item SmileOptionTenors: Option expiries, in period form, where smile section data is to be taken into account
90+
\item SmileSwapTenors: Underlying Swap term, in period form, where smile section data is to be taken into account
91+
\item SmileSpreads: Strikes in smile direction expressed as strike spreads, relative to the ATM strike at the expiry/term point of the ATM matrix
92+
\end{itemize}
9393
\item QuoteTag [Optional]: If non-empty, a tag will be included in the market datum labels. This can be used to set up
9494
underlying specific volatility date. For example, if the quote tag is set to EUR-EURIBOR-3M, the market datum labels
9595
will be \verb+SWAPTION/RATE\_LNVOL/EUR/EUR-EURIBOR-3M/5Y/10Y/ATM+ instead of
9696
\verb+SWAPTION/RATE\_LNVOL/EUR/5Y/10Y/ATM+.
9797
\end{itemize}
9898

99-
\include{curve_configurations/capfloorvolatility}
99+
\input{curve_configurations/capfloorvolatility}
100100

101101
\subsubsection{FX Volatility Structures}
102102

@@ -212,7 +212,7 @@ \subsubsection{FX Volatility Structures}
212212

213213
\begin{itemize}
214214
\item CurveId: Unique identifier of the FX volatility structure
215-
\item CurveDescription: A description of the volatility structure, may be left blank.
215+
\item CurveDescription [Optional]: A description of the volatility structure, may be left blank.
216216
\item Dimension: Distinguishes at-the-money volatility curves from volatility surfaces. An `ATMTriangulated' value
217217
denotes a curve triangulated from two other surfaces.\\ Allowable values: {\tt ATM, Smile, ATMTriangulated}
218218
\item SmileType [Optional]: Required field in case of Dimension {\tt Smile}, otherwise it can be omitted. \\ Allowable
@@ -300,6 +300,23 @@ \subsubsection{Equity Curve Structures}
300300
\label{lst:eqcurve_configuration}
301301
\end{longlisting}
302302

303+
The meaning of each of the elements is given below.
304+
305+
\begin{itemize}
306+
\item CurveId: Unique identifier of the equity curve structure.
307+
\item CurveDescription [Optional]: A description of the equity curve structure, may be left blank.
308+
\item Currency: Currency of the equity.
309+
\item Calendar [Optional]: The term structure's calendar used in tenor to date conversions. Defaults to the calendar corresponding to \lstinline!Currency!.
310+
\item ForecastingCurve: CurveId of the curve used for discounting equity fixing forecasts.
311+
\item Type: The quote types in \lstinline!Quote! (e.g.\ option premium, forward equity price) and whether dividends are taken into account. Allowable values: {\tt DividendYield, ForwardPrice, ForwardDividendPrice, OptionPremium, NoDividends}
312+
\item ExerciseStyle [Optional]: Exercise type of the underlying option quotes. Only required if \lstinline!Type! is \emph{OptionPremium}. Allowable values: {\tt American, European}
313+
\item SpotQuote: Market datum ID/name of the current spot rate for the equity underlying.
314+
\item Quotes [Optional]: Market datum IDs/names to be used in building the curve structure.
315+
\item DayCounter [Optional]: The term structure's day counter used in date to time conversions. Defaults to {\tt A365F}.
316+
\item DividendInterpolation [Optional]: This node contains an \lstinline!InterpolationVariable! and \lstinline!InterpolationMethod! sub-node, which define the variable on which the interpolation is performed and the interpolation method for the dividend curve, respectively. The allowable values are found in Table \ref{tab:allow_interp_variables} and Table \ref{tab:allow_interp_methods}, respectively. This should not be provided if \lstinline!Type! is {\tt NoDividends}.
317+
\item Extrapolation [Optional]: Boolean flag indicating whether extrapolation is allowed. Defaults to {\tt True}.
318+
\end{itemize}
319+
303320
The equity curves here consists of a spot equity price, as well as a set of either forward prices or else dividend
304321
yields. If the index is a dividend futures index then curve type should be entered as ForwardDividendPrice. In this case the curve will be built from forward prices as normal, but excluded from the SIMM calculations as required by the SIMM methodology.
305322
Upon construction, ORE stores internally an equity spot price quote, a forecasting curve and a dividend yield
@@ -318,7 +335,7 @@ \subsubsection{Equity Volatility Structures}
318335
There are a number of fields common to all configurations:
319336
\begin{itemize}
320337
\item CurveId: Unique identifier for the curve.
321-
\item CurveDescription: A description of the curve. This field may be left blank.
338+
\item CurveDescription [Optional]: A description of the curve. This field may be left blank.
322339
\item Currency: Currency of the equity.
323340
\item Calendar [Optional]: allowable value is any valid calendar. Defaults to \lstinline!NullCalendar!.
324341
\item DayCounter [Optional]: allowable value is any valid day counter. Defaults to \lstinline!A365!.
@@ -702,6 +719,12 @@ \subsubsection{CDS Volatilities}
702719
<CDSVolatility>
703720
<CurveId>..<CurveId>
704721
<CurveDescription>...</CurveDescription>
722+
<Terms>
723+
<Term>
724+
<Label>...</Label>
725+
<Curve>...</Curve>
726+
</Term>
727+
</Terms>
705728
<Curve>
706729
<Quotes>
707730
<Quote>quote_id_1</Quote>
@@ -712,12 +735,6 @@ \subsubsection{CDS Volatilities}
712735
<Extrapolation>...</Extrapolation>
713736
<EnforceMontoneVariance></EnforceMontoneVariance>
714737
</Curve>
715-
<Terms>
716-
<Term>
717-
<Label>...</Label>
718-
<Curve>...</Curve>
719-
</Term>
720-
</Terms>
721738
<DayCounter>...</DayCounter>
722739
<Calendar>...</Calendar>
723740
</CDSVolatility>
@@ -749,16 +766,16 @@ \subsubsection{CDS Volatilities}
749766
<CDSVolatility>
750767
<CurveId>..<CurveId>
751768
<CurveDescription>...</CurveDescription>
752-
<Expiries>...</Expiries>
753-
<DayCounter>...</DayCounter>
754-
<Calendar>...</Calendar>
755-
<QuoteName>...</QuoteName>
756769
<Terms>
757770
<Term>
758771
<Label>...</Label>
759772
<Curve>...</Curve>
760773
</Term>
761774
</Terms>
775+
<Expiries>...</Expiries>
776+
<DayCounter>...</DayCounter>
777+
<Calendar>...</Calendar>
778+
<QuoteName>...</QuoteName>
762779
</CDSVolatility>
763780
\end{minted}
764781
\caption{Legacy deprecated CDS volatility curve configuration}
@@ -812,6 +829,12 @@ \subsubsection{CDS Volatilities}
812829
<CDSVolatility>
813830
<CurveId/>
814831
<CurveDescription/>
832+
<Terms>
833+
<Term>
834+
<Label>...</Label>
835+
<Curve>...</Curve>
836+
</Term>
837+
</Terms>
815838
<StrikeSurface>
816839
<Strikes>...</Strikes>
817840
<Expiries>...</Expiries>
@@ -821,12 +844,6 @@ \subsubsection{CDS Volatilities}
821844
<TimeExtrapolation>...</TimeExtrapolation>
822845
<StrikeExtrapolation>...</StrikeExtrapolation>
823846
</StrikeSurface>
824-
<Terms>
825-
<Term>
826-
<Label>...</Label>
827-
<Curve>...</Curve>
828-
</Term>
829-
</Terms>
830847
<DayCounter>...</DayCounter>
831848
<Calendar>...</Calendar>
832849
<StrikeType>...</StrikeType>
@@ -868,7 +885,7 @@ \subsubsection{Base Correlations}
868885

869886
\begin{itemize}
870887
\item CurveId: Unique identifier of the base correlation structure
871-
\item CurveDescription: A description of the base correlation structure, may be left blank.
888+
\item CurveDescription [Optional]: A description of the base correlation structure, may be left blank.
872889
\item Terms: Comma-separated list of tenors, sorted in increasing order, possibly a single term to represent a flat term structure in time-direction
873890
\item DetachmentPoints: Comma-separated list of equity tranche detachment points, sorted in increasing order\\
874891
Allowable values: Any positive number less than one
@@ -977,9 +994,9 @@ \subsubsection{Correlations}
977994
\label{lst:correlation_configuration}
978995
\end{longlisting}
979996

980-
\include{curve_configurations/commodity_curves}
997+
\input{curve_configurations/commodity_curves}
981998

982-
\include{curve_configurations/commodity_volatilities}
999+
\input{curve_configurations/commodity_volatilities}
9831000

9841001
\subsubsection{Bootstrap Configuration}
9851002
\label{sec:bootstrap_config}
@@ -1073,4 +1090,4 @@ \subsubsection{One Dimensional Solver Configuration}
10731090
\item \lstinline!UpperBound! [Optional]:
10741091
This node should hold a real number. It provides an upper bound for the search domain. If omitted, no upper bound is applied to the search domain. Obviously, if both \lstinline!LowerBound! and \lstinline!UpperBound! are provided, the value in \lstinline!LowerBound! should be less than the value in \lstinline!UpperBound!.
10751092

1076-
\end{itemize}
1093+
\end{itemize}

0 commit comments

Comments
 (0)