Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | List of all members
EquityPositionInstrumentWrapperEngine Class Reference

#include <ored/portfolio/equityposition.hpp>

+ Inheritance diagram for EquityPositionInstrumentWrapperEngine:
+ Collaboration diagram for EquityPositionInstrumentWrapperEngine:

Public Member Functions

void calculate () const override
 

Detailed Description

Definition at line 131 of file equityposition.hpp.

Member Function Documentation

◆ calculate()

void calculate ( ) const
override

Definition at line 166 of file equityposition.cpp.

166 {
167 Real result = 0.0;
168 for (Size i = 0; i < arguments_.equities_.size(); ++i) {
169 Real tmp = arguments_.quantity_ * arguments_.equities_[i]->equitySpot()->value();
170 if (!arguments_.fxConversion_[i].empty()) {
171 tmp *= arguments_.fxConversion_[i]->value();
172 }
173 result += tmp * arguments_.weights_[i];
174 }
175 if (!arguments_.npvCcyConversion_.empty()) {
176 result *= arguments_.npvCcyConversion_->value();
177 }
178 results_.value = result;
179}
const Instrument::results * results_
Swap::arguments * arguments_