固收 Cross Currency Swap
Fi Cross Currency Swap
题目详情
固收跨货币基差互换。与单货币利率互换相比,跨货币基差互换额外包含什么特征?
英文原题
In a cross-currency basis swap, what additional feature exists compared to a single-currency interest rate swap?
解析
问题分析
In a cross-currency basis swap, what additional feature exists compared to a single-currency interest rate swap?
解法
根据题目要求实现相应功能。核心逻辑需要:
// 核心数据结构和方法——根据题目 API 约定实现
// 1. 确定状态表示——选择支持所需操作的数据结构
// 2. 实现核心算法——确保 O(·) 时间复杂度和正确性
// 3. 处理边界条件——空输入、极值参数、并发访问验证
用具体输入验证:构造已知输入的测试用例,确认输出匹配预期结果。
复杂度与边界
- 时间复杂度:取决于选用的算法
- 空间复杂度:取决于数据规模
- 关键边界条件:空输入、极值参数、并发场景下的正确性保证
英文解析
Analysis
A cross-currency basis swap exchanges cash flows in two different currencies, unlike a single-currency interest rate swap exchanging only fixed vs. floating payments in one currency. The key additional features are: (1) exchange of principal amounts at both the start and end of the swap, and (2) a cross-currency basis spread that reflects the relative supply/demand imbalance between the two currencies.
In a single-currency IRS, only net interest payments are exchanged -- no principal exchange occurs. In a cross-currency swap, full principal is exchanged at initiation and re-exchanged at maturity, creating foreign exchange risk that must be hedged. The basis spread compensates for the fact that borrowing in one currency and swapping into another is not cost-neutral.
Solution
Consider a USD/EUR cross-currency basis swap with 5-year maturity:
- At inception: Party A pays $100M USD principal to Party B, receives 90M EUR principal (at spot rate 1.11)
- During swap: Party A pays 3M EUR floating + basis spread (e.g., -15bps), Party B pays SOFR floating on USD
- At maturity: Principal re-exchanged at the original spot rate (not current market rate)
def cross_currency_swap_pv(usd_leg_flows, eur_leg_flows, basis_spread,
usd_discount, eur_discount, spot_rate):
"""PV of cross-currency basis swap from USD payer perspective."""
pv_usd = sum(cf / (1 + usd_discount)**t for cf, t in usd_leg_flows)
pv_eur = sum((cf + basis_spread * notional_eur) /
(1 + eur_discount)**t for cf, t in eur_leg_flows)
pv_eur_usd = pv_eur / spot_rate # convert EUR PV to USD
principal_exchange_pv = (notional_usd - notional_eur / spot_rate)
return pv_usd - pv_eur_usd + principal_exchange_pvThe basis spread is negative when there is strong demand to borrow USD via swap markets (e.g., during stress, non-US banks pay below EUR floating to receive USD).
Complexity & Edge Cases
- Time complexity: O(N) per leg, N = number of payment periods
- Space complexity: O(N) for cash flow arrays
- Edge cases: (1) Basis spread can flip sign during market stress. (2) Principal re-exchange at original spot rate creates a fixed FX exposure -- hedging required. (3) Collateral disputes arise when one currency's discount curve shifts sharply. (4) Default risk is bilateral -- either party can lose the principal exchange value.
Verification
For a 1-year USD/EUR swap: USD notional = 100M, EUR notional = 90M, spot = 1.11, basis = -20bps, USD rate = 5%, EUR rate = 3.5%:
- USD leg PV: 100M * 5% / 1.05 + 100M / 1.05 approx 4.762M + 95.238M approx 100M (at par)
- EUR leg PV (in EUR): 90M * (3.5% - 0.2%) / 1.033 + 90M / 1.033 approx 3.024M + 87.125M approx 90.149M EUR
- EUR leg PV (in USD): 90.149M / 1.11 approx 80.857M USD
- Net: basis adjusts to reach par for both legs simultaneously
Key Considerations
- The cross-currency basis reflects market-implied funding cost differences -- it is NOT zero in practice
- Basis spreads widen during crises when USD funding becomes scarce for non-US banks
- Collateralized swaps use OIS discounting for both currencies, with FX translation for collateral posted in the non-domestic currency
- XCS pricing requires simultaneous modeling of two yield curves plus FX dynamics