Logo
Reference manual - version orea_version
Public Member Functions | List of all members
NPVCalculatorFXT0 Class Reference

NPVCalculatorFXT0. More...

#include <orea/engine/valuationcalculator.hpp>

+ Inheritance diagram for NPVCalculatorFXT0:

Public Member Functions

 NPVCalculatorFXT0 (const std::string &baseCcyCode, const boost::shared_ptr< Market > &t0Market, Size index=0)
 base ccy and index to write to
 
virtual void calculate (const boost::shared_ptr< Trade > &trade, Size tradeIndex, const boost::shared_ptr< SimMarket > &simMarket, boost::shared_ptr< NPVCube > &outputCube, boost::shared_ptr< NPVCube > &outputCubeNettingSet, const Date &date, Size dateIndex, Size sample, bool isCloseOut=false) override
 
virtual void calculateT0 (const boost::shared_ptr< Trade > &trade, Size tradeIndex, const boost::shared_ptr< SimMarket > &simMarket, boost::shared_ptr< NPVCube > &outputCube, boost::shared_ptr< NPVCube > &outputCubeNettingSet) override
 
Real npv (Size tradeIndex, const boost::shared_ptr< Trade > &trade, const boost::shared_ptr< SimMarket > &simMarket)
 
void init (const boost::shared_ptr< Portfolio > &portfolio, const boost::shared_ptr< SimMarket > &simMarket) override
 
void initScenario () override
 

Detailed Description

NPVCalculatorFXT0.

Calculate the NPV of the given trade, convert to base currency USING T0 RATES and divide by the numeraire This can sometimes be useful for finite difference ("bump-revalue") sensitivities (for FX spot sensis, if we wish to bump the spot in the pricing model, but still convert to base using static FX) If the NPV() call throws, we log an exception and write 0 to the cube