Skip to content

Commit 3203e2a

Browse files
committed
Fix typos in docstrings, comments, asserts
1 parent 9d13bc0 commit 3203e2a

29 files changed

Lines changed: 34 additions & 34 deletions

OREData/ored/marketdata/marketdatum.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ class ImmFraQuote : public MarketDatum {
310310
- IR_SWAP
311311
312312
Specific data comprise currency, fwdStart, tenor, term, startDate, maturityDate
313-
The constructoir accepts either fwdStart/term or startDate/maturityDate
313+
The constructor accepts either fwdStart/term or startDate/maturityDate
314314
315315
\ingroup marketdata
316316
*/

OREData/ored/marketdata/marketdatumparser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ boost::shared_ptr<MarketDatum> parseMarketDatum(const Date& asof, const string&
574574
const string& index = tokens[2];
575575
Period term = parsePeriod(tokens[3]);
576576
QL_REQUIRE(tokens[4] == "C" || tokens[4] == "F",
577-
"excepted C or F for Cap or Floor at position 5 in " << datumName);
577+
"expected C or F for Cap or Floor at position 5 in " << datumName);
578578
bool isCap = tokens[4] == "C";
579579
string strike = tokens[5];
580580
return boost::make_shared<ZcInflationCapFloorQuote>(value, asof, datumName, quoteType, index, term, isCap,
@@ -586,7 +586,7 @@ boost::shared_ptr<MarketDatum> parseMarketDatum(const Date& asof, const string&
586586
const string& index = tokens[2];
587587
Period term = parsePeriod(tokens[3]);
588588
QL_REQUIRE(tokens[4] == "C" || tokens[4] == "F",
589-
"excepted C or F for Cap or Floor at position 5 in " << datumName);
589+
"expected C or F for Cap or Floor at position 5 in " << datumName);
590590
bool isCap = tokens[4] == "C";
591591
string strike = tokens[5];
592592
return boost::make_shared<YyInflationCapFloorQuote>(value, asof, datumName, quoteType, index, term, isCap,
@@ -652,7 +652,7 @@ boost::shared_ptr<MarketDatum> parseMarketDatum(const Date& asof, const string&
652652
bool isCall = true;
653653
if (hasCallPutToken) {
654654
QL_REQUIRE(tokens.back() == "C" || tokens.back() == "P",
655-
"excepted C or P for Call or Put at position " << tokens.size() << " in " << datumName);
655+
"expected C or P for Call or Put at position " << tokens.size() << " in " << datumName);
656656
isCall = tokens.back() == "C";
657657
}
658658

OREData/ored/portfolio/barrieroption.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void BarrierOption::build(const boost::shared_ptr<EngineFactory>& engineFactory)
5050

5151
QL_REQUIRE(barrier_.levels().size() > 0 && barrier_.levels().size() <= 2, "BarrierOption must have 1 or 2 levels");
5252
QL_REQUIRE(option_.style() == "European", "Option Style unknown: " << option_.style());
53-
QL_REQUIRE(option_.exerciseDates().size() == 1, "Invalid number of excercise dates");
53+
QL_REQUIRE(option_.exerciseDates().size() == 1, "Invalid number of exercise dates");
5454

5555
// get the expiry date
5656
Date expiryDate = parseDate(option_.exerciseDates().front());

OREData/ored/portfolio/builders/swaption.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class LGMGridBermudanSwaptionEngineBuilder : public LGMBermudanSwaptionEngineBui
103103
const string& id,
104104
//! the key (index or ccy)
105105
const string& key,
106-
//! Excercise dates
106+
//! Exercise dates
107107
const std::vector<Date>& dates,
108108
//! maturity of the underlying
109109
const Date& maturity,
@@ -124,7 +124,7 @@ class LgmMcBermudanSwaptionEngineBuilder : public LGMBermudanSwaptionEngineBuild
124124
const string& id,
125125
//! the currency
126126
const string& key,
127-
//! Excercise dates
127+
//! Exercise dates
128128
const std::vector<Date>& dates,
129129
//! maturity of the underlying
130130
const Date& maturity,
@@ -150,7 +150,7 @@ class LgmAmcBermudanSwaptionEngineBuilder : public BermudanSwaptionEngineBuilder
150150
const string& id,
151151
//! the currency
152152
const string& key,
153-
//! Excercise dates
153+
//! Exercise dates
154154
const std::vector<Date>& dates,
155155
//! maturity of the underlying
156156
const Date& maturity,

OREData/ored/portfolio/commodityapo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ void CommodityAveragePriceOption::buildApo(const boost::shared_ptr<EngineFactory
369369
Barrier::Type barrierType = Barrier::DownIn;
370370
Exercise::Type barrierStyle = Exercise::American;
371371
if (barrierData_.initialized()) {
372-
QL_REQUIRE(barrierData_.levels().size() == 1, "Commodity APO: Excepted exactly one barrier level.");
372+
QL_REQUIRE(barrierData_.levels().size() == 1, "Commodity APO: Expected exactly one barrier level.");
373373
barrierLevel = barrierData_.levels().front().value();
374374
barrierType = parseBarrierType(barrierData_.type());
375375
if (!barrierData_.style().empty()) {

OREData/ored/portfolio/commoditydigitalapo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void CommodityDigitalAveragePriceOption::build(const boost::shared_ptr<EngineFac
5858
DLOG("CommodityDigitalAveragePriceOption::build() called for trade " << id());
5959

6060
QL_REQUIRE(digitalCashPayoff_ > 0, "Commodity digital option requires a positive quatity");
61-
QL_REQUIRE(optionData_.exerciseDates().size() == 1, "Invalid number of excercise dates");
61+
QL_REQUIRE(optionData_.exerciseDates().size() == 1, "Invalid number of exercise dates");
6262
Date exDate = parseDate(optionData_.exerciseDates().front());
6363

6464

OREData/ored/portfolio/commoditydigitaloption.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void CommodityDigitalOption::build(const boost::shared_ptr<EngineFactory>& engin
5353
// Checks
5454
QL_REQUIRE(payoff_ > 0, "Commodity digital option requires a positive quatity");
5555
QL_REQUIRE(strike_ > 0, "Commodity digital option requires a positive strike");
56-
QL_REQUIRE(optionData_.exerciseDates().size() == 1, "Invalid number of excercise dates");
56+
QL_REQUIRE(optionData_.exerciseDates().size() == 1, "Invalid number of exercise dates");
5757

5858
expiryDate_ = parseDate(optionData_.exerciseDates().front());
5959

OREData/ored/portfolio/equitydigitaloption.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void EquityDigitalOption::build(const boost::shared_ptr<EngineFactory>& engineFa
3535

3636
// Only European Vanilla supported for now
3737
QL_REQUIRE(option_.style() == "European", "Option Style unknown: " << option_.style());
38-
QL_REQUIRE(option_.exerciseDates().size() == 1, "Invalid number of excercise dates");
38+
QL_REQUIRE(option_.exerciseDates().size() == 1, "Invalid number of exercise dates");
3939
QL_REQUIRE(option_.payoffAtExpiry() == true, "PayoffAtExpiry must be True for EquityDigitalOption");
4040
QL_REQUIRE(tradeActions().empty(), "TradeActions not supported for EquityDigitalOption");
4141
QL_REQUIRE(strike_ > 0.0 && strike_ != Null<Real>(), "Invalid strike " << strike_);

OREData/ored/portfolio/equitydoubletouchoption.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void EquityDoubleTouchOption::build(const boost::shared_ptr<EngineFactory>& engi
6565
Calendar cal = ore::data::parseCalendar(calendar_);
6666

6767
QL_REQUIRE(tradeActions().empty(), "TradeActions not supported for FxOption");
68-
QL_REQUIRE(option_.exerciseDates().size() == 1, "Invalid number of excercise dates");
68+
QL_REQUIRE(option_.exerciseDates().size() == 1, "Invalid number of exercise dates");
6969
QL_REQUIRE(barrier_.levels().size() == 2, "Invalid number of barrier levels");
7070
QL_REQUIRE(barrier_.style().empty() || barrier_.style() == "American", "Only american barrier style suppported");
7171

OREData/ored/portfolio/equityeuropeanbarrieroption.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void EquityEuropeanBarrierOption::build(const boost::shared_ptr<EngineFactory>&
4141

4242
// Only European Single Barrier supported for now
4343
QL_REQUIRE(option_.style() == "European", "Option Style unknown: " << option_.style());
44-
QL_REQUIRE(option_.exerciseDates().size() == 1, "Invalid number of excercise dates");
44+
QL_REQUIRE(option_.exerciseDates().size() == 1, "Invalid number of exercise dates");
4545
QL_REQUIRE(barrier_.levels().size() == 1, "Invalid number of barrier levels");
4646
QL_REQUIRE(barrier_.style().empty() || barrier_.style() == "European", "Only european barrier style suppported");
4747
QL_REQUIRE(tradeActions().empty(), "TradeActions not supported for FxEuropeanBarrierOption");

0 commit comments

Comments
 (0)