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

Equity/Index Option data class. More...

#include <ored/marketdata/marketdatum.hpp>

+ Inheritance diagram for EquityOptionQuote:
+ Collaboration diagram for EquityOptionQuote:

Public Member Functions

 EquityOptionQuote ()
 
 EquityOptionQuote (Real value, Date asofDate, const string &name, QuoteType quoteType, string equityName, string ccy, string expiry, const QuantLib::ext::shared_ptr< BaseStrike > &strike, bool isCall=true)
 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

string eqName_
 
string ccy_
 
string expiry_
 
QuantLib::ext::shared_ptr< BaseStrikestrike_
 
bool isCall_
 
class boost::serialization::access
 Serialization. More...
 
const string & eqName () const
 
const string & ccy () const
 
const string & expiry () const
 
const QuantLib::ext::shared_ptr< BaseStrike > & strike () const
 
bool isCall ()
 
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

Equity/Index Option data class.

This class holds single market points of type

Definition at line 1547 of file marketdatum.hpp.

Constructor & Destructor Documentation

◆ EquityOptionQuote() [1/2]

Definition at line 1549 of file marketdatum.hpp.

1549{}

◆ EquityOptionQuote() [2/2]

EquityOptionQuote ( Real  value,
Date  asofDate,
const string &  name,
QuoteType  quoteType,
string  equityName,
string  ccy,
string  expiry,
const QuantLib::ext::shared_ptr< BaseStrike > &  strike,
bool  isCall = true 
)

Constructor.

Definition at line 161 of file marketdatum.cpp.

166
167 // we will call a parser on the expiry string, to ensure it is a correctly-formatted date or tenor
168 Date tmpDate;
169 Period tmpPeriod;
170 bool isDate;
171 parseDateOrPeriod(expiry, tmpDate, tmpPeriod, isDate);
172
173 if (isDate)
174 QL_REQUIRE(asofDate <= tmpDate, "EquityOptionQuote: Invalid EquityOptionQuote, expiry date "
175 << tmpDate << " must be after asof date " << asofDate);
176}
const string & ccy() const
QuantLib::ext::shared_ptr< BaseStrike > strike_
const QuantLib::ext::shared_ptr< BaseStrike > & strike() const
const string & expiry() const
const string & name() const
QuoteType quoteType() const
SafeStack< ValueType > value
boost::variant< QuantLib::Date, QuantLib::Period > parseDateOrPeriod(const string &s)
Convert text to QuantLib::Period or QuantLib::Date.
Definition: parsers.cpp:493
+ Here is the call graph for this function:

Member Function Documentation

◆ clone()

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

Make a copy of the market datum.

Reimplemented from MarketDatum.

Definition at line 1556 of file marketdatum.hpp.

1556 {
1557 return QuantLib::ext::make_shared<EquityOptionQuote>(quote_->value(), asofDate_, name_, quoteType_, eqName_, ccy_, expiry_, strike_, isCall_);
1558 }
Handle< Quote > quote_

◆ eqName()

const string & eqName ( ) const

Definition at line 1562 of file marketdatum.hpp.

1562{ return eqName_; }

◆ ccy()

const string & ccy ( ) const

Definition at line 1563 of file marketdatum.hpp.

1563{ return ccy_; }

◆ expiry()

const string & expiry ( ) const

Definition at line 1564 of file marketdatum.hpp.

1564{ return expiry_; }
+ Here is the caller graph for this function:

◆ strike()

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

Definition at line 1565 of file marketdatum.hpp.

1565{ return strike_; }

◆ isCall()

bool isCall ( )

Definition at line 1566 of file marketdatum.hpp.

1566{ return isCall_; }

◆ serialize()

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

Definition at line 579 of file marketdatum.cpp.

579 {
580 ar& boost::serialization::base_object<MarketDatum>(*this);
581 ar& eqName_;
582 ar& ccy_;
583 ar& expiry_;
584 ar& strike_;
585 ar& isCall_;
586}

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Serialization.

Definition at line 1575 of file marketdatum.hpp.

Member Data Documentation

◆ eqName_

string eqName_
private

Definition at line 1569 of file marketdatum.hpp.

◆ ccy_

string ccy_
private

Definition at line 1570 of file marketdatum.hpp.

◆ expiry_

string expiry_
private

Definition at line 1571 of file marketdatum.hpp.

◆ strike_

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

Definition at line 1572 of file marketdatum.hpp.

◆ isCall_

bool isCall_
private

Definition at line 1573 of file marketdatum.hpp.