Skip to content

Commit f6d93b2

Browse files
Merge remote-tracking branch 'origin/master' into github_modules
2 parents c77ced2 + 0ba235b commit f6d93b2

7 files changed

Lines changed: 32 additions & 8 deletions

File tree

Docs/UserGuide/tradedata/bondoption_refdata.tex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ \subsubsection{Bond Option (using bond reference data)}
1414
node, see below for details
1515
\end{itemize}
1616

17+
Note that only par redemption vanilla bonds are supported.
18+
1719
\begin{listing}[H]
1820
%\hrule\medskip
1921
\begin{minted}[fontsize=\footnotesize]{xml}
@@ -37,7 +39,6 @@ \subsubsection{Bond Option (using bond reference data)}
3739
<Value>1.23</Value>
3840
</StrikePrice>
3941
</StrikeData>
40-
<Redemption>100.00</Redemption>
4142
<PriceType>Dirty</PriceType>
4243
<KnocksOut>false</KnocksOut>
4344
<BondData>
@@ -80,9 +81,9 @@ \subsubsection{Bond Option (using bond reference data)}
8081
8182
\item \lstinline!StrikeData!: A \lstinline!StrikeData! node is used as described in Section \ref{ss:strikedata} to represent the Bond Option strike price or strike yield. If StrikePrice is used, the strike price (\lstinline!Value! field) is expressed per unit notional. If StrikeYield is used, the \lstinline!Yield! is quoted in decimal form, e.g. 5\% should be entered as 0.05.
8283
83-
\item Redemption [Optional]: Redemption ratio in percent, e.g. \emph{100} means the bond is redeemed at par.
84+
% \item Redemption [Optional]: Redemption ratio in percent, e.g. \emph{100} means the bond is redeemed at par.
8485
85-
Allowable values: Any positive real number. Defaults to \emph{100} if left blank or omitted.
86+
% Allowable values: Any positive real number. Defaults to \emph{100} if left blank or omitted.
8687
8788
\item PriceType [Mandatory for StrikePrice, no impact for StrikeYield]: \\
8889
The payoff for a bond option is

Docs/UserGuide/tradedata/commodityapo.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ \subsubsection{Commodity Average Price Option}
8181

8282
\item \lstinline!CommodityPayRelativeTo! [Optional]: This is as described in section \ref{ss:commodity_floating_leg_data}.
8383

84-
\item \lstinline!FutureMonthOffset! [Optional]: This is as described in section \ref{ss:commodity_floating_leg_data}.
84+
\item \lstinline!FutureMonthOffset! [Optional]: This is as described in section \ref{ss:commodity_floating_leg_data}. Note that IsAveraged defaults to \emph{false} as it cannot be used as a tag within the CommodityAveragePriceOptionData node. Thus, if e.g. FutureMonthOffset is set to \emph{2}, the future contract month and year is taken as the second month following the base date’s month and year; and so on for all positive values of FutureMonthOffset.
8585

8686
\item \lstinline!DeliveryRollDays! [Optional]: This is as described in section \ref{ss:commodity_floating_leg_data}.
8787

Docs/UserGuide/tradedata/commodityswap.tex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
\subsubsection{Commodity Swap and Basis Swap}
22
\label{ss:input_commodityswap}
33

4-
The structure of a \lstinline!CommoditySwap! trade node is shown in listing \ref{lst:commodityswap_data}. This trade node can be used to represent commodity swaps and commodity basis swaps. It consists of the generic \lstinline!Envelope! and the specific \lstinline!SwapData! section. The \lstinline!SwapData! node may contain two or more \lstinline!LegData! nodes. Each \lstinline!LegData! node must have a \lstinline!LegType! of \lstinline!CommodityFixed! or \lstinline!CommodityFloating!. These leg types are described in sections \ref{ss:commodityfixedleg} and \ref{ss:commodityfloatingleg} respectively.
4+
The structure of a \lstinline!CommoditySwap! trade node is shown in listing \ref{lst:commodityswap_data}. This trade node can be used to represent commodity swaps and commodity basis swaps. It consists of the generic \lstinline!Envelope! and the specific \lstinline!SwapData! section.
5+
6+
The \lstinline!SwapData! node may contain two or more \lstinline!LegData! nodes. There must be at least one \lstinline!LegData! node of a commodity \lstinline!LegType!, i.e. \lstinline!CommodityFixed! or \lstinline!CommodityFloating!, but non-commodity leg types are also allowed. The commodity leg types are described in sections \ref{ss:commodityfixedleg} and \ref{ss:commodityfloatingleg} respectively.
57

68
\begin{listing}[h!]
79
\begin{minted}[fontsize=\footnotesize]{xml}

