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

Foreign exchange rate data class. More...

#include <ored/marketdata/marketdatum.hpp>

+ Inheritance diagram for FXForwardQuote:
+ Collaboration diagram for FXForwardQuote:

Public Types

enum class  FxFwdString { ON , TN , SN }
 
- 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...
 

Public Member Functions

 FXForwardQuote ()
 
 FXForwardQuote (Real value, Date asofDate, const string &name, QuoteType quoteType, string unitCcy, string ccy, const boost::variant< QuantLib::Period, FxFwdString > &term, Real conversionFactor=1.0)
 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 unitCcy_
 
string ccy_
 
boost::variant< QuantLib::Period, FxFwdStringterm_
 
Real conversionFactor_
 
class boost::serialization::access
 Serialization. More...
 
const string & unitCcy () const
 
const string & ccy () const
 
const boost::variant< QuantLib::Period, FxFwdString > & term () const
 
Real conversionFactor () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Additional Inherited Members

- Protected Attributes inherited from MarketDatum
Handle< Quote > quote_
 
Date asofDate_
 
string name_
 
InstrumentType instrumentType_
 
QuoteType quoteType_
 

Detailed Description

Foreign exchange rate data class.

This class holds single market points of type

The quote is expected in "forward points" = (FXFwd - FXSpot) / conversionFactor

Definition at line 1143 of file marketdatum.hpp.

Member Enumeration Documentation

◆ FxFwdString

enum class FxFwdString
strong

Constructor & Destructor Documentation

◆ FXForwardQuote() [1/2]

Definition at line 1147 of file marketdatum.hpp.

1147{}

◆ FXForwardQuote() [2/2]

FXForwardQuote ( Real  value,
Date  asofDate,
const string &  name,
QuoteType  quoteType,
string  unitCcy,
string  ccy,
const boost::variant< QuantLib::Period, FxFwdString > &  term,
Real  conversionFactor = 1.0 
)

Constructor.

Definition at line 1149 of file marketdatum.hpp.

const string & ccy() const
const boost::variant< QuantLib::Period, FxFwdString > & term() const
boost::variant< QuantLib::Period, FxFwdString > term_
const string & unitCcy() const
const string & name() const
QuoteType quoteType() const
SafeStack< ValueType > value

Member Function Documentation

◆ clone()

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

Make a copy of the market datum.

Reimplemented from MarketDatum.

Definition at line 1155 of file marketdatum.hpp.

1155 {
1156 return QuantLib::ext::make_shared<FXForwardQuote>(quote_->value(), asofDate_, name_, quoteType_, unitCcy_, ccy_, term_, conversionFactor_);
1157 }
Handle< Quote > quote_

◆ unitCcy()

const string & unitCcy ( ) const

Definition at line 1161 of file marketdatum.hpp.

1161{ return unitCcy_; }

◆ ccy()

const string & ccy ( ) const

Definition at line 1162 of file marketdatum.hpp.

1162{ return ccy_; }

◆ term()

const boost::variant< QuantLib::Period, FxFwdString > & term ( ) const

Definition at line 1163 of file marketdatum.hpp.

1163{ return term_; }

◆ conversionFactor()

Real conversionFactor ( ) const

Definition at line 1164 of file marketdatum.hpp.

1164{ return conversionFactor_; }

◆ serialize()

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

Definition at line 508 of file marketdatum.cpp.

508 {
509 ar& boost::serialization::base_object<MarketDatum>(*this);
510 ar& unitCcy_;
511 ar& ccy_;
512 ar& term_;
514}

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Serialization.

Definition at line 1172 of file marketdatum.hpp.

Member Data Documentation

◆ unitCcy_

string unitCcy_
private

Definition at line 1167 of file marketdatum.hpp.

◆ ccy_

string ccy_
private

Definition at line 1168 of file marketdatum.hpp.

◆ term_

boost::variant<QuantLib::Period, FxFwdString> term_
private

Definition at line 1169 of file marketdatum.hpp.

◆ conversionFactor_

Real conversionFactor_
private

Definition at line 1170 of file marketdatum.hpp.