19#include <boost/algorithm/string.hpp>
20#include <boost/make_shared.hpp>
21#include <boost/range.hpp>
31using QuantLib::Currency;
33using QuantLib::WeekendsOnly;
40 static map<string, MarketDatum::InstrumentType> b = {
88 QL_FAIL(
"Cannot convert \"" << s <<
"\" to InstrumentType");
93 static map<string, MarketDatum::QuoteType> b = {
110 if (s ==
"RATE_GVOL")
111 LOG(
"Use of deprecated quote type RATE_GVOL");
117 QL_FAIL(
"Cannot convert \"" << s <<
"\" to QuoteType");
128 expiryDate = cal.adjust(asof + term, bdc);
133 static map<string, FXForwardQuote::FxFwdString> b = {
143 QL_FAIL(
"Cannot convert \"" << s <<
"\" to FxFwdString");
147boost::variant<QuantLib::Period, FXForwardQuote::FxFwdString>
parseFxPeriod(
const string& s) {
148 bool isPeriod = isdigit(s.front());
152 return parseFxString(s);
157struct FxTenorGetter : boost::static_visitor<Period> {
159 Period operator()(
const Period& p)
const {
return p; }
162 return Period(1, Days);
166struct FxStartTenorGetter : boost::static_visitor<Period> {
168 FxStartTenorGetter(
const QuantLib::ext::shared_ptr<FXConvention>& fxConvention) :
171 Period operator()(
const Period& p)
const {
175 return Period(days, Days);
185 return Period(days, Days);
191struct FxFwdStringCompare : boost::static_visitor<bool> {
195 bool operator()(
const Period& p)
const {
return false; }
206QuantLib::Period
fxFwdQuoteTenor(
const boost::variant<QuantLib::Period, FXForwardQuote::FxFwdString>& term) {
207 return boost::apply_visitor(FxTenorGetter(), term);
210QuantLib::Period
fxFwdQuoteStartTenor(
const boost::variant<QuantLib::Period, FXForwardQuote::FxFwdString>& term,
211 const QuantLib::ext::shared_ptr<FXConvention>&
fxConvention) {
212 return boost::apply_visitor(FxStartTenorGetter(
fxConvention), term);
217 return boost::apply_visitor(FxFwdStringCompare(fxfwdString), term);
221QuantLib::ext::shared_ptr<MarketDatum>
parseMarketDatum(
const Date& asof,
const string& datumName,
const Real&
value) {
223 vector<string> tokens;
224 boost::split(tokens, datumName, boost::is_any_of(
"/"));
225 QL_REQUIRE(tokens.size() > 2,
"more than 2 tokens expected in " << datumName);
230 switch (instrumentType) {
235 "Invalid quote type for " << datumName);
236 QL_REQUIRE(tokens.size() == 6,
"6 tokens expected in " << datumName);
237 const string& ccy = tokens[2];
241 Period tenor = Period();
244 return QuantLib::ext::make_shared<ZeroQuote>(
value, asof, datumName, quoteType, ccy, date, dc, tenor);
250 QL_REQUIRE(tokens.size() == 5,
"5 tokens expected in " << datumName);
251 const string& ccy = tokens[2];
254 Period tenor = Period();
257 return QuantLib::ext::make_shared<DiscountQuote>(
value, asof, datumName, quoteType, ccy, date, tenor);
261 QL_REQUIRE(tokens.size() == 5 || tokens.size() == 6,
"5 or 6 tokens expected in " << datumName);
262 const string& ccy = tokens[2];
265 if (tokens.size() == 6) {
266 indexName = tokens[3];
271 return QuantLib::ext::make_shared<MoneyMarketQuote>(
value, asof, datumName, quoteType, ccy, fwdStart, term, indexName);
275 QL_REQUIRE(tokens.size() == 6,
"6 tokens expected in " << datumName);
276 const string& ccy = tokens[2];
277 const string& expiry = tokens[3];
278 const string& contract = tokens[4];
280 return QuantLib::ext::make_shared<MMFutureQuote>(
value, asof, datumName, quoteType, ccy, expiry, contract, term);
284 QL_REQUIRE(tokens.size() == 6,
"6 tokens expected in " << datumName);
285 const string& ccy = tokens[2];
286 const string& expiry = tokens[3];
287 const string& contract = tokens[4];
289 return QuantLib::ext::make_shared<OIFutureQuote>(
value, asof, datumName, quoteType, ccy, expiry, contract, term);
293 QL_REQUIRE(tokens.size() == 5,
"5 tokens expected in " << datumName);
294 const string& ccy = tokens[2];
297 return QuantLib::ext::make_shared<FRAQuote>(
value, asof, datumName, quoteType, ccy, fwdStart, term);
301 QL_REQUIRE(tokens.size() == 5,
"5 tokens expected in " << datumName);
302 const string& ccy = tokens[2];
303 string imm1 = tokens[3];
304 string imm2 = tokens[4];
307 QL_REQUIRE(m2 > m1,
"Second IMM date must be after the first in " << datumName);
308 return QuantLib::ext::make_shared<ImmFraQuote>(
value, asof, datumName, quoteType, ccy, m1, m2);
312 QL_REQUIRE(tokens.size() == 6 || tokens.size() == 7,
"6 or 7 tokens expected in " << datumName);
313 const string& ccy = tokens[2];
316 if (tokens.size() == 7) {
317 indexName = tokens[3];
321 boost::variant<QuantLib::Date, QuantLib::Period> start =
parseDateOrPeriod(tokens[3 + offset]);
322 boost::variant<QuantLib::Date, QuantLib::Period> end =
parseDateOrPeriod(tokens[5 + offset]);
324 if (start.type() ==
typeid(QuantLib::Period) && end.type() ==
typeid(QuantLib::Period)) {
325 Period fwdStart = QuantLib::ext::get<QuantLib::Period>(start);
326 Period term = QuantLib::ext::get<QuantLib::Period>(end);
327 return QuantLib::ext::make_shared<SwapQuote>(
value, asof, datumName, quoteType, ccy, fwdStart, term, tenor,
329 }
else if (start.type() ==
typeid(QuantLib::Date) && end.type() ==
typeid(QuantLib::Date)) {
330 Date startDate = QuantLib::ext::get<QuantLib::Date>(start);
331 Date maturityDate = QuantLib::ext::get<QuantLib::Date>(end);
332 return QuantLib::ext::make_shared<SwapQuote>(
value, asof, datumName, quoteType, ccy, startDate, maturityDate, tenor,
335 QL_FAIL(
"Expect swap quote with start/end as either periods or dates");
343 QL_REQUIRE(tokens.size() == 6 || tokens.size() == 7,
"Either 6 or 7 tokens expected in " << datumName);
346 const string& ccy = tokens[4];
348 if (tokens.size() == 7) {
353 return QuantLib::ext::make_shared<BasisSwapQuote>(
value, asof, datumName, quoteType, flatTerm, term, ccy,
maturity);
357 QL_REQUIRE(tokens.size() == 5,
"5 tokens expected in " << datumName);
358 const string& ccy = tokens[2];
361 return QuantLib::ext::make_shared<BMASwapQuote>(
value, asof, datumName, quoteType, term, ccy,
maturity);
365 QL_REQUIRE(tokens.size() == 7,
"7 tokens expected in " << datumName);
366 const string& flatCcy = tokens[2];
368 const string& ccy = tokens[4];
371 return QuantLib::ext::make_shared<CrossCcyBasisSwapQuote>(
value, asof, datumName, quoteType, flatCcy, flatTerm, ccy,
377 QL_REQUIRE(tokens.size() == 7,
"7 tokens expected in " << datumName);
381 return QuantLib::ext::make_shared<CrossCcyFixFloatSwapQuote>(
value, asof, datumName, quoteType, tokens[2], floatTenor,
394 QL_REQUIRE(tokens.size() == 6 || tokens.size() == 7 || tokens.size() == 8,
395 "6, 7 or 8 tokens expected in " << datumName);
396 const string& underlyingName = tokens[2];
397 const string& seniority = tokens[3];
398 const string& ccy = tokens[4];
402 Real runningSpread = Null<Real>();
403 if (tokens.size() == 6) {
405 }
else if (tokens.size() == 8) {
406 docClause = tokens[5];
408 runningSpread =
parseReal(tokens[7]) / 10000;
413 docClause = tokens[5];
417 runningSpread =
parseReal(tokens[6]) / 10000;
421 return QuantLib::ext::make_shared<CdsQuote>(
value, asof, datumName, quoteType, underlyingName,
422 seniority, ccy, term, docClause, runningSpread);
426 QL_REQUIRE(tokens.size() == 6 || tokens.size() == 7,
"6 or 7 tokens expected in " << datumName);
427 const string& underlyingName = tokens[2];
428 const string& seniority = tokens[3];
429 const string& ccy = tokens[4];
430 string docClause = tokens.size() == 7 ? tokens[5] :
"";
432 return QuantLib::ext::make_shared<HazardRateQuote>(
value, asof, datumName, underlyingName, seniority, ccy, term,
437 QL_REQUIRE(tokens.size() == 3 || tokens.size() == 5 || tokens.size() == 6,
438 "3, 5 or 6 tokens expected in " << datumName);
439 const string& underlyingName = tokens[2];
440 string seniority =
"";
442 string docClause =
"";
443 if (tokens.size() >= 5) {
445 seniority = tokens[3];
447 if (tokens.size() == 6)
448 docClause = tokens[5];
450 return QuantLib::ext::make_shared<RecoveryRateQuote>(
value, asof, datumName, underlyingName, seniority, ccy, docClause);
454 QL_REQUIRE((tokens.size() >= 8 && tokens.size() <= 10) || tokens.size() == 4 || tokens.size() == 5,
455 "Either 4, 5 or 8, 9, 10 tokens expected in " << datumName);
456 const string& ccy = tokens[2];
458 std::string indexName;
459 Size hasCapFloorToken = (tokens.back() ==
"C" || tokens.back() ==
"F") ? 1 : 0;
461 "CAPFLOOR PRICE quotes must specify whether the datum represents a cap or a floor with a \"C\" or"
462 " \"F\" as the final token.");
464 if (tokens.size() == 9 + hasCapFloorToken || tokens.size() == 5 + hasCapFloorToken) {
467 indexName = tokens[3];
469 if (tokens.size() == 8 + hasCapFloorToken || tokens.size() == 9 + hasCapFloorToken) {
472 bool atm =
parseBool(tokens[5 + offset].c_str());
473 bool relative =
parseBool(tokens[6 + offset].c_str());
474 Real strike =
parseReal(tokens[7 + offset]);
475 bool isCap = !(hasCapFloorToken==1 && tokens.back() ==
"F");
476 return QuantLib::ext::make_shared<CapFloorQuote>(
value, asof, datumName, quoteType, ccy, term, tenor, atm, relative,
477 strike, indexName, isCap);
480 Period indexTenor =
parsePeriod(tokens[3 + offset]);
481 return QuantLib::ext::make_shared<CapFloorShiftQuote>(
value, asof, datumName, quoteType, ccy, indexTenor,
487 QL_REQUIRE(tokens.size() >= 4 && tokens.size() <= 9,
"4...9 tokens expected in " << datumName);
488 const string& ccy = tokens[2];
490 std::string quoteTag;
491 Size hasPayReceiveToken = (tokens.back() ==
"P" || tokens.back() ==
"R") ? 1 : 0;
493 "SWAPTION PRICE quotes must specify whether the datum represents a payer or a receiver"
494 " swaption with a \"P\" or \"R\" as the final token.");
497 quoteTag = tokens[3];
498 if (tokens.size() >= 6 + offset + hasPayReceiveToken) {
501 const string& dimension = tokens[5 + offset];
503 if (dimension ==
"ATM")
504 QL_REQUIRE(tokens.size() == 6 + offset + hasPayReceiveToken, 6 + offset + hasPayReceiveToken
505 <<
" tokens expected in ATM quote " << datumName);
506 else if (dimension ==
"Smile") {
507 QL_REQUIRE(tokens.size() == 7 + offset + hasPayReceiveToken, 7 + offset + hasPayReceiveToken
508 <<
" tokens expected in Smile quote " << datumName);
511 QL_FAIL(
"Swaption vol quote dimension " << dimension <<
" not recognised");
512 bool isPayer = !(hasPayReceiveToken == 1 && tokens.back() ==
"R");
513 return QuantLib::ext::make_shared<SwaptionQuote>(
value, asof, datumName, quoteType, ccy, expiry, term, dimension,
514 strike, quoteTag, isPayer);
516 return QuantLib::ext::make_shared<SwaptionShiftQuote>(
value, asof, datumName, quoteType, ccy,
522 QL_REQUIRE(tokens.size() == 4 || tokens.size() == 6,
"4 or 6 tokens expected in " << datumName);
523 const string& qualifier = tokens[2];
524 Period expiry = tokens.size() == 6 ?
parsePeriod(tokens[3]) : Period(0 * QuantLib::Days);
526 if (tokens.size() == 6) {
527 QL_REQUIRE(tokens[5] ==
"ATM",
"only ATM allowed for bond option quotes");
528 return QuantLib::ext::make_shared<BondOptionQuote>(
value, asof, datumName, quoteType, qualifier, expiry, term);
530 return QuantLib::ext::make_shared<BondOptionShiftQuote>(
value, asof, datumName, quoteType, qualifier, term);
535 QL_REQUIRE(tokens.size() == 4,
"4 tokens expected in " << datumName);
536 const string& unitCcy = tokens[2];
537 const string& ccy = tokens[3];
538 return QuantLib::ext::make_shared<FXSpotQuote>(
value, asof, datumName, quoteType, unitCcy, ccy);
542 QL_REQUIRE(tokens.size() == 5,
"5 tokens expected in " << datumName);
543 const string& unitCcy = tokens[2];
544 const string& ccy = tokens[3];
545 boost::variant<QuantLib::Period, FXForwardQuote::FxFwdString> term =
parseFxPeriod(tokens[4]);
546 return QuantLib::ext::make_shared<FXForwardQuote>(
value, asof, datumName, quoteType, unitCcy, ccy, term);
550 QL_REQUIRE(tokens.size() == 6,
"6 tokens expected in " << datumName);
551 const string& unitCcy = tokens[2];
552 const string& ccy = tokens[3];
554 const string& strike = tokens[5];
555 return QuantLib::ext::make_shared<FXOptionQuote>(
value, asof, datumName, quoteType, unitCcy, ccy, expiry, strike);
559 QL_REQUIRE(tokens.size() == 4,
"4 tokens expected in " << datumName);
560 const string& index = tokens[2];
562 return QuantLib::ext::make_shared<ZcInflationSwapQuote>(
value, asof, datumName, index, term);
566 QL_REQUIRE(tokens.size() == 4,
"4 tokens expected in " << datumName);
567 const string& index = tokens[2];
569 return QuantLib::ext::make_shared<YoYInflationSwapQuote>(
value, asof, datumName, index, term);
573 QL_REQUIRE(tokens.size() == 6,
"6 tokens expected in " << datumName);
574 const string& index = tokens[2];
576 QL_REQUIRE(tokens[4] ==
"C" || tokens[4] ==
"F",
577 "expected C or F for Cap or Floor at position 5 in " << datumName);
578 bool isCap = tokens[4] ==
"C";
579 string strike = tokens[5];
580 return QuantLib::ext::make_shared<ZcInflationCapFloorQuote>(
value, asof, datumName, quoteType, index, term, isCap,
585 QL_REQUIRE(tokens.size() == 6,
"6 tokens expected in " << datumName);
586 const string& index = tokens[2];
588 QL_REQUIRE(tokens[4] ==
"C" || tokens[4] ==
"F",
589 "expected C or F for Cap or Floor at position 5 in " << datumName);
590 bool isCap = tokens[4] ==
"C";
591 string strike = tokens[5];
592 return QuantLib::ext::make_shared<YyInflationCapFloorQuote>(
value, asof, datumName, quoteType, index, term, isCap,
597 QL_REQUIRE(tokens.size() == 5,
"5 tokens expected in " << datumName);
598 const string& index = tokens[3];
599 const string& type = tokens[2];
600 const string& month = tokens[4];
601 return QuantLib::ext::make_shared<SeasonalityQuote>(
value, asof, datumName, index, type, month);
604 QL_REQUIRE(tokens.size() == 4,
"4 tokens expected in " << datumName);
606 const string& equityName = tokens[2];
607 const string& ccy = tokens[3];
608 return QuantLib::ext::make_shared<EquitySpotQuote>(
value, asof, datumName, quoteType, equityName, ccy);
612 QL_REQUIRE(tokens.size() == 5,
"5 tokens expected in " << datumName);
614 const string& equityName = tokens[2];
615 const string& ccy = tokens[3];
617 return QuantLib::ext::make_shared<EquityForwardQuote>(
value, asof, datumName, quoteType, equityName, ccy, expiryDate);
621 QL_REQUIRE(tokens.size() == 5,
"5 tokens expected in " << datumName);
623 const string& equityName = tokens[2];
624 const string& ccy = tokens[3];
626 return QuantLib::ext::make_shared<EquityDividendYieldQuote>(
value, asof, datumName, quoteType, equityName, ccy,
631 QL_REQUIRE(tokens.size() >= 6 || tokens.size() <= 9,
"6 - 9 tokens expected in " << datumName);
633 "Invalid quote type for " << datumName);
634 const string& equityName = tokens[2];
635 const string& ccy = tokens[3];
636 string expiryString = tokens[4];
638 bool hasCallPutToken = tokens.back() ==
"C" || tokens.back() ==
"P";
641 for(Size i=5; i < tokens.size() - (hasCallPutToken ? 1 : 0); ++i) {
642 strikeStr += (i > 5 ?
"/" :
"") + tokens[i];
644 QuantLib::ext::shared_ptr<BaseStrike> strike;
646 if(strikeStr ==
"ATM")
647 strike = QuantLib::ext::make_shared<AtmStrike>(QuantLib::DeltaVolQuote::AtmType::AtmSpot);
648 else if(strikeStr ==
"ATMF")
649 strike = QuantLib::ext::make_shared<AtmStrike>(QuantLib::DeltaVolQuote::AtmType::AtmFwd);
653 if (hasCallPutToken) {
654 QL_REQUIRE(tokens.back() ==
"C" || tokens.back() ==
"P",
655 "expected C or P for Call or Put at position " << tokens.size() <<
" in " << datumName);
656 isCall = tokens.back() ==
"C";
661 return QuantLib::ext::make_shared<EquityOptionQuote>(
value, asof, datumName, quoteType, equityName, ccy, expiryString,
666 QL_REQUIRE(tokens.size() == 3,
"3 tokens expected in " << datumName);
667 const string& securityID = tokens[2];
669 return QuantLib::ext::make_shared<SecuritySpreadQuote>(
value, asof, datumName, securityID);
671 return QuantLib::ext::make_shared<BondPriceQuote>(
value, asof, datumName, securityID);
675 QL_REQUIRE(tokens.size() == 5,
"5 tokens expected in " << datumName);
677 const string& cdsIndexName = tokens[2];
679 Real detachmentPoint =
parseReal(tokens[4]);
680 return QuantLib::ext::make_shared<BaseCorrelationQuote>(
value, asof, datumName, quoteType, cdsIndexName, term,
688 QL_REQUIRE(tokens.size() >= 4 || tokens.size() <= 6,
"4, 5 or 6 tokens expected in " << datumName);
691 QuantLib::ext::shared_ptr<Expiry> expiry;
692 QuantLib::ext::shared_ptr<BaseStrike> strike;
694 if (tokens.size() == 6) {
696 indexTerm = tokens[3];
699 }
else if (tokens.size() == 5) {
707 indexTerm = tokens[3];
715 return QuantLib::ext::make_shared<IndexCDSOptionQuote>(
value, asof, datumName, tokens[2], expiry, indexTerm, strike);
719 QL_REQUIRE(tokens.size() == 4,
"4 tokens expected in " << datumName);
722 return QuantLib::ext::make_shared<CommoditySpotQuote>(
value, asof, datumName, quoteType, tokens[2], tokens[3]);
728 QL_REQUIRE(tokens.size() == 5,
"5 tokens expected in " << datumName);
732 if (tokens[4] ==
"ON") {
733 return QuantLib::ext::make_shared<CommodityForwardQuote>(
value, asof, datumName, quoteType, tokens[2], tokens[3],
735 }
else if (tokens[4] ==
"TN") {
736 return QuantLib::ext::make_shared<CommodityForwardQuote>(
value, asof, datumName, quoteType, tokens[2], tokens[3],
738 }
else if (tokens[4] ==
"SN") {
739 return QuantLib::ext::make_shared<CommodityForwardQuote>(
value, asof, datumName, quoteType, tokens[2], tokens[3],
750 return QuantLib::ext::make_shared<CommodityForwardQuote>(
value, asof, datumName, quoteType, tokens[2], tokens[3],
753 return QuantLib::ext::make_shared<CommodityForwardQuote>(
value, asof, datumName, quoteType, tokens[2], tokens[3],
764 QL_REQUIRE(tokens.size() >= 6,
"At least 6 tokens expected in " << datumName);
765 QL_REQUIRE(quoteType == QT::RATE_LNVOL || quoteType == QT::PRICE,
766 "Quote type for " << datumName <<
" should be 'RATE_LNVOL' or 'PRICE'");
768 QuantLib::ext::shared_ptr<Expiry> expiry =
parseExpiry(tokens[4]);
771 auto itStkBeg = tokens.begin() + 5;
772 auto itStkEnd = tokens.end();
773 Option::Type optionType = Option::Call;
774 if (tokens.back() ==
"C" || tokens.back() ==
"P") {
775 if (tokens.back() ==
"P")
776 optionType = Option::Put;
777 itStkEnd = prev(itStkEnd);
781 QL_REQUIRE(itStkBeg != itStkEnd,
"");
782 string strStrike = boost::algorithm::join(boost::make_iterator_range(itStkBeg, itStkEnd),
"/");
783 QuantLib::ext::shared_ptr<BaseStrike> strike =
parseBaseStrike(strStrike);
785 return QuantLib::ext::make_shared<CommodityOptionQuote>(
value, asof, datumName, quoteType, tokens[2],
786 tokens[3], expiry, strike, optionType);
792 QL_REQUIRE(tokens.size() == 6,
"6 tokens expected in " << datumName);
794 "Quote type for " << datumName <<
" should be 'CORRELATION' or 'PRICE'");
796 return QuantLib::ext::make_shared<CorrelationQuote>(
value, asof, datumName, quoteType, tokens[2], tokens[3], tokens[4],
801 QL_REQUIRE(tokens.size() == 3,
"3 tokens expected in " << datumName);
802 const string& securityID = tokens[2];
804 return QuantLib::ext::make_shared<CPRQuote>(
value, asof, datumName, securityID);
808 QL_REQUIRE(tokens.size() == 5,
"5 tokens expected in " << datumName);
809 const string&
name = tokens[2];
810 const string& fromRating = tokens[3];
811 const string& toRating = tokens[4];
813 return QuantLib::ext::make_shared<TransitionProbabilityQuote>(
value, asof, datumName,
name, fromRating, toRating);
817 QL_FAIL(
"Cannot convert \"" << datumName <<
"\" to MarketDatum");
InstrumentType
Supported market instrument types.
QuoteType
Supported market quote types.
SafeStack< ValueType > value
A class to hold credit default swap data.
Classes for representing an expiry for use in market quotes.
QuantLib::ext::shared_ptr< MarketDatum > parseMarketDatum(const Date &asof, const string &datumName, const Real &value)
Function to parse a market datum.
Date getDateFromDateOrPeriod(const string &token, Date asof, QuantLib::Calendar cal, QuantLib::BusinessDayConvention bdc)
Get a date from a date string or period.
boost::variant< QuantLib::Period, FXForwardQuote::FxFwdString > parseFxPeriod(const string &s)
Convert text to QuantLib::Period of Fx forward string.
bool tryParseReal(const string &s, QuantLib::Real &result)
Attempt to convert text to Real.
boost::variant< QuantLib::Date, QuantLib::Period > parseDateOrPeriod(const string &s)
Convert text to QuantLib::Period or QuantLib::Date.
Period parsePeriod(const string &s)
Convert text to QuantLib::Period.
bool parseBool(const string &s)
Convert text to bool.
Real parseReal(const string &s)
Convert text to Real.
Integer parseInteger(const string &s)
Convert text to QuantLib::Integer.
DayCounter parseDayCounter(const string &s)
Convert text to QuantLib::DayCounter.
Classes and functions for log message handling.
#define LOG(text)
Logging Macro (Level = Notice)
Classes for representing a strike using various conventions.
QuantLib::ext::shared_ptr< FXConvention > fxConvention
FXForwardQuote::FxFwdString fxFwdString
CdsDocClause
CDS documentation clause enumeration.
bool isOnePeriod(const string &s)
return true if s represents a period of the form [0-9][D|W|M|Y] (i.e. 1Y6M would return false)
CdsDocClause parseCdsDocClause(const string &s)
bool matchFxFwdStringTerm(const boost::variant< QuantLib::Period, FXForwardQuote::FxFwdString > &term, const FXForwardQuote::FxFwdString &fxfwdString)
QuantLib::Period fxFwdQuoteStartTenor(const boost::variant< QuantLib::Period, FXForwardQuote::FxFwdString > &term, const QuantLib::ext::shared_ptr< FXConvention > &fxConvention)
QuantLib::ext::shared_ptr< Expiry > parseExpiry(const string &strExpiry)
Parse an Expiry from its string representation, strExpiry.
QuantLib::ext::shared_ptr< BaseStrike > parseBaseStrike(const string &strStrike)
Parse a Strike from its string representation, strStrike.
QuantLib::Period fxFwdQuoteTenor(const boost::variant< QuantLib::Period, FXForwardQuote::FxFwdString > &term)
Serializable Credit Default Swap.
Map text representations to QuantLib/QuantExt types.