Logo
Reference manual - version ored_version
MoneynessStrike Class Reference

#include <ored/marketdata/strike.hpp>

Inheritance diagram for MoneynessStrike:

Public Types

enum class  Type { Spot , Forward }

Public Member Functions

 MoneynessStrike ()
 Default constructor.
 MoneynessStrike (Type type, QuantLib::Real moneyness)
 Explicit constructor.

Inspectors

class boost::serialization::access
 Serialization.
Type type () const
 Return the moneyness type.
QuantLib::Real moneyness () const
 Return the moneyness level.
void fromString (const std::string &strStrike) override
std::string toString () const override
bool equal_to (const BaseStrike &other) const override
 Override in derived classes to compare specific Strikes.

Detailed Description

Strike implementation where the strike is described by a moneyness type and a moneyness level.

Member Enumeration Documentation

◆ Type

enum class Type
strong

The MoneynessStrike type.

  • When the moneyness type is Spot, the moneyness level will be interpreted as the implicit strike divided by the spot value.
  • When the moneyness type is Forward, the moneyness level will be interpreted as the implicit strike divided by the forward value.

Member Function Documentation

◆ fromString()

void fromString ( const std::string & strStrike)
overridevirtual

Populate MoneynessStrike object from strStrike.

The strStrike is expected to be of the form MNY / Spot|Fwd / MONEYNESS_VALUE.

Implements BaseStrike.

◆ toString()

std::string toString ( ) const
overridevirtual

Writes the MoneynessStrike object to string.

The string representation of the MoneynessStrike object is of the form MNY / Spot|Fwd / MONEYNESS_VALUE.

Implements BaseStrike.

◆ equal_to()

bool equal_to ( const BaseStrike & other) const
overrideprotectedvirtual

Override in derived classes to compare specific Strikes.

Implements BaseStrike.