Yield Term Structures

Overview

functions to construct and use YieldTermStructure objects.

Function List

qlDiscountCurve ()
qlFlatForward ()
qlForwardCurve ()
qlForwardSpreadedTermStructure ()
qlImpliedTermStructure ()
qlInterpolatedYieldCurve ()
qlInterpolatedYieldCurveData ()
qlInterpolatedYieldCurveDates ()
qlInterpolatedYieldCurveJumpDates ()
qlInterpolatedYieldCurveJumpTimes ()
qlInterpolatedYieldCurveTimes ()
qlRelinkableHandleYieldTermStructure ()
qlTermStructureCalendar ()
qlTermStructureDayCounter ()
qlTermStructureMaxDate ()
qlTermStructureReferenceDate ()
qlTermStructureSettlementDays ()
qlTermStructureTimeFromReference ()
qlYieldTSDiscount ()
qlYieldTSForwardRate ()
qlYieldTSForwardRate2 ()
qlYieldTSZeroRate ()
qlZeroCurve ()

Function Documentation

qlDiscountCurve

string returnValue
qlDiscountCurve(
string ObjectId
vector<long> CurveDates
vector<double> CurveDiscounts
string DayCounter
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class DiscountCurve and return its id

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of object to be created
CurveDatesdates of the curve.
CurveDiscountsdiscount factors for the above dates.
DayCounterDayCounter ID. Default value = Actual/365 (Fixed).
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlFlatForward

string returnValue
qlFlatForward(
string ObjectId
long NDays
string Calendar
string Rate
string DayCounter
string Compounding
string Frequency
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class FlatForward and return its id

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of object to be created
NDaysnumber of days to advance from EvaluationDate (usually zero or two): it fixes the date at which the discount factor = 1.0. Default value = 0.
Calendarholiday calendar (e.g. TARGET) to advance from global EvaluationDate. Default value = NullCalendar.
Ratethe curve level.
DayCounterDayCounter ID. Default value = Actual/365 (Fixed).
CompoundingInterest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}). Default value = Continuous.
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlForwardCurve

