File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,8 +146,7 @@ void CommodityForward::build(const boost::shared_ptr<EngineFactory>& engineFacto
146146 instrument_ = boost::make_shared<VanillaInstrument>(commodityForward);
147147 npvCurrency_ = fixingDate_==Date () ? currency_ : payCcy_;
148148
149- // notional_ = strike_ * quantity_;
150- notional_ = Null<Real>(); // is handled by override of notional()
149+ notional_ = strike_ * quantity_;
151150 notionalCurrency_ = currency_;
152151
153152 additionalData_[" quantity" ] = quantity_;
@@ -167,18 +166,6 @@ void CommodityForward::build(const boost::shared_ptr<EngineFactory>& engineFacto
167166 additionalData_[" isdaTransaction" ] = string (" " );
168167}
169168
170- Real CommodityForward::notional () const {
171- // try to get the notional from the additional results of the instrument
172- try {
173- return instrument_->qlInstrument (true )->result <Real>(" currentNotional" );
174- } catch (const std::exception& e) {
175- if (strcmp (e.what (), " currentNotional not provided" ))
176- ALOG (" error when retrieving notional: " << e.what ());
177- }
178- // if not provided, return null
179- return Null<Real>();
180- }
181-
182169std::map<AssetClass, std::set<std::string>>
183170CommodityForward::underlyingIndices (const boost::shared_ptr<ReferenceDataManager>& referenceDataManager) const {
184171 return {{AssetClass::COM, std::set<std::string>({commodityName_})}};
You can’t perform that action at this time.
0 commit comments