Skip to content

Commit bdbabf9

Browse files
pcaspersjenkins
authored andcommitted
Merge branch 'QPR-13094' into 'master'
QPR-13094 disable conventional spreads Closes QPR-13094 See merge request qs/oreplus!2737
1 parent 4431759 commit bdbabf9

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

Docs/UserGuide/marketdata.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,8 @@ \subsection{CDS Spread}
667667
\label{tab:cdsspread_quote}
668668
\end{table}
669669

670-
There are two possible quote types to allow for the presence of two CDS spread types in the market data. In particular, there is typically a conventional CDS spread and a par CDS spread quoted in the market. The quote type distinction here would allow the conventional spreads to be stored with quote type set to \lstinline!CONV_CREDIT_SPREAD! and the par spreads to be stored with quote type set to \lstinline!CREDIT_SPREAD!. As noted in the table above, the CDS documentation clause and CDS running spread is optional. The following list shows valid CDS spread quote examples.
670+
Currently, only par CDS spreads (quote type \lstinline!CREDIT_SPREAD!) are supported. Conventional CDS spreads (quote type \lstinline!CONV_CREDIT_SPREAD!) are not supported at this time.
671+
As noted in the table above, the CDS documentation clause and CDS running spread is optional. The following list shows valid CDS spread quote examples.
671672
\begin{itemize}
672673
\item \lstinline!CDS/CREDIT_SPREAD/JPM/SNRFOR/USD/5Y!
673674
\item \lstinline!CDS/CREDIT_SPREAD/JPM/SNRFOR/USD/5Y/100!

OREData/ored/marketdata/defaultcurve.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ set<QuoteData> getRegexQuotes(const Wildcard& wc, const string& configId, Defaul
109109
auto q = QuantLib::ext::dynamic_pointer_cast<CdsQuote>(md);
110110
QL_REQUIRE(q, "Internal error: could not downcast MarketDatum '" << md->name() << "' to CdsQuote");
111111
if (wc.matches(q->name())) {
112+
QL_REQUIRE(mdqt != MDQT::CONV_CREDIT_SPREAD,
113+
"Conventional credit spread are currently not supported for default curves");
112114
addQuote(result, configId, q->name(), q->term(), q->quote()->value(), q->seniority(), q->ccy(),
113115
q->docClause(), q->runningSpread());
114116
}
@@ -173,6 +175,8 @@ set<QuoteData> getExplicitQuotes(const vector<pair<string, bool>>& quotes, const
173175
if (type == DCCT::SpreadCDS || type == DCCT::Price) {
174176
auto q = QuantLib::ext::dynamic_pointer_cast<CdsQuote>(md);
175177
QL_REQUIRE(q, "Quote " << p.first << " for config " << configId << " should be a CdsQuote");
178+
QL_REQUIRE(q->quoteType() != MarketDatum::QuoteType::CONV_CREDIT_SPREAD,
179+
"Conventional credit spread are currently not supported for default curves");
176180
addQuote(result, configId, q->name(), q->term(), q->quote()->value(), q->seniority(), q->ccy(),
177181
q->docClause(), q->runningSpread());
178182
} else {

OREData/test/cds.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ BOOST_AUTO_TEST_CASE(testSimultaneousUsageCdsQuoteTypes) {
339339
vector<string> curveNames = {
340340
"RED:8B69AP|SNRFOR|USD|CR-UPFRONT",
341341
"RED:8B69AP|SNRFOR|USD|CR-PAR_SPREAD",
342-
"RED:8B69AP|SNRFOR|USD|CR-CONV_SPREAD",
343342
};
344343

345344
for (const string& curveName : curveNames) {

OREData/test/input/cds/upfront/todaysmarket_all_cds_quote_types.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
<DefaultCurves id="default">
77
<DefaultCurve name="RED:8B69AP|SNRFOR|USD|CR-UPFRONT">Default/USD/RED:8B69AP|SNRFOR|USD|CR-UPFRONT</DefaultCurve>
88
<DefaultCurve name="RED:8B69AP|SNRFOR|USD|CR-PAR_SPREAD">Default/USD/RED:8B69AP|SNRFOR|USD|CR-PAR_SPREAD</DefaultCurve>
9-
<DefaultCurve name="RED:8B69AP|SNRFOR|USD|CR-CONV_SPREAD">Default/USD/RED:8B69AP|SNRFOR|USD|CR-CONV_SPREAD</DefaultCurve>
109
</DefaultCurves>
1110
</TodaysMarket>

0 commit comments

Comments
 (0)