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
SeasonalityQuote Class Reference

Inflation seasonality data class. More...

#include <ored/marketdata/marketdatum.hpp>

+ Inheritance diagram for SeasonalityQuote:
+ Collaboration diagram for SeasonalityQuote:

Public Member Functions

 SeasonalityQuote ()
 
 SeasonalityQuote (Real value, Date asofDate, const string &name, const string &index, const string &type, const string &month)
 
QuantLib::ext::shared_ptr< MarketDatumclone () override
 Make a copy of the market datum. More...
 
string index ()
 
string type ()
 
string month ()
 
QuantLib::Size applyMonth () 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 index_
 
string type_
 
string month_
 

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

Inflation seasonality data class.

This class holds single market points of type

Definition at line 1389 of file marketdatum.hpp.

Constructor & Destructor Documentation

◆ SeasonalityQuote() [1/2]

Definition at line 1391 of file marketdatum.hpp.

1391{}

◆ SeasonalityQuote() [2/2]

SeasonalityQuote ( Real  value,
Date  asofDate,
const string &  name,
const string &  index,
const string &  type,
const string &  month 
)

Member Function Documentation

◆ clone()

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

Make a copy of the market datum.

Reimplemented from MarketDatum.

Definition at line 1397 of file marketdatum.hpp.

1397 {
1398 return QuantLib::ext::make_shared<SeasonalityQuote>(quote_->value(), asofDate_, name_, index(), type(), month());
1399 }
Handle< Quote > quote_
+ Here is the call graph for this function:

◆ index()

string index ( )

Definition at line 1401 of file marketdatum.hpp.

1401{ return index_; }
+ Here is the caller graph for this function:

◆ type()

string type ( )

Definition at line 1402 of file marketdatum.hpp.

1402{ return type_; }
+ Here is the caller graph for this function:

◆ month()

string month ( )

Definition at line 1403 of file marketdatum.hpp.

1403{ return month_; }
+ Here is the caller graph for this function:

◆ applyMonth()

QuantLib::Size applyMonth ( ) const

Definition at line 262 of file marketdatum.cpp.

262 {
263 QL_REQUIRE(month_.length() == 3, "The month string must be of "
264 "the form MMM");
265 std::vector<std::string> allMonths = {"JAN", "FEB", "MAR", "APR", "MAY", "JUN",
266 "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"};
267 QuantLib::Size applyMonth;
268 auto it = std::find(allMonths.begin(), allMonths.end(), month_);
269 if (it != allMonths.end()) {
270 applyMonth = std::distance(allMonths.begin(), it) + 1;
271 } else {
272 QL_FAIL("Unknown month string: " << month_);
273 }
274 return applyMonth;
275}
QuantLib::Size applyMonth() const
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize()

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

Definition at line 552 of file marketdatum.cpp.

552 {
553 ar& boost::serialization::base_object<MarketDatum>(*this);
554 ar& index_;
555 ar& type_;
556 ar& month_;
557}

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Serialization.

Definition at line 1411 of file marketdatum.hpp.

Member Data Documentation

◆ index_

string index_
private

Definition at line 1407 of file marketdatum.hpp.

◆ type_

string type_
private

Definition at line 1408 of file marketdatum.hpp.

◆ month_

string month_
private

Definition at line 1409 of file marketdatum.hpp.