Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up inflation swaps convention #1539

Merged
merged 3 commits into from
Jul 28, 2017

Conversation

brianweller89
Copy link
Contributor

  • USCPI now interpolated
  • JPY now interpolated (using 10th of the month inflation base)
  • All GBP indices now use 2 month inflation lag.

Primary Source: Barclays Inflation Derivatives Users Guide

“The trading month for UK RPI breakeven swaps has a lag of two months“

“US zero coupon CPI swaps have adopted an interpolated base index format“

“…with the most standard format for [JPY] zero coupon breakevens using the same interpolated inflation basis as JGBi bonds, ie, a three-month lagged inflation reference from the tenth of the month. “

USCPI now interpolated
JPY now interpolated (using 10th of the month inflation)
All GBP indices now use 2 month inflation lag.

Primary Source:
http://www.trade2win.com/boards/attachments/next-steps/101520d1296424640-inflation-trading-barclays-inflation-derivatives-users-guide.pdf
* @param businessDayAdjustment the business day
* @return the convention
*/
public static InflationRateSwapLegConvention of(
PriceIndex index,
Period lag,
PriceIndexCalculationMethod priceIndexCalculationMethod,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an incompatible change. Need to add an overload.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Have deprecated the old method as the client should have to provide interpolation style when defining conventions. Defaulting to monthly seems slightly arbitrary.

BusinessDayAdjustment businessDayAdjustment) {

return new InflationRateSwapLegConvention(index, lag, PriceIndexCalculationMethod.MONTHLY, false,
return new InflationRateSwapLegConvention(index, lag, priceIndexCalculationMethod, false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each argument should be on a new line

@@ -157,6 +194,7 @@ private static FixedRateSwapLegConvention fixedLegZcConvention(Currency ccy, Hol
}

//-------------------------------------------------------------------------

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blank line here

private static final InflationRateSwapLegConvention INFL3 = InflationRateSwapLegConvention.of(GB_RPIX, LAG_3M, BDA_MOD_FOLLOW);
private static final InflationRateSwapLegConvention INFL = InflationRateSwapLegConvention.of(GB_HICP, LAG_3M, MONTHLY, BDA_MOD_FOLLOW);
private static final InflationRateSwapLegConvention INFL2 = InflationRateSwapLegConvention.of(GB_RPI, LAG_3M, MONTHLY, BDA_MOD_FOLLOW);
private static final InflationRateSwapLegConvention INFL3 = InflationRateSwapLegConvention.of(GB_RPIX, LAG_3M, MONTHLY, BDA_MOD_FOLLOW);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could back this out when compatibility overload added.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would rather keep the test changes in order to discourage the use of the now deprecated method.

Copy link
Member

@jodastephen jodastephen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved subject to fixing the build failure. (The class was incorrectly reformatted, with lots of extra blank lines)

@brianweller89 brianweller89 merged commit ff1b758 into master Jul 28, 2017
@brianweller89 brianweller89 deleted the topic/inflation_conventions_cleanup branch July 28, 2017 11:51
jodastephen pushed a commit that referenced this pull request Jul 28, 2017
* Cleaning up inflation swaps convention:
USCPI now interpolated
JPY now interpolated (using 10th of the month inflation)
All GBP indices now use 2 month inflation lag.

Primary Source:
http://www.trade2win.com/boards/attachments/next-steps/101520d1296424640-inflation-trading-barclays-inflation-derivatives-users-guide.pdf
@jodastephen jodastephen added this to the v1.4 milestone Jul 31, 2017
@jodastephen jodastephen modified the milestone: v1.4 Jul 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants