Reconciling Final Asset Swap Cash Flows in QuantLib and Bloomberg
Summary
The document investigates an apparent discrepancy between final-period asset swap cash flows shown in QuantLib and Bloomberg. The questioner’s displayed schedules seem to omit the final coupon from both swap legs, leading to a concern that the two systems treat maturity payments differently.
The response checks the legs of the QuantLib test example directly and shows that the final fixed coupon and floating coupon are present, alongside principal repayment on the same maturity date. This suggests the mismatch arose from how the cash flows were displayed or grouped, rather than from missing final interest in the pricing instrument. The example gives specific cash flow amounts and dates, but the exchange does not explain the original display issue in detail or establish that every asset swap configuration will produce identical schedules across systems.
Key ideas
- Final asset swap payments should include the final interest amounts as well as principal repayment.
- The response inspects the QuantLib legs and finds final fixed and floating coupons in the example.
- Multiple cash flows can share the maturity date, so summaries may appear to omit a coupon.
- The example addresses a specific test case and does not establish behavior for every configuration.
Tags
Full text
# QuantLib - Asset Swap Cash Flow Final Period
# QuantLib - Asset Swap Cash Flow Final Period
I am comparing CFs of asset swaps in QuantLib to the asset swap screen (ASW) in Bloomberg. I noticed that the final payments of both swap legs do not include an interest payment for the final period. In Bloomberg, however, they do.
For example, taking the first asset swap from the test suite swapping DE0001135275 as of 04-24-2007.
Final periods fixed rate bond CFs
```
2034-01-04 4.00000
2035-01-04 4.00000
2036-01-04 3.99991
2037-01-05 104.00009
```
Final periods swap CFs
```
fixed_leg float_leg
2035-01-04 4.00000 2.552582
2035-07-04 NaN 2.510446
2036-01-04 3.99991 2.552582
2036-07-04 NaN 2.524490
2037-01-05 100.00000 100.000000
```
Is it possible to change this behavior in either QuantLib or BB so that the CFs align?
Thanks for any hints.
PS I tried posting to quantlib-users mailing list but my subscription is pending for approval so I decided to post here as well. Sorry for the duplication.
## Answer by David Duarte (score 1)
https://quant.stackexchange.com/a/50906
The final payments on both legs of an AssetSwap should obviously be included wherever you choose to value it, both for the par Asset Swap and Market Asset Swap cases.
In the QuantLib test suit you refer to, I see the final interest payments do exist, and are consistent with Bloomberg's pricer.
Taking the first example for that example, for the fixed (bond) leg you have:
```
for cf in list(parAssetSwap.leg(0))[-5:]:
print(cf.date(), cf.amount())
```
Which outputs:
```
January 4th, 2034 4.0000000000000036
January 4th, 2035 4.0000000000000036
January 4th, 2036 3.9999101729171427
January 5th, 2037 4.000089827082864
January 5th, 2037 100.0
```
And the floating leg...
```
for cf in list(parAssetSwap.leg(1))[-5:]:
print(cf.date(), cf.amount())
```
Which gives you:
```
July 4th, 2035 2.510446097912533
January 4th, 2036 2.552582336038789
July 4th, 2036 2.5244895866360917
January 5th, 2037 2.5666315972451503
January 5th, 2037 100.0
```Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.