Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CommodityOptionQuote Class Reference

Commodity option data class. More...

#include <ored/marketdata/marketdatum.hpp>

+ Inheritance diagram for CommodityOptionQuote:
+ Collaboration diagram for CommodityOptionQuote:

Public Member Functions

 CommodityOptionQuote ()
 
 CommodityOptionQuote (QuantLib::Real value, const QuantLib::Date &asof, const std::string &name, QuoteType quoteType, const std::string &commodityName, const std::string &quoteCurrency, const QuantLib::ext::shared_ptr< Expiry > &expiry, const QuantLib::ext::shared_ptr< BaseStrike > &strike, QuantLib::Option::Type optionType=QuantLib::Option::Call)
 Constructor. More...
 
QuantLib::ext::shared_ptr< MarketDatumclone () override
 Make a copy of the market datum. More...
 
- Public Member Functions inherited from MarketDatum
 MarketDatum ()
 
 MarketDatum (Real value, Date asofDate, const string &name, QuoteType quoteType, InstrumentType instrumentType)
 Constructor. More...
 
virtual ~MarketDatum ()
 Default destructor. More...
 
virtual QuantLib::ext::shared_ptr< MarketDatumclone ()
 Make a copy of the market datum. More...
 
const string & name () const
 
const Handle< Quote > & quote () const
 
Date asofDate () const
 
InstrumentType instrumentType () const
 
QuoteType quoteType () const
 

Inspectors

std::string commodityName_
 
std::string quoteCurrency_
 
QuantLib::ext::shared_ptr< Expiryexpiry_
 
QuantLib::ext::shared_ptr< BaseStrikestrike_
 
QuantLib::Option::Type optionType_
 
class boost::serialization::access
 Serialization. More...
 
const std::string & commodityName () const
 
const std::string & quoteCurrency () const
 
const QuantLib::ext::shared_ptr< Expiry > & expiry () const
 
const QuantLib::ext::shared_ptr< BaseStrike > & strike () const
 
QuantLib::Option::Type optionType () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Additional Inherited Members

- Public Types inherited from MarketDatum
enum class  InstrumentType {
  ZERO , DISCOUNT , MM , MM_FUTURE ,
  OI_FUTURE , FRA , IMM_FRA , IR_SWAP ,
  BASIS_SWAP , BMA_SWAP , CC_BASIS_SWAP , CC_FIX_FLOAT_SWAP ,
  CDS , CDS_INDEX , FX_SPOT , FX_FWD ,
  HAZARD_RATE , RECOVERY_RATE , SWAPTION , CAPFLOOR ,
  FX_OPTION , ZC_INFLATIONSWAP , ZC_INFLATIONCAPFLOOR , YY_INFLATIONSWAP ,
  YY_INFLATIONCAPFLOOR , SEASONALITY , EQUITY_SPOT , EQUITY_FWD ,
  EQUITY_DIVIDEND , EQUITY_OPTION , BOND , BOND_OPTION ,
  INDEX_CDS_OPTION , COMMODITY_SPOT , COMMODITY_FWD , CORRELATION ,
  COMMODITY_OPTION , CPR , RATING , NONE
}
 Supported market instrument types. More...
 
enum class  QuoteType {
  BASIS_SPREAD , CREDIT_SPREAD , CONV_CREDIT_SPREAD , YIELD_SPREAD ,
  HAZARD_RATE , RATE , RATIO , PRICE ,
  RATE_LNVOL , RATE_NVOL , RATE_SLNVOL , BASE_CORRELATION ,
  SHIFT , TRANSITION_PROBABILITY , NONE
}
 Supported market quote types. More...
 
- Protected Attributes inherited from MarketDatum
Handle< Quote > quote_
 
Date asofDate_
 
string name_
 
InstrumentType instrumentType_
 
QuoteType quoteType_
 

Detailed Description

Commodity option data class.

This class holds single market points of type COMMODITY_OPTION

Definition at line 1790 of file marketdatum.hpp.

Constructor & Destructor Documentation

◆ CommodityOptionQuote() [1/2]

Definition at line 1792 of file marketdatum.hpp.

1792: optionType_(QuantLib::Option::Call) {}
QuantLib::Option::Type optionType_

◆ CommodityOptionQuote() [2/2]

CommodityOptionQuote ( QuantLib::Real  value,
const QuantLib::Date &  asof,
const std::string &  name,
QuoteType  quoteType,
const std::string &  commodityName,
const std::string &  quoteCurrency,
const QuantLib::ext::shared_ptr< Expiry > &  expiry,
const QuantLib::ext::shared_ptr< BaseStrike > &  strike,
QuantLib::Option::Type  optionType = QuantLib::Option::Call 
)

Constructor.

Parameters
valueThe volatility value
asofThe quote date
nameThe quote name
quoteTypeThe quote type, should be RATE_LNVOL
commodityNameThe name of the underlying commodity
quoteCurrencyThe quote currency
expiryExpiry object defining the quote's expiry
strikeStrike object defining the quote's strike
optionTypeThe option type.

Member Function Documentation

◆ clone()

QuantLib::ext::shared_ptr< MarketDatum > clone ( )
overridevirtual

Make a copy of the market datum.

Reimplemented from MarketDatum.

Definition at line 1811 of file marketdatum.hpp.

1811 {
1812 return QuantLib::ext::make_shared<CommodityOptionQuote>(quote_->value(), asofDate_, name_,
1814 }
QuantLib::ext::shared_ptr< Expiry > expiry_
QuantLib::ext::shared_ptr< BaseStrike > strike_
Handle< Quote > quote_

◆ commodityName()

const std::string & commodityName ( ) const

Definition at line 1818 of file marketdatum.hpp.

1818{ return commodityName_; }

◆ quoteCurrency()

const std::string & quoteCurrency ( ) const

Definition at line 1819 of file marketdatum.hpp.

1819{ return quoteCurrency_; }

◆ expiry()

const QuantLib::ext::shared_ptr< Expiry > & expiry ( ) const

Definition at line 1820 of file marketdatum.hpp.

1820{ return expiry_; }

◆ strike()

const QuantLib::ext::shared_ptr< BaseStrike > & strike ( ) const

Definition at line 1821 of file marketdatum.hpp.

1821{ return strike_; }

◆ optionType()

QuantLib::Option::Type optionType ( ) const

Definition at line 1822 of file marketdatum.hpp.

1822{ return optionType_; }

◆ serialize()

template void serialize ( Archive &  ar,
const unsigned int  version 
)
private

Definition at line 624 of file marketdatum.cpp.

624 {
625 ar& boost::serialization::base_object<MarketDatum>(*this);
626 ar& commodityName_;
627 ar& quoteCurrency_;
628 ar& expiry_;
629 ar& strike_;
630}

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Serialization.

Definition at line 1832 of file marketdatum.hpp.

Member Data Documentation

◆ commodityName_

std::string commodityName_
private

Definition at line 1826 of file marketdatum.hpp.

◆ quoteCurrency_

std::string quoteCurrency_
private

Definition at line 1827 of file marketdatum.hpp.

◆ expiry_

QuantLib::ext::shared_ptr<Expiry> expiry_
private

Definition at line 1828 of file marketdatum.hpp.

◆ strike_

QuantLib::ext::shared_ptr<BaseStrike> strike_
private

Definition at line 1829 of file marketdatum.hpp.

◆ optionType_

QuantLib::Option::Type optionType_
private

Definition at line 1830 of file marketdatum.hpp.