Logo
Reference manual - version orea_version
ExerciseCalculator Class Reference

ExerciseCalculator. More...

#include <orea/engine/valuationcalculator.hpp>

Inheritance diagram for ExerciseCalculator:

Public Member Functions

 ExerciseCalculator (const std::string &baseCcyCode, Size index=1, bool laxFxConversion=false)
 base ccy and index to write to
Real npv (Size tradeIndex, const QuantLib::ext::shared_ptr< Trade > &trade, const QuantLib::ext::shared_ptr< SimMarket > &simMarket) override
Public Member Functions inherited from NPVCalculator
 NPVCalculator (const std::string &baseCcyCode, Size index=0, bool laxFxConversion=false)
 base ccy and index to write to
void calculate (const QuantLib::ext::shared_ptr< Trade > &trade, Size tradeIndex, const QuantLib::ext::shared_ptr< SimMarket > &simMarket, QuantLib::ext::shared_ptr< NPVCube > &outputCube, QuantLib::ext::shared_ptr< NPVCube > &outputCubeNettingSet, const Date &date, Size dateIndex, Size sample, bool isCloseOut=false) override
void calculateT0 (const QuantLib::ext::shared_ptr< Trade > &trade, Size tradeIndex, const QuantLib::ext::shared_ptr< SimMarket > &simMarket, QuantLib::ext::shared_ptr< NPVCube > &outputCube, QuantLib::ext::shared_ptr< NPVCube > &outputCubeNettingSet) override
void init (const QuantLib::ext::shared_ptr< Portfolio > &portfolio, const QuantLib::ext::shared_ptr< SimMarket > &simMarket) override
void initScenario () override

Additional Inherited Members

Protected Attributes inherited from NPVCalculator
std::string baseCcyCode_
Size index_
bool laxFxConversion_
std::vector< Handle< Quote > > ccyQuotes_
std::vector< double > fxRates_
std::vector< Size > tradeCcyIndex_

Detailed Description

ExerciseCalculator.

Calculate the exercise value of the given (option wrapper) trade, if exercised. Te exercise value is not converted into base currency, nor discounted by the numeraire, since this is meant to be an indicator whether exercise happened or not, i.e. it will be flat on a path beyond the exercise date. In case of cash settlement the NPV beyond exercise is simply zero, in case of physical settlement it is the underlying NPV. The exercise vlaue is stored in the NPVCube at an extra depth. For any non-option(wrapper) trade, or if not exercised, we store Null<Real>(). If the NPV() call throws, we log an exception and write 0 to the cube

Member Function Documentation

◆ npv()

Real npv ( Size tradeIndex,
const QuantLib::ext::shared_ptr< Trade > & trade,
const QuantLib::ext::shared_ptr< SimMarket > & simMarket )
overridevirtual

Reimplemented from NPVCalculator.