Swap Rates

Calculates the par swap rates and annuities of interest rate swaps of any maturity on a single curve: the fixed rate at which a new fixed-for-floating swap is worth nothing, and the present value of receiving 1 a year on its fixed leg. With a forward start, these are the forward swap rates and annuities that price a swaption.

On a single curve, which both projects the floating rate and discounts, a floating leg that resets at the start of each period is worth par at its start, so the swap rate follows from the discount factors alone (Hull, 2022, Options, Futures and Other Derivatives, ch. 7; Andersen and Piterbarg, 2010, Interest Rate Modeling, ch. 5).

The formula is as follows:

\[\text{Annuity} = \sum(\tau_{i} \cdot P(t_{i})),\;\; \text{over the fixed payment dates } t_{1} \text{, } \ldots , t_{n}\] \[\text{Swap Rate} = \frac{P(t_{0}) - P(t_{n})}{\text{Annuity}}\]

where P(t) = (1 + r(t))^(-t) is the discount factor of the annually compounded zero rate r(t) of the curve (interpolated linearly between its maturities), \(t_{0}\) the start of the swap and \(\tau_{i} = 1\) / fixed_frequency the accrual of a fixed period (a short first period when the maturity is not a whole number of periods). The swap rate is a nominal annual rate paid fixed_frequency times a year on year fractions with no calendar (a regular 30/360 schedule). The value of a basis point on the fixed rate (PV01) of a swap is Annuity * Notional * 0.0001.

The default curve is EIOPA’s risk-free rate term structure, which EIOPA derives from the swap rates of each currency (for the euro, swap rates minus a credit risk adjustment) and publishes at each month end; the government curve is the zero-coupon curve of the government bond yield curve of the day, whose par rates are those of government bonds rather than swaps. To value a swap of your own, with a fixed rate, a current fixing and its DV01, use swap_model.get_swap_value.

Also known as: par swap rate, swap curve, interest rate swap rate, forward swap rate, PV01, swap annuity, PVBP.

Example · 2026

Install the Finance Toolkit with pip install financetoolkit -U, then call get_swap_rate:

from financetoolkit import FixedIncome

fixedincome = FixedIncome(start_date='2026-10-01', end_date='2026-11-20')

fixedincome.get_swap_rate(maturities=[1, 2, 5, 10, 30], country='Euro Area')

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

What were the euro area swap rates for 1, 2, 5, 10 and 30 years on 20 November 2026?

Which returns:

Parameters

get_swap_rate accepts the following parameters.

ParameterTypeDescriptionExample
maturitiesfloat | str | list | NoneThe maturities (tenors) of the swaps, in years or as labels such as ‘10Y’. Defaults to None, 1, 2, 3, 5, 7, 10, 15, 20 and 30 years.["3M", "6M"]
countrystrThe country or currency area of the curve, as EIOPA (for the EIOPA curve) or get_government_bond_yield_curve (for the government curve) names it. Defaults to “United States”."US"
curvestrThe discount curve. Options are: “eiopa” (EIOPA’s risk-free rate term structure of the last month end on or before the date), “government” (the zero-coupon curve of the government bond yield curve of the date, see get_zero_coupon_curve). Defaults to “eiopa”."eiopa"
fixed_frequencyintThe number of fixed payments per year. Defaults to 1 (annual, as euro and US dollar overnight index swaps pay).1 (annual, as euro and US dollar overnight index swaps pay)
forward_startfloat | strThe start of the swaps, in years or as a label such as ‘1Y’, for forward starting swaps. Defaults to 0, swaps that start today.0, swaps that start today
datestr | NoneThe day of the curve (YYYY-MM-DD). Defaults to None, the end date."2025-03-31"
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the class.2
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column

References

Share