string returnValue
qlForwardCurve(
string ObjectId
vector<long> CurveDates
vector<double> ForwardYields
string DayCounter
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class ForwardCurve and return its id

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of object to be created
CurveDatesdates of the curve.
ForwardYieldsforwards rates for the above dates.
DayCounterDayCounter ID. Default value = Actual/365 (Fixed).
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlForwardSpreadedTermStructure

string returnValue
qlForwardSpreadedTermStructure(
string ObjectId
string BaseYieldCurve
string Spread
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class ForwardSpreadedTermStructure and return its id

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of object to be created
BaseYieldCurveBase YieldTermStructure object ID.
Spreadspread.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlImpliedTermStructure

string returnValue
qlImpliedTermStructure(
string ObjectId
string BaseYieldCurve
long ReferenceDate
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class ImpliedTermStructure and return its id

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of object to be created
BaseYieldCurveBase YieldTermStructure object ID.
ReferenceDatethe reference date the base YieldTermStructure should be shifted to.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlInterpolatedYieldCurve

string returnValue
qlInterpolatedYieldCurve(
string ObjectId
vector<long> Dates
vector<double> Data
string Calendar
string DayCounter
vector<string> Jumps
vector<long> JumpDates
string TraitsID
string InterpolatorID
string MixedInterpolationBehavior
long NRateHelper
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class InterpolatedYieldCurve and return its id

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of object to be created
Datesvector of dates, the first one being the one at which discount factor = 1.0
Datadata vector. Each element should be of the type selected by TraitsID
Calendarholiday calendar (e.g. TARGET) to advance from global EvaluationDate.
DayCounterDayCounter ID. Default value = Actual/365 (Fixed).
JumpsJump quotes vector.
JumpDatesJump dates vector.
TraitsIDDiscount, ZeroYield, or ForwardRate. Default value = Discount.
InterpolatorIDBackwardFlat, ForwardFlat, Linear, LogLinear, LogParabolic, KrugerLogCubic, etc. Default value = MonotonicLogCubicNaturalSpline.
MixedInterpolationBehaviorShareRanges to join two different interpolations over all the pillars, SplitRanges otherwise. Default value = ShareRanges.
NRateHelperNumber of pillar from which change the interpolation ID. Default value = 1.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlInterpolatedYieldCurveData

vector<double> returnValue
qlInterpolatedYieldCurveData(
string ObjectId
any Trigger)
Description:

Retrieve Data for the given InterpolatedYieldCurve.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLibAddin::InterpolatedYieldCurve object
Triggerdependency tracking trigger

qlInterpolatedYieldCurveDates

vector<long> returnValue
qlInterpolatedYieldCurveDates(
string ObjectId
any Trigger)
Description:

Retrieve list of Dates for the given InterpolatedYieldCurve.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLibAddin::InterpolatedYieldCurve object
Triggerdependency tracking trigger

qlInterpolatedYieldCurveJumpDates

vector<long> returnValue
qlInterpolatedYieldCurveJumpDates(
string ObjectId
any Trigger)
Description:

Retrieve list of jump dates for the given InterpolatedYieldCurve.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLibAddin::InterpolatedYieldCurve object
Triggerdependency tracking trigger

qlInterpolatedYieldCurveJumpTimes

vector<double> returnValue
qlInterpolatedYieldCurveJumpTimes(
string ObjectId
any Trigger)
Description:

Retrieve list of jump times for the given InterpolatedYieldCurve.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLibAddin::InterpolatedYieldCurve object
Triggerdependency tracking trigger

qlInterpolatedYieldCurveTimes

vector<double> returnValue
qlInterpolatedYieldCurveTimes(
string ObjectId
any Trigger)
Description:

Retrieve list of Times for the given InterpolatedYieldCurve.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLibAddin::InterpolatedYieldCurve object
Triggerdependency tracking trigger

qlRelinkableHandleYieldTermStructure

string returnValue
qlRelinkableHandleYieldTermStructure(
string ObjectId
string CurrentLink
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class RelinkableHandleImpl<QuantLibAddin::YieldTermStructure, QuantLib::YieldTermStructure> and return its id

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of object to be created
CurrentLinkYieldTermStructure object ID. If omitted, nothing is linked by the RelinkableHandle. Default value = .
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlTermStructureCalendar

string returnValue
qlTermStructureCalendar(
string ObjectId
any Trigger)
Description:

Returns the calendar used by the given TermStructure object.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::TermStructure object
Triggerdependency tracking trigger

qlTermStructureDayCounter

string returnValue
qlTermStructureDayCounter(
string ObjectId
any Trigger)
Description:

Returns the DayCounter used by the given TermStructure object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::TermStructure object
Triggerdependency tracking trigger

qlTermStructureMaxDate

long returnValue
qlTermStructureMaxDate(
string ObjectId
any Trigger)
Description:

Returns the max date for the given TermStructure object.

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of existing QuantLib::TermStructure object
Triggerdependency tracking trigger

qlTermStructureReferenceDate

long returnValue
qlTermStructureReferenceDate(
string ObjectId
any Trigger)
Description:

Returns the reference date for the given TermStructure object.

Supported Platforms:

Excel, C++, Calc

Parameters
ObjectIdid of existing QuantLib::TermStructure object
Triggerdependency tracking trigger

qlTermStructureSettlementDays

long returnValue
qlTermStructureSettlementDays(
string ObjectId
any Trigger)
Description:

Returns the number of settlement days for the given TermStructure object.

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of existing QuantLib::TermStructure object
Triggerdependency tracking trigger

qlTermStructureTimeFromReference

vector<double> returnValue
qlTermStructureTimeFromReference(
string ObjectId
vector<long> Date
any Trigger)
Description:

Returns the time from the reference date for the given TermStructure object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::TermStructure object
Datevector of dates.
Triggerdependency tracking trigger

qlYieldTSDiscount

vector<double> returnValue
qlYieldTSDiscount(
string ObjectId
vector<long> DfDates
bool AllowExtrapolation
any Trigger)
Description:

Returns a discount factor from the given YieldTermStructure object.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::YieldTermStructure object
DfDatesvector of dates.
AllowExtrapolationTRUE allows extrapolation. Default value = false.
Triggerdependency tracking trigger

qlYieldTSForwardRate

vector<string> returnValue
qlYieldTSForwardRate(
string ObjectId
long D1
vector<long> D2
string ResultDayCounter
string Compounding
string Frequency
bool AllowExtrapolation
any Trigger)
Description:

Returns the forward interest rate from the given YieldTermStructure object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::YieldTermStructure object
D1first date.
D2second date.
ResultDayCounterresult DayCounter.
CompoundingInterest rate compounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}). Default value = Simple.
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
AllowExtrapolationTRUE allows extrapolation. Default value = false.
Triggerdependency tracking trigger

qlYieldTSForwardRate2

vector<string> returnValue
qlYieldTSForwardRate2(
string ObjectId
vector<long> Date
string Period
string ResultDayCounter
string Compounding
string Frequency
bool AllowExtrapolation
any Trigger)
Description:

Returns the forward interest rate from the given YieldTermStructure object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::YieldTermStructure object
Datefirst date.
PeriodPeriod (e.g. '7D', '3M', '1Y', etc).
ResultDayCounterresult DayCounter.
CompoundingInterest rate compounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}). Default value = Simple.
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
AllowExtrapolationTRUE allows extrapolation. Default value = false.
Triggerdependency tracking trigger

qlYieldTSZeroRate

vector<string> returnValue
qlYieldTSZeroRate(
string ObjectId
vector<long> Dates
string ResultDayCounter
string Compounding
string Frequency
bool AllowExtrapolation
any Trigger)
Description:

Returns the zero interest rate from the given YieldTermStructure object.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::YieldTermStructure object
Datesdate.
ResultDayCounterresultDayCounter.
CompoundingInterest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}). Default value = Continuous.
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
AllowExtrapolationTRUE allows extrapolation. Default value = false.
Triggerdependency tracking trigger

qlZeroCurve

string returnValue
qlZeroCurve(
string ObjectId
vector<long> CurveDates
vector<double> CurveYields
string DayCounter
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class ZeroCurve and return its id

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of object to be created
CurveDatesdates of the curve.
CurveYieldszero rates for the above dates.
DayCounterDayCounter ID. Default value = Actual/365 (Fixed).
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag