Leg

Overview

functions to construct and use Leg objects.

Function List

qlInterestRate ()
qlInterestRateCompoundFactor ()
qlInterestRateCompounding ()
qlInterestRateDayCounter ()
qlInterestRateDiscountFactor ()
qlInterestRateEquivalentRate ()
qlInterestRateFrequency ()
qlInterestRateImpliedRate ()
qlInterestRateRate ()
qlLeg ()
qlLegAccrualDays ()
qlLegAccrualEndDate ()
qlLegAccrualPeriod ()
qlLegAccrualStartDate ()
qlLegAccruedAmount ()
qlLegAccruedDays ()
qlLegAccruedPeriod ()
qlLegAtmRate ()
qlLegBPS ()
qlLegBPSFromYield ()
qlLegBasisPointValue ()
qlLegConvexity ()
qlLegDuration ()
qlLegFlowAnalysis ()
qlLegFromCapFloor ()
qlLegFromSwap ()
qlLegIsExpired ()
qlLegMaturityDate ()
qlLegNPV ()
qlLegNPVFromYield ()
qlLegNPVFromZSpread ()
qlLegNextCashFlowAmount ()
qlLegNextCashFlowDate ()
qlLegNextCouponRate ()
qlLegNominal ()
qlLegPreviousCashFlowAmount ()
qlLegPreviousCashFlowDate ()
qlLegPreviousCouponRate ()
qlLegReferencePeriodEnd ()
qlLegReferencePeriodStart ()
qlLegSetCouponPricers ()
qlLegStartDate ()
qlLegYield ()
qlLegYieldValueBasisPoint ()
qlLegZSpread ()
qlMultiPhaseLeg ()

Function Documentation

qlInterestRate

string returnValue
qlInterestRate(
string ObjectId
double Rate
string DayCounter
string Compounding
string Frequency
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class InterestRate and return its id

Supported Platforms:

Excel, C++, Calc

Parameters
ObjectIdid of object to be created
Raterate.
DayCounterIrr DayCounter ID.
CompoundingInterest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}).
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlInterestRateCompoundFactor

double returnValue
qlInterestRateCompoundFactor(
string ObjectId
long StartDate
long EndDate
long RefPeriodStart
long RefPeriodEnd
any Trigger)
Description:

Returns the compound factor between two dates based on the given InterestRate object.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::InterestRate object
StartDatecompounding period start.
EndDatecompounding period end.
RefPeriodStartreference period start date needed by some daycounter. Default value = QuantLib::Date().
RefPeriodEndreference period end date needed by some daycounter. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlInterestRateCompounding

string returnValue
qlInterestRateCompounding(
string ObjectId
any Trigger)
Description:

Returns the Compounding in the given InterestRate object.

Supported Platforms:

Excel, Calc

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

qlInterestRateDayCounter

string returnValue
qlInterestRateDayCounter(
string ObjectId
any Trigger)
Description:

Returns the DayCounter in the given InterestRate object.

Supported Platforms:

Excel, Calc

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

qlInterestRateDiscountFactor

double returnValue
qlInterestRateDiscountFactor(
string ObjectId
long StartDate
long EndDate
long RefPeriodStart
long RefPeriodEnd
any Trigger)
Description:

Returns the discount factor between two dates based on the given InterestRate object.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::InterestRate object
StartDatecompounding period start.
EndDatecompounding period end.
RefPeriodStartreference period start date needed by some daycounter. Default value = QuantLib::Date().
RefPeriodEndreference period end date needed by some daycounter. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlInterestRateEquivalentRate

double returnValue
qlInterestRateEquivalentRate(
string ObjectId
string DayCounter
string Compounding
string Frequency
long StartDate
long EndDate
long RefPeriodStart
long RefPeriodEnd
any Trigger)
Description:

Returns the equivalent rate for a compounding period between two dates based on the given InterestRate object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::InterestRate object
DayCounterrate DayCounter ID.
Compoundinginterest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}).
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
StartDatecompounding period start.
EndDatecompounding period end.
RefPeriodStartreference period start date needed by some daycounter. Default value = QuantLib::Date().
RefPeriodEndreference period end date needed by some daycounter. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlInterestRateFrequency

string returnValue
qlInterestRateFrequency(
string ObjectId
any Trigger)
Description:

Returns the Frequency in the given InterestRate object.

Supported Platforms:

Excel, Calc

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

qlInterestRateImpliedRate

