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

Swap market data class. More...

#include <ored/marketdata/marketdatum.hpp>

+ Inheritance diagram for SwapQuote:
+ Collaboration diagram for SwapQuote:

Public Member Functions

 SwapQuote ()
 
 SwapQuote (Real value, Date asofDate, const string &name, QuoteType quoteType, string ccy, Period fwdStart, Period term, Period tenor, const std::string &indexName="")
 Constructor if fwdStart / tenor is given. More...
 
 SwapQuote (Real value, Date asofDate, const string &name, QuoteType quoteType, string ccy, Date startDate, Date maturityDate, Period tenor, const std::string &indexName="")
 Constructor if startDate, maturityDate is given. 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 ccy_
 
Period fwdStart_
 
Period term_
 
Period tenor_
 
std::string indexName_
 
Date startDate_
 
Date maturityDate_
 
class boost::serialization::access
 Serialization. More...
 
const string & ccy () const
 
const Period & fwdStart () const
 
const Period & term () const
 
const Period & tenor () const
 
const std::string & indeName () const
 
const Date & startDate () const
 
const Date & maturityDate () 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

Swap market data class.

This class holds single market points of type

Specific data comprise currency, fwdStart, tenor, term, startDate, maturityDate The constructor accepts either fwdStart/term or startDate/maturityDate

Definition at line 317 of file marketdatum.hpp.

Constructor & Destructor Documentation

◆ SwapQuote() [1/3]

SwapQuote ( )

Definition at line 319 of file marketdatum.hpp.

319{}

◆ SwapQuote() [2/3]

SwapQuote ( Real  value,
Date  asofDate,
const string &  name,
QuoteType  quoteType,
string  ccy,
Period  fwdStart,
Period  term,
Period  tenor,
const std::string &  indexName = "" 
)

Constructor if fwdStart / tenor is given.

Definition at line 321 of file marketdatum.hpp.

324 term_(term), tenor_(tenor), indexName_(indexName), startDate_(Null<Date>()), maturityDate_(Null<Date>()) {}
const string & name() const
QuoteType quoteType() const
const Period & term() const
const string & ccy() const
const Period & fwdStart() const
std::string indexName_
const Period & tenor() const
SafeStack< ValueType > value

◆ SwapQuote() [3/3]

SwapQuote ( Real  value,
Date  asofDate,
const string &  name,
QuoteType  quoteType,
string  ccy,
Date  startDate,
Date  maturityDate,
Period  tenor,
const std::string &  indexName = "" 
)

Constructor if startDate, maturityDate is given.

Definition at line 326 of file marketdatum.hpp.

const Date & maturityDate() const
const Date & startDate() const

Member Function Documentation

◆ clone()

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

Make a copy of the market datum.

Reimplemented from MarketDatum.

Definition at line 332 of file marketdatum.hpp.

332 {
333 if (startDate_ == Null<Date>() && maturityDate_ == Null<Date>())
334 return QuantLib::ext::make_shared<SwapQuote>(quote_->value(), asofDate_, name_, quoteType_, ccy_, fwdStart_, term_,
335 tenor_);
336 else
337 return QuantLib::ext::make_shared<SwapQuote>(quote_->value(), asofDate_, name_, quoteType_, ccy_, startDate_,
339 }
Handle< Quote > quote_

◆ ccy()

const string & ccy ( ) const

Definition at line 343 of file marketdatum.hpp.

343{ return ccy_; }

◆ fwdStart()

const Period & fwdStart ( ) const

Definition at line 344 of file marketdatum.hpp.

344{ return fwdStart_; }

◆ term()

const Period & term ( ) const

Definition at line 345 of file marketdatum.hpp.

345{ return term_; }

◆ tenor()

const Period & tenor ( ) const

Definition at line 346 of file marketdatum.hpp.

346{ return tenor_; }

◆ indeName()

const std::string & indeName ( ) const

Definition at line 347 of file marketdatum.hpp.

347{ return indexName_; }

◆ startDate()

const Date & startDate ( ) const

Definition at line 348 of file marketdatum.hpp.

348{ return startDate_; }

◆ maturityDate()

const Date & maturityDate ( ) const

Definition at line 349 of file marketdatum.hpp.

349{ return maturityDate_; }

◆ serialize()

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

Definition at line 351 of file marketdatum.cpp.

351 {
352 ar& boost::serialization::base_object<MarketDatum>(*this);
353 ar& ccy_;
354 ar& fwdStart_;
355 ar& term_;
356 ar& tenor_;
357 ar& indexName_;
358 ar& startDate_;
359 ar& maturityDate_;
360}

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Serialization.

Definition at line 360 of file marketdatum.hpp.

Member Data Documentation

◆ ccy_

string ccy_
private

Definition at line 352 of file marketdatum.hpp.

◆ fwdStart_

Period fwdStart_
private

Definition at line 353 of file marketdatum.hpp.

◆ term_

Period term_
private

Definition at line 354 of file marketdatum.hpp.

◆ tenor_

Period tenor_
private

Definition at line 355 of file marketdatum.hpp.

◆ indexName_

std::string indexName_
private

Definition at line 356 of file marketdatum.hpp.

◆ startDate_

Date startDate_
private

Definition at line 357 of file marketdatum.hpp.

◆ maturityDate_

Date maturityDate_
private

Definition at line 358 of file marketdatum.hpp.