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

#include <ored/marketdata/marketdatum.hpp>

+ Inheritance diagram for ZeroQuote:
+ Collaboration diagram for ZeroQuote:

Public Member Functions

 ZeroQuote ()
 
 ZeroQuote (Real value, Date asofDate, const string &name, QuoteType quoteType, const string &ccy, Date date, DayCounter dayCounter, Period tenor=Period())
 Constructor. More...
 
QuantLib::ext::shared_ptr< MarketDatumclone () override
 Make a copy of the market datum. More...
 
const string & ccy () const
 Inspectors. More...
 
Date date () const
 
DayCounter dayCounter () const
 
const Period & tenor () const
 
bool tenorBased () const
 
- 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
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

string ccy_
 
Date date_
 
DayCounter dayCounter_
 
Period tenor_
 
bool tenorBased_
 

Friends

class boost::serialization::access
 Serialization. More...
 

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

Definition at line 364 of file marketdatum.hpp.

Constructor & Destructor Documentation

◆ ZeroQuote() [1/2]

ZeroQuote ( )

Definition at line 366 of file marketdatum.hpp.

366{}

◆ ZeroQuote() [2/2]

ZeroQuote ( Real  value,
Date  asofDate,
const string &  name,
QuoteType  quoteType,
const string &  ccy,
Date  date,
DayCounter  dayCounter,
Period  tenor = Period() 
)

Constructor.

Definition at line 368 of file marketdatum.hpp.

372 // Minimal adjustment in the absence of a calendar
373 QL_REQUIRE(date_ != Date() || tenor != Period(), "ZeroQuote: either date or period is required");
374 tenorBased_ = (date_ == Date());
375 }
const string & name() const
QuoteType quoteType() const
const string & ccy() const
Inspectors.
DayCounter dayCounter() const
const Period & tenor() const
SafeStack< ValueType > value
+ 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 378 of file marketdatum.hpp.

378 {
379 return QuantLib::ext::make_shared<ZeroQuote>(quote_->value(), asofDate_, name_, quoteType_, ccy_, date_, dayCounter_, tenor_);
380 }
Handle< Quote > quote_

◆ ccy()

const string & ccy ( ) const

Inspectors.

Definition at line 384 of file marketdatum.hpp.

384{ return ccy_; }

◆ date()

Date date ( ) const

Definition at line 385 of file marketdatum.hpp.

385{ return date_; }

◆ dayCounter()

DayCounter dayCounter ( ) const

Definition at line 386 of file marketdatum.hpp.

386{ return dayCounter_; }

◆ tenor()

const Period & tenor ( ) const

Definition at line 387 of file marketdatum.hpp.

387{ return tenor_; }
+ Here is the caller graph for this function:

◆ tenorBased()

bool tenorBased ( ) const

Definition at line 388 of file marketdatum.hpp.

388{ return tenorBased_; }

◆ serialize()

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

Definition at line 362 of file marketdatum.cpp.

362 {
363 ar& boost::serialization::base_object<MarketDatum>(*this);
364 ar& ccy_;
365 ar& date_;
366 ar& dayCounter_;
367 ar& tenor_;
368 ar& tenorBased_;
369}

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Serialization.

Definition at line 397 of file marketdatum.hpp.

Member Data Documentation

◆ ccy_

string ccy_
private

Definition at line 391 of file marketdatum.hpp.

◆ date_

Date date_
private

Definition at line 392 of file marketdatum.hpp.

◆ dayCounter_

DayCounter dayCounter_
private

Definition at line 393 of file marketdatum.hpp.

◆ tenor_

Period tenor_
private

Definition at line 394 of file marketdatum.hpp.

◆ tenorBased_

bool tenorBased_
private

Definition at line 395 of file marketdatum.hpp.