double returnValue
qlInterestRateImpliedRate(
double Compound
string DayCounter
string Compounding
string Frequency
long StartDate
long EndDate
long RefPeriodStart
long RefPeriodEnd
any Trigger)
Description:

Returns the implied rate between two dates based on the given a compound factor.

Supported Platforms:

Excel

Parameters
Compoundcompound factor used to calculate the implicit rate.
DayCounterrate DayCounter ID.
Compoundinginterest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}).
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
StartDatecompounding period start.
EndDatecompounding period end.
RefPeriodStartreference period start date needed by some daycounter. Default value = QuantLib::Date().
RefPeriodEndreference period end date needed by some daycounter. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlInterestRateRate

double returnValue
qlInterestRateRate(
string ObjectId
any Trigger)
Description:

Returns the rate in the given InterestRate object.

Supported Platforms:

Excel, Calc

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

qlLeg

string returnValue
qlLeg(
string ObjectId
vector<double> Amounts
vector<long> Dates
bool ToBeSorted
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class Leg and return its id

Supported Platforms:

Excel, C++, Calc

Parameters
ObjectIdid of object to be created
Amountslist of cash to be received/paid.
Datespayment dates corresponding to amounts.
ToBeSortedTRUE if the CashFlows must be sorted by ascending dates. Default value = true.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlLegAccrualDays

long returnValue
qlLegAccrualDays(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the total number of accrual days for the current coupon of the given Leg.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegAccrualEndDate

long returnValue
qlLegAccrualEndDate(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the accrual end date for the current coupon of the given Leg.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegAccrualPeriod

double returnValue
qlLegAccrualPeriod(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the total accrual period for the current coupon of the given Leg.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegAccrualStartDate

long returnValue
qlLegAccrualStartDate(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the accrual start date for the current coupon of the given Leg.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegAccruedAmount

double returnValue
qlLegAccruedAmount(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the accrued amount for the given Leg.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegAccruedDays

long returnValue
qlLegAccruedDays(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the accrued days for the current coupon of the given Leg.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegAccruedPeriod

double returnValue
qlLegAccruedPeriod(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the accrued period for the current coupon of the given Leg.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegAtmRate

double returnValue
qlLegAtmRate(
string ObjectId
string DiscountCurve
bool IncludeSettlDate
long SettlementDate
long NpvDate
double NPV
any Trigger)
Description:

Returns the at-the-money rate for the given Leg object, i.e. the fixed rate for which an equivalent vector of fixed-rate cash flows would have the same NPV.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
DiscountCurvediscounting YieldTermStructure object ID.
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
NpvDateall cashflows are discounted to this date. If missing it is assumed equal to the settlement date Default value = QuantLib::Date().
NPVtarget net present value. If missing the NPV is calculated using the provided discount curve Default value = QuantLib::Null<QuantLib::Real>().
Triggerdependency tracking trigger

qlLegBPS

double returnValue
qlLegBPS(
string ObjectId
string DiscountCurve
bool IncludeSettlDate
long SettlementDate
long NpvDate
any Trigger)
Description:

Returns the basis point sensitivity for the given Leg object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
DiscountCurvediscounting YieldTermStructure object ID.
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
NpvDateall cashflows are discounted to this date. If missing it is assumed equal to the settlement date Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegBPSFromYield

double returnValue
qlLegBPSFromYield(
string ObjectId
double Yield
string DayCounter
string Compounding
string Frequency
bool IncludeSettlDate
long SettlementDate
long NpvDate
any Trigger)
Description:

Returns the basis point sensitivity for the given Leg object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
YieldYield (a.k.a. IRR).
DayCounterYield DayCounter ID. Default value = Actual/Actual (ISDA).
CompoundingInterest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}). Default value = Compounded.
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
NpvDateall cashflows are discounted to this date. If missing it is assumed equal to the settlement date Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegBasisPointValue

double returnValue
qlLegBasisPointValue(
string ObjectId
double Yield
string DayCounter
string Compounding
string Frequency
bool IncludeSettlDate
long SettlementDate
long NpvDate
any Trigger)
Description:

Returns the basisPointValue for the given Leg object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
YieldYield (a.k.a. IRR).
DayCounterYield DayCounter ID. Default value = Actual/Actual (ISDA).
CompoundingInterest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}). Default value = Compounded.
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
NpvDateall cashflows are discounted to this date. If missing it is assumed equal to the settlement date Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegConvexity

double returnValue
qlLegConvexity(
string ObjectId
double Yield
string DayCounter
string Compounding
string Frequency
bool IncludeSettlDate
long SettlementDate
long NpvDate
any Trigger)
Description:

Returns the Cash-flow convexity for the given Leg object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
YieldYield (a.k.a. IRR).
DayCounterYield DayCounter ID. Default value = Actual/Actual (ISDA).
CompoundingInterest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}). Default value = Compounded.
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
NpvDateall cashflows are discounted to this date. If missing it is assumed equal to the settlement date Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegDuration

double returnValue
qlLegDuration(
string ObjectId
double Yield
string DayCounter
string Compounding
string Frequency
string DurationType
bool IncludeSettlDate
long SettlementDate
long NpvDate
any Trigger)
Description:

Returns the Cash-flow duration for the given Leg object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
YieldYield (a.k.a. IRR).
DayCounterYield DayCounter ID. Default value = Actual/Actual (ISDA).
CompoundingInterest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}). Default value = Compounded.
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
DurationTypeDuration type (Simple, Macaulay, or Modified). Default value = Modified.
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
NpvDateall cashflows are discounted to this date. If missing it is assumed equal to the settlement date Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegFlowAnalysis

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