OREAnalytics/orea/app/analytic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ boost::shared_ptr<EngineFactory> Analytic::engineFactory() {
107107
boost::shared_ptr<ore::data::EngineFactory> PricingAnalytic::engineFactory() {
108108
LOG("PricingAnalytic::engineFactory() called");
109109
boost::shared_ptr<EngineData> edCopy = boost::make_shared<EngineData>(*inputs_->pricingEngine());
110-
edCopy->globalParameters()["GenerateAdditionalResults"] = inputs_->outputAdditionalResults() ? "true" : "false";
110+
edCopy->globalParameters()["GenerateAdditionalResults"] = "true";
111111
edCopy->globalParameters()["RunType"] = "NPV";
112112
map<MarketContext, string> configurations;
113113
configurations[MarketContext::irCalibration] = inputs_->marketConfig("lgmcalibration");

OREAnalytics/orea/scenario/scenariosimmarket.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <orea/scenario/scenariosimmarket.hpp>
2626
#include <orea/scenario/simplescenario.hpp>
2727
#include <qle/termstructures/credit/basecorrelationstructure.hpp>
28+
#include <qle/termstructures/proxyoptionletvolatility.hpp>
2829
#include <ql/instruments/makecapfloor.hpp>
2930
#include <ql/math/interpolations/loginterpolation.hpp>
3031
#include <ql/termstructures/credit/interpolatedsurvivalprobabilitycurve.hpp>
@@ -1064,6 +1065,10 @@ ScenarioSimMarket::ScenarioSimMarket(
10641065
} else {
10651066
string decayModeString = parameters->capFloorVolDecayMode();
10661067
ReactionToTimeDecay decayMode = parseDecayMode(decayModeString);
1068+
1069+
QL_REQUIRE(!boost::dynamic_pointer_cast<ProxyOptionletVolatility>(*wrapper),
1070+
"DynamicOptionletVolatilityStructure does not support ProxyOptionletVolatility surface.");
1071+
10671072
boost::shared_ptr<OptionletVolatilityStructure> capletVol =
10681073
boost::make_shared<DynamicOptionletVolatilityStructure>(*wrapper, 0, NullCalendar(),
10691074
decayMode);

QuantExt/qle/termstructures/dynamicoptionletvolatilitystructure.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ Date DynamicOptionletVolatilityStructure::maxDate() const {
4747
QL_FAIL("unexpected decay mode (" << decayMode_ << ")");
4848
}
4949

50-
void DynamicOptionletVolatilityStructure::update() { TermStructure::update(); }
50+
void DynamicOptionletVolatilityStructure::update() {
51+
TermStructure::update();
52+
}
5153

5254
boost::shared_ptr<SmileSection> DynamicOptionletVolatilityStructure::smileSectionImpl(Time optionTime) const {
5355
// Again, what strikes do we chose? Should not need this in any case.

cmake/commonSettings.cmake

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include(CheckCXXCompilerFlag)
2+
include(CheckLinkerFlag)
23

34
option(MSVC_LINK_DYNAMIC_RUNTIME "Link against dynamic runtime" ON)
45
option(MSVC_PARALLELBUILD "Use flag /MP" ON)
@@ -9,12 +10,22 @@ set(CMAKE_CXX_FLAGS_CLANG_ASAN_O2 "-fsanitize=address,undefined -fno-omit-frame-
910
# add compiler flag, if not already present
1011
macro(add_compiler_flag flag supportsFlag)
1112
check_cxx_compiler_flag(${flag} ${supportsFlag})
12-
1313
if(${supportsFlag} AND NOT "${CMAKE_CXX_FLAGS}" MATCHES "${flag}")
1414
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
1515
endif()
1616
endmacro()
1717

18+
# add linker flag for shared libs and exe, if not already present
19+
macro(add_linker_flag flag supportsFlag)
20+
check_linker_flag(CXX ${flag} ${supportsFlag})
21+
if(${supportsFlag} AND NOT "${CMAKE_SHARED_LINKER_FLAGS}" MATCHES "${flag}")
22+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${flag}")
23+
endif()
24+
if(${supportsFlag} AND NOT "${CMAKE_EXE_LINKER_FLAGS}" MATCHES "${flag}")
25+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flag}")
26+
endif()
27+
endmacro()
28+
1829
# use CXX 17, disable gnu extensions
1930
set(CMAKE_CXX_STANDARD 17)
2031
set(CMAKE_CXX_EXTENSIONS FALSE)
@@ -95,6 +106,9 @@ else()
95106
# build shared libs always
96107
set(BUILD_SHARED_LIBS ON)
97108

109+
# do not optimize away seemingly unused libs, they might contain dynamic registration of builders
110+
add_linker_flag("-Wl,--no-as-needed" supportsNoAsNeeded)
111+
98112
# link against dynamic boost libraries
99113
add_definitions(-DBOOST_ALL_DYN_LINK)
100114
add_definitions(-DBOOST_TEST_DYN_LINK)

0 commit comments

Comments
 (0)