Skip to content
All library documents

Valuing Amortizing Interest Rate Swaps with Custom Notionals

Article Quant Q&A · Author: Oliver Mohr Bonometti

Summary

The document explains a direct way to represent custom amortization when constructing a fixed versus floating interest rate swap in QuantLib. The key idea is to provide each leg with a sequence of notionals aligned with its payment schedule, allowing principal amounts to change over the life of the contract. The example builds a fixed leg with annual periods and a floating leg with semiannual periods, then combines them into a swap. The schedules, day-count convention, fixed rate, and floating index are specified separately for each leg.

This is a concise implementation example rather than a full valuation walkthrough. It addresses how to encode amortizing notionals, not how to bootstrap curves, set a valuation date, apply discounting or forwarding curves, or validate cash flows for a particular trade. The example uses different schedule frequencies and notional lists for its legs, so users must ensure that the number and ordering of notionals match the periods expected by their QuantLib constructors and their contract terms. No pricing output or comparison is provided.

Key ideas

  • Custom amortization can be represented by passing a sequence of notionals to each swap leg.
  • Fixed and floating legs can use different payment schedules and notional sequences.
  • QuantLib combines the constructed fixed and floating legs into a swap instrument.
  • The example demonstrates instrument construction but does not show curve setup or a valuation result.
  • Notional counts and schedule alignment must match the intended cash flows and library conventions.

Tags

Full text
# Valuating Custom Amortization Schedule Libor IRS with QuantLib


# Valuating Custom Amortization Schedule Libor IRS with QuantLib












I got to bootstrap the OIS and Libor 3M swap curves, and now I'd like to valuate some simple Libor3M - Fix IRS with QuantLib (in python). My problem is that some of the instruments I have to valuate have custom amortization structure. Are there any examples on how to valuate a swap with a custom amortization schedule?

## Answer by David Duarte (score 3)

https://quant.stackexchange.com/a/54240

To value a Swap with amortizations, you can feed a vector (list in python) with the notionals.

```
calendar = ql.TARGET()
start = ql.Date(17,6,2019)
maturity = calendar.advance(start, ql.Period('2y'))

fixedSchedule = ql.MakeSchedule(start, maturity, ql.Period('1Y'))
fixedLeg = ql.FixedRateLeg(fixedSchedule, ql.Actual360(), [100, 50], [0.01])

floatSchedule = ql.MakeSchedule(start, maturity, ql.Period('6M'))
floatLeg = ql.IborLeg([100, 100, 50, 50], floatSchedule, ql.Euribor6M(), ql.Actual360())

swap = ql.Swap(fixedLeg, floatLeg)
```

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.