Skip to content

Commit b3c9506

Browse files
author
jenkins
committed
git subrepo pull (merge) ore
subrepo: subdir: "ore" merged: "abf9df89bf" upstream: origin: "git@gitlab.acadiasoft.net:qs/ore.git" branch: "master" commit: "d38dc885fd" git-subrepo: version: "0.4.6" origin: "https://github.com/ingydotnet/git-subrepo" commit: "110b9eb"
2 parents f8994be + d38dc88 commit b3c9506

13 files changed

Lines changed: 279 additions & 74 deletions

File tree

Docker/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ DEBIAN_TAG=11.7
33
# it's recommended to include CMAKE_BUILD_TYPE and BOOST_VARIANT in QL_TAG, ORE_TAG, BOOST_TAG
44
# to distinguish a release build from a debug build
55

6-
QL_TAG=1.31.1_55f433ce8
6+
QL_TAG=1.31.1_d2327d5a7135
77
ORE_TAG=latest
88
BOOST_TAG=1.78.0
99
BOOST_DIR=1_78_0

Docs/AMC/amc.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ \subsection{Pricing Engine Configuration}\label{sec:pricing_engine_config}
256256
257257
\begin{enumerate}
258258
\item \verb+Training.Sequence+: The sequence type for the traning phase, can be \verb+MersenneTwister+,
259-
\verb+MersenneTwisterAntithetc+, \verb+Sobol+ or \verb+SobolBrownianBridge+
259+
\verb+MersenneTwisterAntithetc+, \verb+Sobol+, \verb+Burley2020Sobol+, \verb+SobolBrownianBridge+,
260+
\verb+Burley2020SobolBrownianBridge+
260261
\item \verb+Training.Seed+: The seed for the random number generation in the training phase
261262
\item \verb+Training.Samples+: The number of samples to be used for the training phase
262263
\item \verb+Pricing.Sequence+: The sequence type for the pricing phase, same values allowed as for training

Docs/ScriptedTrade/docs/models.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ \subsection{Pricing Engine Configuration}\label{pricingengine_config}
111111
\item RegressionOrder: The order of the polynomial basis to compute conditional expectations via regression
112112
analysis. Applies to MC only.
113113
\item SequenceType: The sequence type used for pricing. Defaults to SobolBrownianBridge. Possible values
114-
SobolBrownianBridge, MersenneTwister, MersenneTwisterAnithetic, Sobol. Applies to MC only.
114+
SobolBrownianBridge, Burley2020SobolBrownianBridge, MersenneTwister, MersenneTwisterAnithetic, Sobol,
115+
Burley2020Sobol. Applies to MC only.
115116
\item PolynomType: The polynom type used for regression analysis. Defaults to Monomial. Possible values Monomial,
116117
Laguerre, Hermite, Hyperbolic, Legendre, Chebyshev, Chebychev2nd. Applies to MC only.
117118
\item TrainingSamples: If given, pricing and training are separate phases and traning phase is using this number of