Returns the flow analysis for the given Leg object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLibAddin::Leg object
AfterDateShows only cashflows after given date Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegFromCapFloor

string returnValue
qlLegFromCapFloor(
string ObjectId
string CapFloor
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class Leg and return its id

Supported Platforms:

Excel, C++, Calc

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

qlLegFromSwap

string returnValue
qlLegFromSwap(
string ObjectId
string Swap
long LegNumber
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class Leg and return its id

Supported Platforms:

Excel, C++, Calc

Parameters
ObjectIdid of object to be created
SwapSwap object ID.
LegNumberZero based leg number (e.g. use 0 for the first leg, 1 for the second leg, etc.).
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlLegIsExpired

bool returnValue
qlLegIsExpired(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns TRUE if the Leg is expired

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegMaturityDate

long returnValue
qlLegMaturityDate(
string ObjectId
any Trigger)
Description:

Returns the maturity (i.e. last payment) date for the given Leg object.

Supported Platforms:

Excel

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

qlLegNPV

double returnValue
qlLegNPV(
string ObjectId
string DiscountCurve
bool IncludeSettlDate
long SettlementDate
long NpvDate
any Trigger)
Description:

Returns the net present value for the given Leg object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
DiscountCurvediscounting YieldTermStructure object ID.
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
NpvDateall cashflows are discounted to this date. If missing it is assumed equal to the settlement date Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegNPVFromYield

double returnValue
qlLegNPVFromYield(
string ObjectId
double Yield
string DayCounter
string Compounding
string Frequency
bool IncludeSettlDate
long SettlementDate
long NpvDate
any Trigger)
Description:

Returns the net present value for the given Leg object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
YieldYield (a.k.a. IRR).
DayCounterYield DayCounter ID. Default value = Actual/Actual (ISDA).
CompoundingInterest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}). Default value = Compounded.
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
NpvDateall cashflows are discounted to this date. If missing it is assumed equal to the settlement date Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegNPVFromZSpread

double returnValue
qlLegNPVFromZSpread(
string ObjectId
string DiscountCurve
double ZSpread
string DayCounter
string Compounding
string Frequency
bool IncludeSettlDate
long SettlementDate
long NpvDate
any Trigger)
Description:

Returns the net present value for the given Leg object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
DiscountCurvediscounting YieldTermStructure object ID.
ZSpreadZ-spread.
DayCounterNot Used: DiscountCurve's DayCounter used instead. Default value = Actual/365 (Fixed).
CompoundingInterest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}). Default value = Compounded.
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
NpvDateall cashflows are discounted to this date. If missing it is assumed equal to the settlement date Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegNextCashFlowAmount

