Skip to content

Commit cce4127

Browse files
pcaspersjenkins
authored andcommitted
QPR-12275 add bond index to swaption
1 parent 78eb974 commit cce4127

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

OREData/ored/portfolio/swaption.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,5 +498,14 @@ XMLNode* Swaption::toXML(XMLDocument& doc) {
498498

499499
return node;
500500
}
501+
502+
map<AssetClass, set<string>>
503+
Swaption::underlyingIndices(const boost::shared_ptr<ReferenceDataManager>& referenceDataManager) const {
504+
map<AssetClass, set<string>> result;
505+
if (auto s = envelope().additionalField("security_spread", false); !s.empty())
506+
result[AssetClass::BOND] = {s};
507+
return result;
508+
}
509+
501510
} // namespace data
502511
} // namespace ore

OREData/ored/portfolio/swaption.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ class Swaption : public Trade {
6262

6363
bool isExercised() const;
6464

65+
std::map<AssetClass, std::set<std::string>>
66+
underlyingIndices(const boost::shared_ptr<ReferenceDataManager>& referenceDataManager = nullptr) const override;
67+
6568
private:
6669
OptionData optionData_;
6770
vector<LegData> legData_;

0 commit comments

Comments
 (0)