Interest Rate Swaps - Fundamentals › Calculating Swap Cash Flows
Quantitative FinanceAll chapters Interest Rate Swaps - Fundamentals › Calculating Swap Cash FlowsOne section · Sections in this chapter3 / 10 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
To understand swaps deeply, you need to be able to calculate the actual cash flows that will be exchanged. Building on the present value concepts from Part I, we can trace through a complete swap cash flow schedule. The ability to generate and analyze these schedules is fundamental to swap pricing, risk management, and hedging effectiveness analysis. Each cash flow represents a future transfer of value, and understanding how these flows arise from the underlying parameters gives you the insight needed to structure effective hedges.
A Step-by-Step Cash Flow Example
Consider a 2-year plain-vanilla interest rate swap with the following terms:
- Notional principal: $50,000,000
- Fixed rate: 4.25% (semi-annual payments, 30/360 day count)
- Floating rate: 3-month reference rate (quarterly payments, Actual/360 day count)
- Our position: Pay fixed, receive floating
The structure of this swap means that fixed payments occur every six months (four total over two years), while floating payments occur every three months (eight total). This mismatch in payment frequencies is common and creates quarters where only the floating leg pays and quarters where both legs pay. Understanding this rhythm is essential for cash flow forecasting and liquidity planning.
Let's calculate the cash flows assuming we observe the following floating rates at each reset date:
# Swap parameters
notional = 50_000_000
fixed_rate = 0.0425
swap_years = 2
# Observed floating rates at each quarterly reset (annualized)
observed_floating_rates = [
0.0400,
0.0425,
0.0450,
0.0410,
0.0380,
0.0360,
0.0390,
0.0420,
]
# Day counts for each quarter (approximately 91 days each)
actual_days = [91, 91, 92, 91, 91, 91, 92, 91]
# Calculate fixed leg payments (semi-annual, so every two quarters)
# Under 30/360, each semi-annual period is 180/360 = 0.5 years
fixed_payment = notional * fixed_rate * (180 / 360)
# Calculate floating leg payments (quarterly)
floating_payments = []
for i, rate in enumerate(observed_floating_rates):
payment = notional * rate * (actual_days[i] / 360)
floating_payments.append(payment)
# Build cash flow schedule
quarters = list(range(1, 9))import pandas as pd
# Create detailed cash flow DataFrame
cash_flows = []
cumulative_fixed_paid = 0
cumulative_floating_received = 0
for q in quarters:
idx = q - 1
# Floating payment received each quarter
float_received = floating_payments[idx]
cumulative_floating_received += float_received
# Fixed payment made every two quarters (semi-annually)
if q % 2 == 0:
fixed_paid = fixed_payment
else:
fixed_paid = 0
cumulative_fixed_paid += fixed_paid
# Net cash flow for this period
net_cf = float_received - fixed_paid
cash_flows.append(
{
"Quarter": q,
"Floating Rate": f"{observed_floating_rates[idx] * 100:.2f}%",
"Days": actual_days[idx],
"Floating Received": float_received,
"Fixed Paid": fixed_paid,
"Net Cash Flow": net_cf,
}
)
cf_df = pd.DataFrame(cash_flows)Swap Cash Flow Schedule (Pay Fixed @ 4.25%, Receive Floating)
Notional: $50,000,000
--------------------------------------------------------------------------------
Quarter Floating Rate Days Floating Received Fixed Paid Net Cash Flow
1 4.00% 91 $505,556 $0 $505,556
2 4.25% 91 $537,153 $1,062,500 $-525,347
3 4.50% 92 $575,000 $0 $575,000
4 4.10% 91 $518,194 $1,062,500 $-544,306
5 3.80% 91 $480,278 $0 $480,278
6 3.60% 91 $455,000 $1,062,500 $-607,500
7 3.90% 92 $498,333 $0 $498,333
8 4.20% 91 $530,833 $1,062,500 $-531,667
--------------------------------------------------------------------------------
Total Floating Received: $4,100,347
Total Fixed Paid: $4,250,000
Net Total: $-149,653This cash flow schedule illustrates several important features of swap mechanics. The fixed payments are predictable and occur semi-annually, while floating payments vary each quarter based on the prevailing reference rate. The net cash flow can be positive or negative in any period depending on whether floating rates are above or below the fixed rate. Notice also how the day count differences affect the calculations: the floating leg uses actual days (91 or 92), while the fixed leg calculation implicitly assumes 180 days per semi-annual period under the 30/360 convention.
Visualizing Swap Cash Flows
A visual representation helps clarify the cash flow exchange structure. The bar chart format allows us to see both the individual payment components and the cumulative effect over time, and gives insight into how the swap's profitability evolves as rates change.

The chart shows that the party paying fixed and receiving floating benefits when floating rates exceed the fixed rate. The cumulative net position tracks the overall profitability of the swap position over time.
