File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ void CommodityForward::build(const boost::shared_ptr<EngineFactory>& engineFacto
148148 npvCurrency_ = fixingDate_==Date () ? currency_ : payCcy_;
149149
150150 // notional_ = strike_ * quantity_;
151- notional_ = Null<Real>(); // is handled by override of notional()
151+ notional_ = strike_ * quantity_;
152152 notionalCurrency_ = currency_;
153153
154154 additionalData_[" quantity" ] = quantity_;
@@ -168,17 +168,7 @@ void CommodityForward::build(const boost::shared_ptr<EngineFactory>& engineFacto
168168 additionalData_[" isdaTransaction" ] = string (" " );
169169}
170170
171- Real CommodityForward::notional () const {
172- // try to get the notional from the additional results of the instrument
173- try {
174- return instrument_->qlInstrument (true )->result <Real>(" currentNotional" );
175- } catch (const std::exception& e) {
176- if (strcmp (e.what (), " currentNotional not provided" ))
177- ALOG (" error when retrieving notional: " << e.what ());
178- }
179- // if not provided, return null
180- return Null<Real>();
181- }
171+ Real CommodityForward::notional () const { return notional_; }
182172
183173std::map<AssetClass, std::set<std::string>>
184174CommodityForward::underlyingIndices (const boost::shared_ptr<ReferenceDataManager>& referenceDataManager) const {
You can’t perform that action at this time.
0 commit comments