Docs/UserGuide/parameterisation/simulation.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,18 @@
5656
%\item {\tt Scenario: } Choose between {\em Simple } and {\em Complex } implementations, the latter optimized for
5757
% more efficient memory usage. \todo[inline]{Remove Scenario choice}
5858
\item {\tt DayCounter:} Day count convention used to translate dates to times. Optional, defaults to ActualActual ISDA.
59-
\item {\tt Sequence:} Choose random sequence generator ({\em MersenneTwister, MersenneTwisterAntithetic, Sobol,
60-
SobolBrownianBridge}).
59+
\item {\tt Sequence:} Choose random sequence generator ({\em MersenneTwister, MersenneTwisterAntithetic,
60+
Sobol,Burley2020Sobol, SobolBrownianBridge, Burley2020SobolBrownianBridge}).
6161
\item {\tt Seed:} Random number generator seed
6262
\item {\tt Samples:} Number of Monte Carlo paths to be produced
6363
%\item {\tt Fixings: } Choose whether fixings should be simulated or not, and if so which fixing simulation method to
6464
use ({\em Backward, Forward, BestOfForwardBackward, InterpolatedForwardBackward}), which number of forward horizon days
6565
to use if one of the {\em Forward } related methods is chosen.
66-
\item {\tt Ordering:} If the sequence type {\em SobolBrownianBridge} is used, ordering of variates ({\em Factors, Steps,
67-
Diagonal})
68-
\item {\tt DirectionIntegers:} If the sequence type {\em SobolBrownianBridge} or {\em Sobol} is used, type of direction
69-
integers in Sobol generator ({\em Unit, Jaeckel, SobolLevitan, SobolLevitanLemieux, JoeKuoD5, JoeKuoD6, JoeKuoD7, Kuo,
70-
Kuo2, Kuo3})
66+
\item {\tt Ordering:} If the sequence type {\em SobolBrownianBridge} or {\em Burley2020SobolBrownianBridge} is used,
67+
ordering of variates ({\em Factors, Steps, Diagonal})
68+
\item {\tt DirectionIntegers:} If the sequence type {\em SobolBrownianBridge}, {\em Burley2020SobolBrownianBridge}, {\em
69+
Sobol} or {\em Burley2020Sobol} is used, type of direction integers in Sobol generator ({\em Unit, Jaeckel,
70+
SobolLevitan, SobolLevitanLemieux, JoeKuoD5, JoeKuoD6, JoeKuoD7, Kuo, Kuo2, Kuo3})
7171
\item {\tt CloseOutLag}: If this tag is present, this specifies the close-out period length (e.g. 2W) used; otherwise no close-out grid is built. The close-out grid is an auxiliary time grid that is offset from the main default date grid by the close-out period, typically set to the applicable margin period of risk. If present, it is used to evolve the portfolio value and determine close-out values associated with the preceding default date valuation.
7272
\item {\tt MporMode}: This tag is expected if the previous one is present, permissible values are then {\tt StickyDate} and {\tt ActualDate}. {\tt StickyDate} means that only market data is evolved from the default date to close-out date for close-out date valuation, the valuation as of date remains unchanged and trades do not ``age'' over the period. As a consequence, exposure evolutions will not show spikes caused by cash flows within the close-out period. {\tt ActualDate} means that trades will also age over the close-out period so that one can experience exposure evolution spikes due to cash flows.
7373
\end{itemize}
@@ -797,4 +797,4 @@
797797
\label{lst:simulation_market_configuration}
798798
\end{longlisting}
799799
800-
\todo[inline]{Comment on cap/floor surface structure and reaction to time decay}
800+
\todo[inline]{Comment on cap/floor surface structure and reaction to time decay}

Docs/UserGuide/tradedata/equitycliquetoption.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ \subsubsection{Equity Cliquet Option}
4040
<OptionType>Call</OptionType>
4141
<Moneyness>1.0</Moneyness>
4242
<LocalCap>0.07</LocalCap>
43-
<LocalFloor></LocalFloor>
44-
<GlobalCap></GlobalCap>
43+
<LocalFloor>-0.06</LocalFloor>
44+
<GlobalCap>0.07</GlobalCap>
4545
<GlobalFloor>-0.07</GlobalFloor>
4646
<ScheduleData>
4747
<Dates>
@@ -84,13 +84,13 @@ \subsubsection{Equity Cliquet Option}
8484
\item Moneyness: Adjustment of option return. The moneyness M each forward starting option is being struck at.\\
8585
Allowable values: Any real number. Expressed in decimal form where 1.0 is at-the-money, 1.1 is 110\% of the at-the-money strike, 0.9 is 90\% of the at-the-money strike, etc.
8686
\item LocalCap[Optional]: The local cap, $cap_{l}$, in each of the option return. \\
87-
Allowable values: Any real number. If left blank or omitted, no local cap is applied.
87+
Allowable values: Any real number. If omitted, no local cap is applied. Can't be left blank.
8888
\item LocalFloor[Optional]: The local floor, $floor_{l}$, in each of the option return. \\
89-
Allowable values: Any real number. If left blank or omitted, no local floor is applied.
89+
Allowable values: Any real number. If omitted, no local floor is applied. Can't be left blank.
9090
\item GlobalCap[Optional]: The global cap, $cap_{g}$, for the option return. \\
91-
Allowable values: Any real number. If left blank or omitted, no global cap is applied.
91+
Allowable values: Any real number. If omitted, no global cap is applied. Can't be left blank.
9292
\item GlobalFloor[Optional]: The global floor,$floor_{g}$, for the option return. \\
93-
Allowable values: Any real number. If left blank or omitted, no global floor is applied.
93+
Allowable values: Any real number. If omitted, no global floor is applied. Can't be left blank.
9494
\item ScheduleData: A schedule of dates that define the valuation dates of the consecutive forward starting options forming the Equity Cliquet Option. The first date in the schedule is the start date of the first consecutive option, the second date in the schedule is the end/valuation date of the first consecutive option, and also the start date of the second consecutive option, etc. The last date is the final valuation date, with payoff of the whole Cliquet option at this date plus \lstinline!SettlementDays!. \\
9595
Allowable values: A node on the same form as \lstinline!ScheduleData!, (see \ref{ss:schedule_data}).
9696
\item SettlementDays[Optional]: Number of days from the last valuation date to the payoff being paid or received. The payoff date is determined with regards to calendar and

