Repository navigation
Value only the coupons the buyer is owed in Bond.asset_swap_spread - #492
Open
QuantIntellect wants to merge 1 commit into
Open
QuantIntellect wants to merge 1 commit into
QuantIntellect wants to merge 1 commit into
Conversation
asset_swap_spread valued the bond on the Ibor curve with every coupon paid after settlement. The bond price it compares with uses the accrued interest, which leaves out coupons the buyer doesn't get: - When the bond settles ex-dividend, the accrued interest is negative because the buyer doesn't get the next coupon. - When it settles on or after a coupon date whose payment rolls to a later business day, that coupon belongs to the seller and accrual has restarted. In both cases the spread included the coupon, and it jumped by about the coupon over the PV01 of the floating leg, for a gilt about 26 bp. Value the bond with the flows of dirty_price_from_discount_curve: the coupons the buyer is owed, without the next one when the bond settles ex-dividend.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
asset_swap_spreadvalues the bond on the Ibor curve with every coupon paid after settlement. The bond price it compares with uses the accrued interest, which leaves out coupons the buyer doesn't get:In both cases the spread still includes the coupon, so it jumps by about the coupon divided by the PV01 of the floating leg.
Example: a 4% bond like a gilt, whose coupons go ex-dividend 7 UK business days before the coupon date. The 7 Sep 2026 coupon goes ex on 26 Aug. The 7 Mar 2026 coupon date is a Saturday, so that coupon is paid on Monday 9 Mar. The clean price is 100 and the curve is flat at 4%, anchored at settlement:
The rolled coupon only affects settlement on the coupon date or later days before the payment date, which are not business days. A bond without ex-dividend days gives the same values on those dates.
Change
asset_swap_spreadnow values the bond with the flows ofdirty_price_from_discount_curve: the coupons the buyer is owed (_is_owed), without the next one when the bond settles ex-dividend. The PV01 of the floating leg is unchanged.Tests
test_asset_swap_spread_is_zero_at_the_curve_priceprices the bond above off a flat curve withdirty_price_from_discount_curveand checks that the spread on that curve is zero. It runs on five dates:On master, the two ex-dividend dates and the Saturday give about 26 bp instead of 0.
With the change, the unit tests pass (2,085). The bond regression tests give the same warning and error counts as master. That includes the four errors in
regression_test_bond_option_bk_model, which master also has.