Skip to content

Commit 91ed4f0

Browse files
pcaspersjenkins
authored andcommitted
Merge remote-tracking branch 'origin/master' into QPR-12493
2 parents cb85cc8 + 7f787b7 commit 91ed4f0

3 files changed

Lines changed: 14 additions & 9 deletions

File tree

Docs/UserGuide/tradedata/callableswap.tex

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
\subsubsection{Callable Swap}\label{ss:callable_swap}
22

33
The \lstinline!CallableSwapData! node is the trade data container for the \emph{CallableSwap} trade type. A Callable Swap is a
4-
two-legged swap that can be cancelled at predefined dates by one of the counterparties. A Callable Swap must have two legs,
5-
one fixed and one floating, each described by a \lstinline!LegData! trade component sub-node as described in section
6-
\ref{ss:leg_data}. There must be at least one full coupon period after the exercise date for European
7-
Callable Swaps, and after the last exercise date for Bermudan and American Callable Swaps. The \lstinline!CallableSwapData! node also contains an \lstinline!OptionData! node which describes
4+
swap that can be cancelled at predefined dates by one of the counterparties. A Callable Swap must have at least one leg, each leg described by a \lstinline!LegData! trade component sub-node as described in section
5+
\ref{ss:leg_data}.
6+
7+
There must be at least one full coupon period after the exercise date for European Callable Swaps, and after the last exercise date for Bermudan and American Callable Swaps.
8+
9+
The \lstinline!CallableSwapData! node also contains an \lstinline!OptionData! node which describes
810
the exercise dates and specifies which party holds the call right, see \ref{ss:option_data}. An example structure of a
911
\lstinline!CallableSwapData! node is shown in Listing \ref{lst:callableswap_data}.
1012

@@ -58,5 +60,7 @@ \subsubsection{Callable Swap}\label{ss:callable_swap}
5860
underlying Swap. A Callable Swap must have at least one leg on the underlying Swap, but can have multiple legs,
5961
i.e. multiple \lstinline!LegData! nodes. The LegType elements must be of types \emph{Floating}, \emph{Fixed} or
6062
\emph{Cashflow}. All legs must have the same \lstinline!Currency!.
63+
64+
Note that the direction of the legs, determined by the \lstinline!Payer! tag, is like for a Swap, from the perspective of the party to the trade. I.e. unlike for a Swaption where the direction of the legs is from the perspective of the party that is long.
6165

6266
\end{itemize}

OREAnalytics/orea/app/analytics/pnlexplainanalytic.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ void PnlExplainAnalyticImpl::runAnalytic(const QuantLib::ext::shared_ptr<ore::da
119119
std::unique_ptr<MarketRiskReport::SensiRunArgs> sensiArgs =
120120
std::make_unique<MarketRiskReport::SensiRunArgs>(ss, shiftCalculator);
121121

122-
auto pnlExplainReport = ext::make_shared<PnlExplainReport>(inputs_->baseCurrency(), analytic()->portfolio(), inputs_->portfolioFilter(),
123-
period, pnlReport, scenarios, move(sensiArgs), nullptr, nullptr, true);
124-
122+
auto pnlExplainReport =
123+
ext::make_shared<PnlExplainReport>(inputs_->baseCurrency(), analytic()->portfolio(), inputs_->portfolioFilter(),
124+
period, pnlReport, scenarios, std::move(sensiArgs), nullptr, nullptr, true);
125+
125126
LOG("Call PNL Explain calculation");
126127
CONSOLEW("Risk: PNL Explain Calculation");
127128
ext::shared_ptr<MarketRiskReport::Reports> reports = ext::make_shared<MarketRiskReport::Reports>();
@@ -134,4 +135,4 @@ void PnlExplainAnalyticImpl::runAnalytic(const QuantLib::ext::shared_ptr<ore::da
134135
}
135136

136137
} // namespace analytics
137-
} // namespace ore
138+
} // namespace ore

OREAnalytics/orea/engine/varcalculator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ VarReport::VarReport(const std::string& baseCurrency, const QuantLib::ext::share
2626
const std::string& portfolioFilter, const vector<Real>& p, boost::optional<ore::data::TimePeriod> period,
2727
const QuantLib::ext::shared_ptr<HistoricalScenarioGenerator>& hisScenGen,
2828
std::unique_ptr<SensiRunArgs> sensiArgs, std::unique_ptr<FullRevalArgs> fullRevalArgs, const bool breakdown)
29-
: MarketRiskReport(baseCurrency, portfolio, portfolioFilter, period, hisScenGen, move(sensiArgs), move(fullRevalArgs), nullptr, breakdown), p_(p) {
29+
: MarketRiskReport(baseCurrency, portfolio, portfolioFilter, period, hisScenGen, std::move(sensiArgs), std::move(fullRevalArgs), nullptr, breakdown), p_(p) {
3030
}
3131

3232
void VarReport::createReports(const ext::shared_ptr<MarketRiskReport::Reports>& reports) {

0 commit comments

Comments
 (0)