Docs/UserGuide/userguide.tex

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2851,7 +2851,8 @@ \subsubsection*{Pricing Engine Configuration}
28512851

28522852
\begin{enumerate}
28532853
\item \verb+Training.Sequence+: The sequence type for the traning phase, can be \verb+MersenneTwister+,
2854-
\verb+MersenneTwisterAntithetc+, \verb+Sobol+ or \verb+SobolBrownianBridge+
2854+
\verb+MersenneTwisterAntithetc+, \verb+Sobol+, \verb+Burley2020Sobol+, \verb+SobolBrownianBridge+,
2855+
\verb+Burley2020SobolBrownianBridge+
28552856
\item \verb+Training.Seed+: The seed for the random number generation in the training phase
28562857
\item \verb+Training.Samples+: The number of samples to be used for the training phase
28572858
\item \verb+Pricing.Sequence+: The sequence type for the pricing phase, same values allowed as for training
@@ -5131,17 +5132,17 @@ \subsubsection{Parameters}\label{sec:sim_params}
51315132
% more efficient memory usage. \todo[inline]{Remove Scenario choice}
51325133
\item {\tt DayCounter:} Day count convention used to translate dates to times. Optional, defaults to ActualActual ISDA.
51335134
\item {\tt Sequence:} Choose random sequence generator ({\em MersenneTwister, MersenneTwisterAntithetic, Sobol,
5134-
SobolBrownianBridge}).
5135+
Burley2020Sobol, SobolBrownianBridge, Burley2020SobolBrownianBridge}).
51355136
\item {\tt Seed:} Random number generator seed
51365137
\item {\tt Samples:} Number of Monte Carlo paths to be produced
51375138
%\item {\tt Fixings: } Choose whether fixings should be simulated or not, and if so which fixing simulation method to
51385139
use ({\em Backward, Forward, BestOfForwardBackward, InterpolatedForwardBackward}), which number of forward horizon days
51395140
to use if one of the {\em Forward } related methods is chosen.
5140-
\item {\tt Ordering:} If the sequence type {\em SobolBrownianBridge} is used, ordering of variates ({\em Factors, Steps,
5141-
Diagonal})
5142-
\item {\tt DirectionIntegers:} If the sequence type {\em SobolBrownianBridge} or {\em Sobol} is used, type of direction
5143-
integers in Sobol generator ({\em Unit, Jaeckel, SobolLevitan, SobolLevitanLemieux, JoeKuoD5, JoeKuoD6, JoeKuoD7, Kuo,
5144-
Kuo2, Kuo3})
5141+
\item {\tt Ordering:} If the sequence type {\em SobolBrownianBridge} or {\em Burley2020SobolBrownianBridge} is used,
5142+
ordering of variates ({\em Factors, Steps, Diagonal})
5143+
\item {\tt DirectionIntegers:} If the sequence type {\em SobolBrownianBridge}, {\em Burley2020SobolBrownianBridge}, {\em
5144+
Sobol} or {\em Burley2020Sobol} is used, type of direction integers in Sobol generator ({\em Unit, Jaeckel,
5145+
SobolLevitan, SobolLevitanLemieux, JoeKuoD5, JoeKuoD6, JoeKuoD7, Kuo, Kuo2, Kuo3})
51455146
\item {\tt CloseOutLag}: If this tag is present, this specifies the close-out period length (e.g. 2W) used; otherwise no close-out grid is built. The close-out grid is an auxiliary time grid that is offset from the main default date grid by the close-out period, typically set to the applicable margin period of risk. If present, it is used to evolve the portfolio value and determine close-out values associated with the preceding default date valuation.
51465147
\item {\tt MporMode}: This tag is expected if the previous one is present, permissible values are then {\tt StickyDate} and {\tt ActualDate}. {\tt StickyDate} means that only market data is evolved from the default date to close-out date for close-out date valuation, the valuation as of date remains unchanged and trades do not ``age'' over the period. As a consequence, exposure evolutions will not show spikes caused by cash flows within the close-out period. {\tt ActualDate} means that trades will also age over the close-out period so that one can experience exposure evolution spikes due to cash flows.
51475148
\end{itemize}

OREData/ored/portfolio/tarf.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ using namespace QuantExt;
121121
" d = DATEINDEX(FixingAndSimDates[a], FixingDates, GT);\n"
122122
" IF s > 0 THEN\n"
123123
" IF d > 1 THEN\n"
124-
// including Hits[d-1] in the regression is not stable
125-
" _AMC_NPV[s] = LongShort * NPVMEM( bwdPayoff, _AMC_SimDates[s], a, 1 == 1, AccProfit[d-1]);\n"
124+
// including Hits[d-1] or AccProfit[d-1] in the regression is not stable
125+
" _AMC_NPV[s] = LongShort * NPVMEM( bwdPayoff, _AMC_SimDates[s], a);\n"
126126
" ELSE\n"
127127
" _AMC_NPV[s] = LongShort * NPVMEM( bwdPayoff, _AMC_SimDates[s], a);\n"
128128
" END;\n"
@@ -229,7 +229,7 @@ using namespace QuantExt;
229229
" d = DATEINDEX(FixingAndSimDates[a], FixingDates, GT);\n"
230230
" IF s > 0 THEN\n"
231231
" IF d > 1 THEN\n"
232-
" _AMC_NPV[s] = LongShort * NPVMEM( bwdPayoff, _AMC_SimDates[s], a, 1 == 1, AccProfitPoints[d-1]);\n"
232+
" _AMC_NPV[s] = LongShort * NPVMEM( bwdPayoff, _AMC_SimDates[s], a);\n"
233233
" ELSE\n"
234234
" _AMC_NPV[s] = LongShort * NPVMEM( bwdPayoff, _AMC_SimDates[s], a);\n"
235235
" END;\n"

OREData/ored/utilities/parsers.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -645,10 +645,12 @@ AmortizationType parseAmortizationType(const std::string& s) {
645645
}
646646

647647
SequenceType parseSequenceType(const std::string& s) {
648-
static map<string, SequenceType> seq = {{"MersenneTwister", SequenceType::MersenneTwister},
649-
{"MersenneTwisterAntithetic", SequenceType::MersenneTwisterAntithetic},
650-
{"Sobol", SequenceType::Sobol},
651-
{"SobolBrownianBridge", SequenceType::SobolBrownianBridge}};
648+
static map<string, SequenceType> seq = {
649+
{"MersenneTwister", SequenceType::MersenneTwister},
650+
{"MersenneTwisterAntithetic", SequenceType::MersenneTwisterAntithetic},
651+
{"Sobol", SequenceType::Sobol},
652+
{"SobolBrownianBridge", SequenceType::SobolBrownianBridge},
653+
{"Burley2020SobolBrownianBridge", SequenceType::Burley2020SobolBrownianBridge}};
652654
auto it = seq.find(s);
653655
if (it != seq.end())
654656
return it->second;

0 commit comments

Comments
 (0)