Logo
Reference manual - version qle_version
CashFlows Class Reference

cashflow-analysis functions in addition to those in QuantLib More...

#include <qle/cashflows/cashflows.hpp>

Static Public Member Functions

YieldTermStructure functions
static Real spreadNpv (const Leg &leg, const YieldTermStructure &discountCurve, bool includeSettlementDateFlows, Date settlementDate=Date(), Date npvDate=Date())
 NPV due to any spreads on a leg.
static Real sumCashflows (const Leg &leg, const Date &startDate, const Date &endDate)
 Return the sum of the cashflows on leg after startDate and before or on endDate.
static std::vector< Rate > couponRates (const Leg &leg)
static std::vector< Rate > couponDcfRates (const Leg &leg)

Detailed Description

cashflow-analysis functions in addition to those in QuantLib

Member Function Documentation

◆ spreadNpv()

Real spreadNpv ( const Leg & leg,
const YieldTermStructure & discountCurve,
bool includeSettlementDateFlows,
Date settlementDate = Date(),
Date npvDate = Date() )
static

NPV due to any spreads on a leg.

The spread NPV is the sum of the spread-related cash flows on the leg, each discounted according to the given term structure.

  • If there are no spreads on the leg, then zero is returned.
  • Only applicable to FloatingRateCoupon. Should be expanded if needed for other coupon types e.g. YoYInflationCoupon.

◆ couponRates()

std::vector< Rate > couponRates ( const Leg & leg)
static

Return only the coupon rates from a leg i.e. only Cashflow that casts to Coupon Maintains the order of the coupon rates

◆ couponDcfRates()

std::vector< Rate > couponDcfRates ( const Leg & leg)
static

Return the coupon rates multiplied by day count fraction from a leg i.e. only Cashflow that casts to Coupon. Maintains the order of the coupon rates