A swap exchanges a fixed rate for a floating one. Shape the curve, lock the fixed rate, then move the curve and watch the two legs separate.
An interest rate swap exchanges fixed-rate payments for floating-rate payments on the same notional. This lab prices a plain-vanilla swap on a curve you can edit: the par swap rate that makes it worth zero, every payment on both legs, how the swap gains or loses value when the curve moves after the trade, and its sensitivity to each part of the curve.
The fixed rate at which the present value of the fixed leg equals that of the floating leg, so the swap is worth zero when it is traded. On a single curve it equals (1 − P(T)) divided by the annuity, the sum of discount factors times the accrual periods.
The payer pays a fixed rate and receives floating. When the curve rises, expected floating payments rise while the fixed payments stay the same, so the payer receives more than was priced in. A payer swap behaves like being short a fixed-rate bond.
The change in the swap's value when rates move by one basis point. The lab bumps every curve quote by 1 bp and revalues the swap; key-rate DV01 bumps one quote at a time to show which maturities drive the risk.
Receiving fixed is like holding a fixed-coupon bond financed by issuing a floating-rate note. The floating-rate note is worth par at each reset, so the swap's value moves like the fixed bond's price, with the same sign of duration.