### A free/open-source library for quantitative finance

Public Member Functions
NthToDefault Class Reference

N-th to default swap. More...

`#include <ql/experimental/credit/nthtodefault.hpp>`

Inheritance diagram for NthToDefault:
[legend]

List of all members.

## Public Member Functions

NthToDefault (Size n, const std::vector< Handle< DefaultProbabilityTermStructure > > &probabilities, Real recoveryRate, const Handle< OneFactorCopula > &copula, Protection::Side side, Real nominal, const Schedule &premiumSchedule, Rate premiumRate, const DayCounter &dayCounter, bool settlePremiumAccrual, const Handle< YieldTermStructure > &yieldTS, const Period &integrationStepSize, boost::shared_ptr< Claim > claim=boost::shared_ptr< Claim >())

bool | isExpired () const
| returns whether the instrument might have value greater than zero.
Rate | fairPremium () const
Rate | premium () const
Real | nominal () const
DayCounter | dayCounter () const
Protection::Side | side () const
Size | rank () const
Size | basketSize () const

## Detailed Description

N-th to default swap.

A NTD instrument exchanges protection against the nth default in a basket of underlying credits for premium payments based on the protected notional amount.

The pricing is analogous to the pricing of a CDS instrument which represents protection against default of a single underlying credit. The only difference is the calculation of the probability of default. In the CDS case, it is the probabilty of single name default; in the NTD case the probability of at least N defaults in the portfolio of underlying credits.

This probability is computed using the algorithm in John Hull and Alan White, "Valuation of a CDO and nth to default CDS without Monte Carlo simulation", Journal of Derivatives 12, 2, 2004.

The algorithm allows for varying probability of default across the basket. Otherwise, for identical probabilities of default, the probability of n defaults is given by the binomial distribution.

Default correlation is modeled using a one-factor Gaussian copula approach.

The class is tested against data in Hull-White (see reference above.)