Skip to content

Commit ed6f164

Browse files
mgronckijenkins
authored andcommitted
bugfixes
1 parent 2221609 commit ed6f164

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

OREAnalytics/orea/engine/decomposedsensitivitystream.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ double DecomposedSensitivityStream::fxRiskShiftSize(const std::string ccy) const
159159
auto fxpair = ccy + baseCurrency_;
160160
auto fxShiftSizeIt = ssd_->fxShiftData().find(fxpair);
161161
QL_REQUIRE(fxShiftSizeIt != ssd_->fxShiftData().end(), "Couldn't find shiftsize for " << fxpair);
162-
QL_REQUIRE(fxShiftSizeIt->second.shiftType == "Relative",
162+
QL_REQUIRE(fxShiftSizeIt->second.shiftType == ore::analytics::ShiftType::Relative,
163163
"Requires a relative fxSpot shift for index decomposition");
164164
return fxShiftSizeIt->second.shiftSize;
165165
}
@@ -179,7 +179,7 @@ DecomposedSensitivityStream::fxRiskShiftSizes(const std::map<std::string, std::v
179179
double DecomposedSensitivityStream::assetSpotShiftSize(const std::string name) const {
180180
auto eqShiftSizeIt = ssd_->equityShiftData().find(name);
181181
QL_REQUIRE(eqShiftSizeIt != ssd_->equityShiftData().end(), "Couldn't find a shift size for " << name);
182-
QL_REQUIRE(eqShiftSizeIt->second.shiftType == "Relative",
182+
QL_REQUIRE(eqShiftSizeIt->second.shiftType == ore::analytics::ShiftType::Relative,
183183
"Requires a relative eqSpot shift for index decomposition");
184184
return eqShiftSizeIt->second.shiftSize;
185185
}

OREData/ored/portfolio/commodityposition.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ std::map<AssetClass, std::set<std::string>>
145145
CommodityPosition::underlyingIndices(const boost::shared_ptr<ReferenceDataManager>& referenceDataManager) const {
146146
std::map<AssetClass, std::set<std::string>> result;
147147
for (auto const& u : data_.underlyings()) {
148-
result[AssetClass::EQ].insert(u.name());
148+
result[AssetClass::COM].insert(u.name());
149149
}
150150
return result;
151151
}

OREData/ored/portfolio/referencedata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ void BasicReferenceDataManager::check(const string& type, const string& id, cons
603603

604604
}
605605

606-
bool BasicReferenceDataManager::hasData(const string& type, const string& id, const QuantLib::Date& asof) const {
606+
bool BasicReferenceDataManager::hasData(const string& type, const string& id, const QuantLib::Date& asof) {
607607
Date asofDate = asof;
608608
if (asofDate == QuantLib::Null<QuantLib::Date>()) {
609609
asofDate = Settings::instance().evaluationDate();

OREData/ored/portfolio/referencedata.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ class ReferenceDataManager {
470470
public:
471471
virtual ~ReferenceDataManager() {}
472472
virtual bool hasData(const string& type, const string& id,
473-
const QuantLib::Date& asof = QuantLib::Null<QuantLib::Date>()) const = 0;
473+
const QuantLib::Date& asof = QuantLib::Null<QuantLib::Date>()) = 0;
474474
virtual boost::shared_ptr<ReferenceDatum>
475475
getData(const string& type, const string& id, const QuantLib::Date& asof = QuantLib::Null<QuantLib::Date>()) = 0;
476476
virtual void add(const boost::shared_ptr<ReferenceDatum>& referenceDatum) = 0;
@@ -494,7 +494,7 @@ class BasicReferenceDataManager : public ReferenceDataManager, public XMLSeriali
494494
void clear() { data_.clear(); }
495495

496496
bool hasData(const string& type, const string& id,
497-
const QuantLib::Date& asof = QuantLib::Null<QuantLib::Date>()) const override;
497+
const QuantLib::Date& asof = QuantLib::Null<QuantLib::Date>()) override;
498498
boost::shared_ptr<ReferenceDatum> getData(const string& type, const string& id,
499499
const QuantLib::Date& asof = QuantLib::Null<QuantLib::Date>()) override;
500500
void add(const boost::shared_ptr<ReferenceDatum>& referenceDatum) override;

0 commit comments

Comments
 (0)