# QuantLib_CappedFlooredCoupon man page

CappedFlooredCoupon — Capped and/or floored floating-rate coupon.

## Synopsis

`#include <ql/cashflows/capflooredcoupon.hpp>`

Inherits **FloatingRateCoupon**.

Inherited by CappedFlooredCmsCoupon, CappedFlooredCmsSpreadCoupon, and CappedFlooredIborCoupon.

### Public Member Functions

**CappedFlooredCoupon** (const boost::shared_ptr< **FloatingRateCoupon** > &underlying, **Rate cap**=**Null**< **Rate** >(), **Rate floor**=**Null**< **Rate** >())**Rate cap** () const

cap **Rate floor** () const

floor **Rate effectiveCap** () const

effective cap of fixing **Rate effectiveFloor** () const

effective floor of fixing

**Coupon interface**

**Rate rate** () const

accrued rate **Rate convexityAdjustment** () const

convexity adjustment

**Observer interface**

void **update** ()

### Visitability

boost::shared_ptr< **FloatingRateCoupon** > **underlying_**

bool **isCapped_**

bool **isFloored_****Rate cap_****Rate floor_**

virtual void **accept** (**AcyclicVisitor** &)

bool **isCapped** () const

bool **isFloored** () const

void **setPricer** (const boost::shared_ptr< **FloatingRateCouponPricer** > &pricer)

const boost::shared_ptr< **FloatingRateCoupon** > **underlying** ()

### Additional Inherited Members

## Detailed Description

Capped and/or floored floating-rate coupon.

The payoff $ P $ of a capped floating-rate coupon is: [ P = N imes T imes min(a L + b, C). ] The payoff of a floored floating-rate coupon is: [ P = N imes T imes max(a L + b, F). ] The payoff of a collared floating-rate coupon is: [ P = N imes T imes min(max(a L + b, F), C). ]

where $ N $ is the notional, $ T $ is the accrual time, $ L $ is the floating rate, $ a $ is its gearing, $ b $ is the spread, and $ C $ and $ F $ the strikes.

They can be decomposed in the following manner. Decomposition of a capped floating rate coupon: [ R = min(a L + b, C) = (a L + b) + min(C - b - xi |a| L, 0) ] where $ xi = sgn(a) $. Then: [ R = (a L + b) + |a| min(ac{C - b}{|a|} - xi L, 0) ]

## Member Function Documentation

### void update () [virtual]

This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.

Implements **Observer**.

## Author

Generated automatically by Doxygen for QuantLib from the source code.

## Referenced By

cap(3), cap_(3), CappedFlooredCoupon(3), effectiveCap(3), effectiveFloor(3), floor_(3), isCapped(3), isCapped_(3), isFloored(3), isFloored_(3), ql-floor(3), setPricer(3) and underlying_(3) are aliases of QuantLib_CappedFlooredCoupon(3).