Logo
Reference manual - version qle_version
CrossCurrencyPriceTermStructure Class Reference

Cross currency price term structure. More...

#include <qle/termstructures/crosscurrencypricetermstructure.hpp>

Inheritance diagram for CrossCurrencyPriceTermStructure:

Public Member Functions

Constructors
 CrossCurrencyPriceTermStructure (const QuantLib::Date &referenceDate, const QuantLib::Handle< PriceTermStructure > &basePriceTs, const QuantLib::Handle< QuantLib::Quote > &fxSpot, const QuantLib::Handle< QuantLib::YieldTermStructure > &baseCurrencyYts, const QuantLib::Handle< QuantLib::YieldTermStructure > &yts, const QuantLib::Currency &currency)
 CrossCurrencyPriceTermStructure (QuantLib::Natural settlementDays, const QuantLib::Handle< PriceTermStructure > &basePriceTs, const QuantLib::Handle< QuantLib::Quote > &fxSpot, const QuantLib::Handle< QuantLib::YieldTermStructure > &baseCurrencyYts, const QuantLib::Handle< QuantLib::YieldTermStructure > &yts, const QuantLib::Currency &currency)
TermStructure interface
QuantLib::Date maxDate () const override
QuantLib::Time maxTime () const override
PriceTermStructure interface
QuantLib::Time minTime () const override
 The minimum time for which the curve can return values.
std::vector< QuantLib::Date > pillarDates () const override
 The pillar dates for the PriceTermStructure.
const QuantLib::Currency & currency () const override
 The currency in which prices are expressed.
Public Member Functions inherited from PriceTermStructure
 PriceTermStructure (const QuantLib::DayCounter &dc=QuantLib::DayCounter())
 PriceTermStructure (const QuantLib::Date &referenceDate, const QuantLib::Calendar &cal=QuantLib::Calendar(), const QuantLib::DayCounter &dc=QuantLib::DayCounter())
 PriceTermStructure (QuantLib::Natural settlementDays, const QuantLib::Calendar &cal, const QuantLib::DayCounter &dc=QuantLib::DayCounter())
QuantLib::Real price (QuantLib::Time t, bool extrapolate=false) const
QuantLib::Real price (const QuantLib::Date &d, bool extrapolate=false) const
void update () override

Inspectors

const QuantLib::Handle< PriceTermStructure > & basePriceTs () const
 The price term structure in base currency.
const QuantLib::Handle< QuantLib::Quote > & fxSpot () const
 The FX spot rate, number of units of this price term structure's currency per unit of the base currency.
const QuantLib::Handle< QuantLib::YieldTermStructure > & baseCurrencyYts () const
 The yield term structure for the base currency.
const QuantLib::Handle< QuantLib::YieldTermStructure > & yts () const
 The yield term structure for this price term structure's currency.
QuantLib::Real priceImpl (QuantLib::Time t) const override
 Price calculation.

Additional Inherited Members

Protected Member Functions inherited from PriceTermStructure
void checkRange (QuantLib::Time t, bool extrapolate) const
 Extra time range check for minimum time, then calls TermStructure::checkRange.

Detailed Description

Cross currency price term structure.

This class creates a price term structure in a given currency using an already constructed price term structure in a different currency.

Constructor & Destructor Documentation

◆ CrossCurrencyPriceTermStructure() [1/2]

CrossCurrencyPriceTermStructure ( const QuantLib::Date & referenceDate,
const QuantLib::Handle< PriceTermStructure > & basePriceTs,
const QuantLib::Handle< QuantLib::Quote > & fxSpot,
const QuantLib::Handle< QuantLib::YieldTermStructure > & baseCurrencyYts,
const QuantLib::Handle< QuantLib::YieldTermStructure > & yts,
const QuantLib::Currency & currency )

Fixed reference date based price term structure.

Parameters
referenceDateThis price term structure's reference date.
basePriceTsThe price term structure in base currency units.
fxSpotThe number of units of this price term structure's currency per unit of the base price term structure's currency.
baseCurrencyYtsThe yield term structure for the base currency.
ytsThe yield term structure for this price term structure's currency.
currencyThe price term structure's currency.

◆ CrossCurrencyPriceTermStructure() [2/2]

CrossCurrencyPriceTermStructure ( QuantLib::Natural settlementDays,
const QuantLib::Handle< PriceTermStructure > & basePriceTs,
const QuantLib::Handle< QuantLib::Quote > & fxSpot,
const QuantLib::Handle< QuantLib::YieldTermStructure > & baseCurrencyYts,
const QuantLib::Handle< QuantLib::YieldTermStructure > & yts,
const QuantLib::Currency & currency )

Floating reference date based price term structure.

Parameters
settlementDaysThis price term structure's settlement days.
basePriceTsThe price term structure in base currency units.
fxSpotThe number of units of this price term structure's currency per unit of the base price term structure's currency.
baseCurrencyYtsThe yield term structure for the base currency.
ytsThe yield term structure for this price term structure's currency.
currencyThe price term structure's currency.

Member Function Documentation

◆ minTime()

QuantLib::Time minTime ( ) const
overridevirtual

The minimum time for which the curve can return values.

Reimplemented from PriceTermStructure.

◆ pillarDates()

std::vector< QuantLib::Date > pillarDates ( ) const
overridevirtual

The pillar dates for the PriceTermStructure.

Implements PriceTermStructure.

◆ currency()

const QuantLib::Currency & currency ( ) const
overridevirtual

The currency in which prices are expressed.

Implements PriceTermStructure.

◆ priceImpl()

QuantLib::Real priceImpl ( QuantLib::Time t) const
overrideprotectedvirtual

Price calculation.

Implements PriceTermStructure.