double returnValue
qlLegNextCashFlowAmount(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the next cash flow amount.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegNextCashFlowDate

long returnValue
qlLegNextCashFlowDate(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the next cash flow date.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegNextCouponRate

double returnValue
qlLegNextCouponRate(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the next coupon rate. Depending on (the Leg and) the given date it can be historic, deterministic or expected in a stochastic sense. When the current date is used the coupon is the already-fixed not-yet-paid one.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegNominal

double returnValue
qlLegNominal(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the nominal for the current coupon of the given Leg.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegPreviousCashFlowAmount

double returnValue
qlLegPreviousCashFlowAmount(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the previous cash flow amount.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegPreviousCashFlowDate

long returnValue
qlLegPreviousCashFlowDate(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the previous cash flow date.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegPreviousCouponRate

double returnValue
qlLegPreviousCouponRate(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the previous coupon rate. Depending on (the Leg and) the given date it can be historic, deterministic or expected in a stochastic sense. When the current date is used the coupon is the last paid one.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegReferencePeriodEnd

long returnValue
qlLegReferencePeriodEnd(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the reference period end date for the current coupon of the given Leg.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegReferencePeriodStart

long returnValue
qlLegReferencePeriodStart(
string ObjectId
bool IncludeSettlDate
long SettlementDate
any Trigger)
Description:

Returns the reference period start date for the current coupon of the given Leg.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegSetCouponPricers

void returnValue
qlLegSetCouponPricers(
string ObjectId
vector<string> FloatingRateCouponPricer
any Trigger)
Description:

Set the coupon pricer at the given Leg object.

Supported Platforms:

Excel, C++

Parameters
ObjectIdid of existing QuantLibAddin::Leg object
FloatingRateCouponPricerFloatingRate coupon pricer object ID.
Triggerdependency tracking trigger

qlLegStartDate

long returnValue
qlLegStartDate(
string ObjectId
any Trigger)
Description:

Returns the start (i.e. first accrual) date for the given Leg object.

Supported Platforms:

Excel

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

qlLegYield

double returnValue
qlLegYield(
string ObjectId
double NPV
string DayCounter
string Compounding
string Frequency
bool IncludeSettlDate
long SettlementDate
long NpvDate
double Accuracy
long MaxIterations
double Guess
any Trigger)
Description:

Returns the Internal rate of return for the given Leg object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
NPVNet present (dirty) value.
DayCounterIrr DayCounter ID.
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.
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
NpvDateall cashflows are discounted to this date. If missing it is assumed equal to the settlement date Default value = QuantLib::Date().
Accuracytolerance. Default value = 1.0e-10.
MaxIterationsmax number of iterations. Default value = 100.
Guessguess. Default value = 0.05.
Triggerdependency tracking trigger

qlLegYieldValueBasisPoint

double returnValue
qlLegYieldValueBasisPoint(
string ObjectId
double Yield
string DayCounter
string Compounding
string Frequency
bool IncludeSettlDate
long SettlementDate
long NpvDate
any Trigger)
Description:

Returns the yieldValueBasisPoint for the given Leg object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
YieldYield (a.k.a. IRR).
DayCounterYield DayCounter ID. Default value = Actual/Actual (ISDA).
CompoundingInterest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}). Default value = Compounded.
Frequencyfrequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly). Default value = Annual.
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing the current EvaluationDate is used. Default value = QuantLib::Date().
NpvDateall cashflows are discounted to this date. If missing it is assumed equal to the settlement date Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlLegZSpread

double returnValue
qlLegZSpread(
string ObjectId
double NPV
string DiscountCurve
string DayCounter
string Compounding
string Frequency
bool IncludeSettlDate
long SettlementDate
long NpvDate
double Accuracy
long MaxIterations
double Guess
any Trigger)
Description:

Returns the z-spread for the given Leg object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::Leg object
NPVNet present (dirty) value.
DiscountCurvediscounting YieldTermStructure object ID.
DayCounterNot Used: DiscountCurve's DayCounter used instead. 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.
IncludeSettlDateTRUE if cashflows paid at the settlement date must be taken into account. Default value = true.
SettlementDatecashflows before this date are not taken into account. If missing it defaults to the current evaluation date. Default value = QuantLib::Date().
NpvDateall cashflows are discounted to this date. If missing it is assumed equal to the settlement date Default value = QuantLib::Date().
Accuracytolerance. Default value = 1.0e-10.
MaxIterationsmax number of iterations. Default value = 100.
Guessguess. Default value = 0.0.
Triggerdependency tracking trigger

qlMultiPhaseLeg

string returnValue
qlMultiPhaseLeg(
string ObjectId
vector<string> LegIDs
bool ToBeSorted
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class MultiPhaseLeg and return its id

Supported Platforms:

Excel, C++

Parameters
ObjectIdid of object to be created
LegIDsleg object IDs, one for each phase.
ToBeSortedTRUE if the CashFlows must be sorted by ascending dates. Default value = true.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag