Logo
Reference manual - version orea_version
Public Member Functions | Public Attributes | List of all members
SensitivityRecord Struct Reference

#include <orea/engine/sensitivityrecord.hpp>

Public Member Functions

 SensitivityRecord ()
 
 SensitivityRecord (const std::string &tradeId, bool isPar, const RiskFactorKey &key_1, const std::string &desc_1, QuantLib::Real shift_1, const RiskFactorKey &key_2, const std::string &desc_2, QuantLib::Real shift_2, const std::string &currency, QuantLib::Real baseNpv, QuantLib::Real delta, QuantLib::Real gamma)
 Full ctor to allow braced initialisation.
 
bool operator== (const SensitivityRecord &sr) const
 
bool operator!= (const SensitivityRecord &sr) const
 
bool operator< (const SensitivityRecord &sr) const
 
 operator bool () const
 
bool isCrossGamma () const
 True if a SensitivityRecord is a cross gamma, otherwise false.
 

Public Attributes

std::string tradeId
 
bool isPar
 
RiskFactorKey key_1
 
std::string desc_1
 
QuantLib::Real shift_1
 
RiskFactorKey key_2
 
std::string desc_2
 
QuantLib::Real shift_2
 
std::string currency
 
QuantLib::Real baseNpv
 
QuantLib::Real delta
 
QuantLib::Real gamma
 

Detailed Description

A container for holding sensitivity records.

  1. isPar is true for a par sensitivity, false for a zero sensitivity
  2. the currency member is the currency of the baseNpv, delta and gamma
  3. key_2 and desc_2 are empty except for cross gamma sensitivities
  4. for cross gamma, the sensitivity is in the gamma member

Constructor & Destructor Documentation

◆ SensitivityRecord()

Default ctor to prevent uninitialised variables Could use in class initialisation and avoid ctor but may be confusing

Member Function Documentation

◆ operator==()

bool operator== ( const SensitivityRecord sr) const

Comparison operators for SensitivityRecord

◆ operator bool()

operator bool ( ) const
explicit

This method will be used to denote the end of a stream of SensitivityRecord objects.