Logo
Reference manual - version ored_version
Public Member Functions | List of all members
AtmStrike Class Reference

#include <ored/marketdata/strike.hpp>

+ Inheritance diagram for AtmStrike:

Public Member Functions

 AtmStrike ()
 Default constructor.
 
 AtmStrike (QuantLib::DeltaVolQuote::AtmType atmType, boost::optional< QuantLib::DeltaVolQuote::DeltaType > deltaType=boost::none)
 

Inspectors

class boost::serialization::access
 Serialization.
 
QuantLib::DeltaVolQuote::AtmType atmType () const
 Return the ATM type.
 
boost::optional< QuantLib::DeltaVolQuote::DeltaType > deltaType () const
 Return the delta type.
 
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.
 

Additional Inherited Members

Detailed Description

Strike implementation for an at-the-money strike of various types.

Constructor & Destructor Documentation

◆ AtmStrike()

AtmStrike ( QuantLib::DeltaVolQuote::AtmType  atmType,
boost::optional< QuantLib::DeltaVolQuote::DeltaType >  deltaType = boost::none 
)

Explicit constructor. Note that:

  • an atmType of AtmNull throws an error.
  • if atmType is AtmDeltaNeutral, a deltaType is needed.
  • if atmType is not AtmDeltaNeutral, deltaType should not be provided.
  • if atmType is AtmPutCall50, deltaType must be DeltaVolQuote::Fwd.

Member Function Documentation

◆ fromString()

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

Populate AtmStrike object from strStrike.

The strStrike is expected to be of the form: ATM / AtmSpot|AtmFwd|AtmDeltaNeutral|AtmVegaMax|AtmGammaMax|AtmPutCall50 followed by an optional / DEL / Spot|Fwd|PaSpot|PaFwd to specify the delta if it is needed. An exception is thrown if strStrike is not of this form and cannot be parsed properly.

Implements BaseStrike.

◆ toString()

std::string toString ( ) const
overridevirtual

Writes the AtmStrike object to string.

The string representation of the DeltaStrike object is of the form ATM / AtmSpot|AtmFwd|AtmDeltaNeutral|AtmVegaMax|AtmGammaMax|AtmPutCall50 followed by an optional / DEL / Spot|Fwd|PaSpot|PaFwd if the delta type has been populated.

Implements BaseStrike.