Sub topic 20
Pricing and valuing an interest rate swap
This chapter shows how to find the fixed rate that makes a plain vanilla swap worth zero at the start, and how to value that swap afterward. It assumes you know the earlier chapter on plain vanilla swaps (fixed payer, floating payer, notional), and that you can discount cash flows with spot rates.
Pricing and valuing are different tasks
- Pricing a swap means finding the fixed rate (the swap rate) that gives the contract zero value at initiation. No cash changes hands up front.
- Valuing a swap means finding its worth to one party at a later date. The fixed rate is now frozen, but market rates have moved, so the value is usually not zero.
Both tasks use discount factors. A discount factor for time t is the present value of 1 paid at t, so DF = 1 / (1 + z)^t, where z is the spot rate for that maturity.
Why the floating leg is worth par
A floating-rate payment is set at the start of each period from the current market rate. Right after any reset date, a stream of floating payments plus the notional returned at the end behaves like a floating-rate bond. Its price is par, which is 100% of the notional.
So the floating leg equals the notional at initiation and on every reset date. Pricing the swap therefore reduces to finding a fixed coupon whose bond is also worth par.
Deriving the swap rate
Let c be the fixed rate per period and DF₁ … DFₙ the discount factors for each payment date. With unit notional, setting the fixed leg equal to par gives:
c × (DF₁ + … + DFₙ) + DFₙ = 1
Solving for c:
c = (1 − DFₙ) / (DF₁ + … + DFₙ)
The numerator is the value lost by receiving the notional at the end instead of now. The denominator is the present value of receiving 1 per period (an annuity). The swap rate is therefore the par coupon of a bond.
def swap_fixed_rate(discount_factors):
"""Par fixed rate for an annual-pay plain vanilla swap with unit notional."""
return (1 - discount_factors[-1]) / sum(discount_factors)
print(round(swap_fixed_rate([0.98, 0.95, 0.92]), 6)) # 0.02807The three discount factors imply a swap rate of about 2.807%. Because the discount factors come from the spot curve, the swap rate depends on the whole curve, not only on the final maturity.
Valuing the swap after initiation
Suppose rates move after the swap starts. Take the fixed payer's view:
- Value to the fixed payer = PV of floating leg − PV of remaining fixed payments.
- Value to the fixed receiver = the negative of that amount.
Right after a reset date, the floating leg is worth the notional. Fixed payments still use the original rate c₀, but they are discounted with the new factors.
def swap_value_fixed_payer(notional, fixed_rate, new_dfs):
"""Value to the fixed payer on a reset date, annual payments.
new_dfs are today's discount factors for the remaining payment dates.
"""
fixed_leg = notional * (fixed_rate * sum(new_dfs) + new_dfs[-1])
floating_leg = notional # worth par on a reset date
return floating_leg - fixed_leg
c0 = swap_fixed_rate([0.98, 0.95, 0.92])
# One year later, two payments remain and rates have risen slightly.
print(round(swap_value_fixed_payer(10_000_000, c0, [0.975, 0.945]), 2)) # 11052.63Rates rose, so the new market swap rate for the two remaining years is (1 − 0.945) / 1.92 = 2.8646%. The fixed payer locked in 2.807%, which is lower, so the swap has gained value. You can check the result another way:
Value to fixed payer = (new market rate − c₀) × annuity × notional = (0.028646 − 0.028070) × 1.92 × 10,000,000 ≈ 11,053.
This second form is often faster on an exam. It is the PV of the fixed-rate difference over the remaining life.
Summary of directions
| Rates move | Swap rate for remaining term | Fixed payer's value | Fixed receiver's value |
|---|---|---|---|
| Up | Above c₀ | Positive | Negative |
| Down | Below c₀ | Negative | Positive |
| Unchanged | Equal to c₀ | Zero (on a reset date) | Zero (on a reset date) |
A fixed payer behaves like a party who is short a bond, so the position gains when rates rise.
Common errors
- Using the wrong leg value. The floating leg is par only on a reset date. Between resets, the next floating payment is already known, so the leg is worth (notional + known payment) × the discount factor to that payment date.
- Discounting with the old curve. The fixed rate stays at c₀, but the discount factors must be current.
- Mixing up signs. Always say whose view you are taking. The two counterparties' values add to zero, ignoring credit risk.
- Ignoring period length. Real swaps use day-count conventions, so each fixed payment is c × notional × (days/360 or days/365). The annual formulas here treat every period as 1.0.
- Forgetting that the swap rate is not a spot rate. It is a weighted average of forward rates and is not the same as the maturity's spot rate.
Exercise
A 4-year annual-pay plain vanilla swap has discount factors of 0.97, 0.94, 0.91 and 0.88. Find the fixed swap rate.
Show answer
c = (1 − 0.88) / (0.97 + 0.94 + 0.91 + 0.88) = 0.12 / 3.70 = 0.032432, or about 3.243%.
Exercise
A swap with a fixed rate of 3.00% and a 5,000,000 notional has two annual payments left, and today is a reset date. The current discount factors are 0.96 and 0.92. What is the value to the fixed payer?
Show answer
Fixed leg = 5,000,000 × (0.03 × 1.88 + 0.92) = 5,000,000 × 0.9764 = 4,882,000. The floating leg is worth 5,000,000. Value to the fixed payer = 5,000,000 − 4,882,000 = 118,000. The current market rate is (1 − 0.92)/1.88 = 4.255%, which is above 3.00%, so the fixed payer gains.