PV01CalibratedBucketed - unexpected results

Hello,

When I ask OG to calculate measure of PV01CalibratedBucketed (with ordinary market data), I expect to get similar values of sensitivity for buckets. However, the results show concentration in the one before last bucket (same results for other trades as well), see below:

Trade
<trade>
		<tradeHeader>
			<partyTradeIdentifier>
				<partyReference href="ExecutionFacility"/>
				<tradeId tradeIdScheme="http://www.tradeweb.com/swaps/trade-id">SEF_ORDER00002001_028-01</tradeId>
			</partyTradeIdentifier>
			<tradeDate>2016-08-25</tradeDate>
		</tradeHeader>
		<swap>
			<productType>InterestRate:IRSwap:FixedFloat</productType>
			<swapStream id="floatingLeg">
				<payerPartyReference href="party1"/>
				<receiverPartyReference href="party2"/>
				<calculationPeriodDates id="payCalcDates">
					<effectiveDate>
						<unadjustedDate>2016-08-30</unadjustedDate>
						<dateAdjustments>
							<businessDayConvention>NONE</businessDayConvention>
						</dateAdjustments>
					</effectiveDate>
					<terminationDate>
						<unadjustedDate>2021-08-30</unadjustedDate>
						<dateAdjustments>
							<businessDayConvention>MODFOLLOWING</businessDayConvention>
							<businessCenters>
								<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">NYFD</businessCenter>
								<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">GBLO</businessCenter>
							</businessCenters>
						</dateAdjustments>
					</terminationDate>
					<calculationPeriodDatesAdjustments>
						<businessDayConvention>MODFOLLOWING</businessDayConvention>
						<businessCenters>
							<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">NYFD</businessCenter>
							<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">GBLO</businessCenter>
						</businessCenters>
					</calculationPeriodDatesAdjustments>
					<calculationPeriodFrequency>
						<periodMultiplier>3</periodMultiplier>
						<period>M</period>
						<rollConvention>30</rollConvention>
					</calculationPeriodFrequency>
				</calculationPeriodDates>
				<paymentDates>
					<calculationPeriodDatesReference href="payCalcDates"/>
					<paymentFrequency>
						<periodMultiplier>3</periodMultiplier>
						<period>M</period>
					</paymentFrequency>
					<payRelativeTo>CalculationPeriodEndDate</payRelativeTo>
					<paymentDatesAdjustments>
						<businessDayConvention>MODFOLLOWING</businessDayConvention>
						<businessCenters>
							<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">NYFD</businessCenter>
							<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">GBLO</businessCenter>
						</businessCenters>
					</paymentDatesAdjustments>
				</paymentDates>
				<resetDates id="payResetDates">
					<calculationPeriodDatesReference href="payCalcDates"/>
					<resetRelativeTo>CalculationPeriodStartDate</resetRelativeTo>
					<fixingDates>
						<periodMultiplier>-2</periodMultiplier>
						<period>D</period>
						<dayType>Business</dayType>
						<businessDayConvention>NONE</businessDayConvention>
						<businessCenters>
							<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">GBLO</businessCenter>
						</businessCenters>
						<dateRelativeTo href="payResetDates"/>
					</fixingDates>
					<resetFrequency>
						<periodMultiplier>3</periodMultiplier>
						<period>M</period>
					</resetFrequency>
					<resetDatesAdjustments>
						<businessDayConvention>MODFOLLOWING</businessDayConvention>
						<businessCenters>
							<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">NYFD</businessCenter>
							<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">GBLO</businessCenter>
						</businessCenters>
					</resetDatesAdjustments>
				</resetDates>
				<calculationPeriodAmount>
					<calculation>
						<notionalSchedule id="payNotionalSchedule">
							<notionalStepSchedule>
								<initialValue>10000000</initialValue>
								<currency currencyScheme="http://www.fpml.org/coding-scheme/external/iso4217-2001-08-15">USD</currency>
							</notionalStepSchedule>
						</notionalSchedule>
						<floatingRateCalculation>
							<floatingRateIndex floatingRateIndexScheme="http://www.fpml.org/coding-scheme/floating-rate-index">USD-LIBOR-BBA</floatingRateIndex>
							<indexTenor>
								<periodMultiplier>3</periodMultiplier>
								<period>M</period>
							</indexTenor>
						</floatingRateCalculation>
						<dayCountFraction dayCountFractionScheme="http://www.fpml.org/coding-scheme/day-count-fraction">30/360</dayCountFraction>
					</calculation>
				</calculationPeriodAmount>
			</swapStream>
			<swapStream id="fixedLeg">
				<payerPartyReference href="party2"/>
				<receiverPartyReference href="party1"/>
				<calculationPeriodDates id="recCalcDates">
					<effectiveDate>
						<unadjustedDate>2016-08-30</unadjustedDate>
						<dateAdjustments>
							<businessDayConvention>NONE</businessDayConvention>
						</dateAdjustments>
					</effectiveDate>
					<terminationDate>
						<unadjustedDate>2021-08-30</unadjustedDate>
						<dateAdjustments>
							<businessDayConvention>MODFOLLOWING</businessDayConvention>
							<businessCenters>
								<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">NYFD</businessCenter>
								<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">GBLO</businessCenter>
							</businessCenters>
						</dateAdjustments>
					</terminationDate>
					<calculationPeriodDatesAdjustments>
						<businessDayConvention>MODFOLLOWING</businessDayConvention>
						<businessCenters>
							<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">NYFD</businessCenter>
							<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">GBLO</businessCenter>
						</businessCenters>
					</calculationPeriodDatesAdjustments>
					<calculationPeriodFrequency>
						<periodMultiplier>6</periodMultiplier>
						<period>M</period>
						<rollConvention>30</rollConvention>
					</calculationPeriodFrequency>
				</calculationPeriodDates>
				<paymentDates>
					<calculationPeriodDatesReference href="recCalcDates"/>
					<paymentFrequency>
						<periodMultiplier>6</periodMultiplier>
						<period>M</period>
					</paymentFrequency>
					<payRelativeTo>CalculationPeriodEndDate</payRelativeTo>
					<paymentDatesAdjustments>
						<businessDayConvention>MODFOLLOWING</businessDayConvention>
						<businessCenters>
							<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">NYFD</businessCenter>
							<businessCenter businessCenterScheme="http://www.fpml.org/coding-scheme/business-center">GBLO</businessCenter>
						</businessCenters>
					</paymentDatesAdjustments>
				</paymentDates>
				<calculationPeriodAmount>
					<calculation>
						<notionalSchedule id="receiveNotionalSchedule">
							<notionalStepSchedule>
								<initialValue>10000000</initialValue>
								<currency currencyScheme="http://www.fpml.org/coding-scheme/external/iso4217-2001-08-15">USD</currency>
							</notionalStepSchedule>
						</notionalSchedule>
						<fixedRateSchedule>
							<initialValue>0.0114652967</initialValue>
						</fixedRateSchedule>
						<dayCountFraction dayCountFractionScheme="http://www.fpml.org/coding-scheme/day-count-fraction">30/360</dayCountFraction>
					</calculation>
				</calculationPeriodAmount>
			</swapStream>
		</swap>
	</trade>
Bucketed results

marketDataName = {com.opengamma.strata.market.curve.CurveName@14546} "USD_IRS_3M"
parameterMetadata = {com.google.common.collect.RegularImmutableList@14547} size = 52
sensitivity = {com.opengamma.strata.collect.array.DoubleArray@15780} "[0.0, 0.0, 0.0, 0.0, 0.0, -250.6229579146853, -8.40850284262374, -12.285655034908746, 9.34233169844132, 2.0147828998608515, 18.08171847680155, -30.885579035948034, 21.660147856313735, 4.272865596238152, 31.277464058282227, -47.5813548023805, 2.567995340775326, 134.65570560204796, -62.238883978869026, -64.0832913678527, 6.32539025412947, -81.76604432477131, 336.6192413901672, -179.23409043204413, 4475.823621412836, 368.8355249877134, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]"
array = {double[52]@15783}
0 = 0.0
1 = 0.0
2 = 0.0
3 = 0.0
4 = 0.0
5 = -250.6229579146853
6 = -8.40850284262374
7 = -12.285655034908746
8 = 9.34233169844132
9 = 2.0147828998608515
10 = 18.08171847680155
11 = -30.885579035948034
12 = 21.660147856313735
13 = 4.272865596238152
14 = 31.277464058282227
15 = -47.5813548023805
16 = 2.567995340775326
17 = 134.65570560204796
18 = -62.238883978869026
19 = -64.0832913678527
20 = 6.32539025412947
21 = -81.76604432477131
22 = 336.6192413901672
23 = -179.23409043204413
24 = 4475.823621412836
25 = 368.8355249877134

Can you provide us the curve data which you are using so that we can reproduce?

IRS_3M

RIC Currency Tenor Yield Discount Maturity Date
USDSBQLONZ=R USD ON 0.479 0.9999869 10-Aug-16
USDSBQLTNZ=R USD TN 0.4688 0.9999744 11-Aug-16
USDSBQL1WZ=R USD 1W 0.4561 0.9998881 18-Aug-16
USDSBQL1MZ=R USD 1M 0.5198 0.9995185 12-Sep-16
USDSBQL2MZ=R USD 2M 0.6455 0.9988931 11-Oct-16
USDSBQL3MZ=R USD 3M 0.7343 0.9980628 14-Nov-16
USDSBQL6MZ=R USD 6M 0.8405 0.9957097 13-Feb-17
USDSBQL9MZ=R USD 9M 0.8828 0.9933999 11-May-17
USDSBQL1YZ=R USD 1Y 0.9172 0.9908617 11-Aug-17
USDSBQL1Y3MZ=R USD 1Y3M 0.9453 0.9881944 13-Nov-17
USDSBQL1Y6MZ=R USD 1Y6M 0.9703 0.985516 12-Feb-18
USDSBQL1Y9MZ=R USD 1Y9M 0.9908 0.9828617 11-May-18
USDSBQL2YZ=R USD 2Y 1.0115 0.9799643 13-Aug-18
USDSBQL2Y3MZ=R USD 2Y3M 1.0309 0.9770653 13-Nov-18
USDSBQL2Y6MZ=R USD 2Y6M 1.052 0.9740938 11-Feb-19
USDSBQL2Y9MZ=R USD 2Y9M 1.0617 0.9712836 13-May-19
USDSBQL3YZ=R USD 3Y 1.0631 0.9686892 12-Aug-19
USDSBQL3Y3MZ=R USD 3Y3M 1.072 0.9658415 12-Nov-19
USDSBQL3Y6MZ=R USD 3Y6M 1.0871 0.9627776 11-Feb-20
USDSBQL3Y9MZ=R USD 3Y9M 1.1052 0.9595856 11-May-20
USDSBQL4YZ=R USD 4Y 1.1234 0.9562385 11-Aug-20
USDSBQL4Y3MZ=R USD 4Y3M 1.1407 0.9528347 12-Nov-20
USDSBQL4Y6MZ=R USD 4Y6M 1.1566 0.949478 11-Feb-21
USDSBQL4Y9MZ=R USD 4Y9M 1.1714 0.9461471 11-May-21
USDSBQL5YZ=R USD 5Y 1.1873 0.9426303 11-Aug-21
USDSBQL5Y3MZ=R USD 5Y3M 1.2042 0.9389813 12-Nov-21
USDSBQL5Y6MZ=R USD 5Y6M 1.2212 0.9353277 11-Feb-22
USDSBQL5Y9MZ=R USD 5Y9M 1.2374 0.9316892 11-May-22
USDSBQL6YZ=R USD 6Y 1.2543 0.9278746 11-Aug-22
USDSBQL6Y3MZ=R USD 6Y3M 1.2715 0.9238916 14-Nov-22
USDSBQL6Y6MZ=R USD 6Y6M 1.2877 0.9200357 13-Feb-23
USDSBQL6Y9MZ=R USD 6Y9M 1.3026 0.9163108 11-May-23
USDSBQL7YZ=R USD 7Y 1.3184 0.9123297 11-Aug-23
USDSBQL7Y3MZ=R USD 7Y3M 1.3345 0.9082174 13-Nov-23
USDSBQL7Y6MZ=R USD 7Y6M 1.3498 0.9041992 12-Feb-24
USDSBQL7Y9MZ=R USD 7Y9M 1.365 0.9001515 13-May-24
USDSBQL8YZ=R USD 8Y 1.3796 0.8960813 12-Aug-24
USDSBQL8Y3MZ=R USD 8Y3M 1.394 0.8919488 12-Nov-24
USDSBQL8Y6MZ=R USD 8Y6M 1.408 0.8878418 11-Feb-25
USDSBQL8Y9MZ=R USD 8Y9M 1.4213 0.8837572 12-May-25
USDSBQL9YZ=R USD 9Y 1.4347 0.8796005 11-Aug-25
USDSBQL9Y3MZ=R USD 9Y3M 1.4485 0.8753225 12-Nov-25
USDSBQL9Y6MZ=R USD 9Y6M 1.4618 0.8711125 11-Feb-26
USDSBQL9Y9MZ=R USD 9Y9M 1.4743 0.8669786 11-May-26
USDSBQL10YZ=R USD 10Y 1.4871 0.8626951 11-Aug-26
USDSBQL12YZ=R USD 12Y 1.5783 0.8286116 11-Aug-28
USDSBQL15YZ=R USD 15Y 1.6848 0.7782532 11-Aug-31
USDSBQL20YZ=R USD 20Y 1.7992 0.699958 11-Aug-36
USDSBQL25YZ=R USD 25Y 1.8516 0.6320363 12-Aug-41
USDSBQL30YZ=R USD 30Y 1.881 0.5716245 13-Aug-46
USDSBQL40YZ=R USD 40Y 1.8943 0.472016 11-Aug-56
USDSBQL50YZ=R USD 50Y 1.8738 0.3952212 11-Aug-66

OIS

USDOISONZ=R USD ON 0.4075 0.9999889 10/8/2016
USDOISTNZ=R USD TN 0.4075 0.9999778 11/8/2016
USDOIS1WZ=R USD 1W 0.4079 0.9998999 18-08-16
USDOIS1MZ=R USD 1M 0.4057 0.999624 12/9/2016
USDOIS2MZ=R USD 2M 0.4182 0.9992819 11/10/2016
USDOIS3MZ=R USD 3M 0.4293 0.9988653 14-11-16
USDOIS6MZ=R USD 6M 0.4637 0.9976263 13-02-17
USDOIS9MZ=R USD 9M 0.4894 0.9963285 11/5/2017
USDOIS1YZ=R USD 1Y 0.516 0.9948387 11/8/2017
USDOIS1Y3MZ=R USD 1Y3M 0.5388 0.99324 13-11-17
USDOIS1Y6MZ=R USD 1Y6M 0.5592 0.9916101 12/2/2018
USDOIS1Y9MZ=R USD 1Y9M 0.5757 0.989985 11/5/2018
USDOIS2YZ=R USD 2Y 0.5932 0.988176 13-08-18
USDOIS2Y3MZ=R USD 2Y3M 0.6129 0.9862714 13-11-18
USDOIS2Y6MZ=R USD 2Y6M 0.6328 0.9843027 11/2/2019
USDOIS2Y9MZ=R USD 2Y9M 0.6512 0.9822517 13-05-19
USDOIS3YZ=R USD 3Y 0.6675 0.9801861 12/8/2019
USDOIS3Y3MZ=R USD 3Y3M 0.6812 0.9781156 12/11/2019
USDOIS3Y6MZ=R USD 3Y6M 0.693 0.976062 11/2/2020
USDOIS3Y9MZ=R USD 3Y9M 0.7046 0.9739896 11/5/2020
USDOIS4YZ=R USD 4Y 0.7169 0.9717914 11/8/2020
USDOIS4Y3MZ=R USD 4Y3M 0.7309 0.969458 12/11/2020
USDOIS4Y6MZ=R USD 4Y6M 0.7455 0.9670714 11/2/2021
USDOIS4Y9MZ=R USD 4Y9M 0.76 0.9646512 11/5/2021
USDOIS5YZ=R USD 5Y 0.7754 0.9620731 11/8/2021
USDOIS5Y3MZ=R USD 5Y3M 0.7912 0.9593998 12/11/2021
USDOIS5Y6MZ=R USD 5Y6M 0.8064 0.9567221 11/2/2022
USDOIS5Y9MZ=R USD 5Y9M 0.821 0.9540455 11/5/2022
USDOIS6YZ=R USD 6Y 0.8362 0.9512203 11/8/2022
USDOIS6Y3MZ=R USD 6Y3M 0.8519 0.9482422 14-11-22
USDOIS6Y6MZ=R USD 6Y6M 0.8668 0.9453333 13-02-23
USDOIS6Y9MZ=R USD 6Y9M 0.8807 0.9425023 11/5/2023
USDOIS7YZ=R USD 7Y 0.8955 0.9394568 11/8/2023
USDOIS7Y3MZ=R USD 7Y3M 0.9106 0.9362918 13-11-23
USDOIS7Y6MZ=R USD 7Y6M 0.925 0.9331782 12/2/2024
USDOIS7Y9MZ=R USD 7Y9M 0.9395 0.9300171 13-05-24
USDOIS8YZ=R USD 8Y 0.9536 0.9268103 12/8/2024
USDOIS8Y3MZ=R USD 8Y3M 0.9679 0.9235231 12/11/2024
USDOIS8Y6MZ=R USD 8Y6M 0.9819 0.9202287 11/2/2025
USDOIS8Y9MZ=R USD 8Y9M 0.9954 0.9169299 12/5/2025
USDOIS9YZ=R USD 9Y 1.009 0.913555 11/8/2025
USDOIS9Y3MZ=R USD 9Y3M 1.0229 0.9100664 12/11/2025
USDOIS9Y6MZ=R USD 9Y6M 1.0364 0.9066158 11/2/2026
USDOIS9Y9MZ=R USD 9Y9M 1.0492 0.9032071 11/5/2026
USDOIS10YZ=R USD 10Y 1.0625 0.8996497 11/8/2026
USDOIS12YZ=R USD 12Y 1.1586 0.8708389 11/8/2028
USDOIS15YZ=R USD 15Y 1.2563 0.8291665 11/8/1931
USDOIS20YZ=R USD 20Y 1.3678 0.7620151 11/8/1936
USDOIS25YZ=R USD 25Y 1.4171 0.7033477 12/8/1941
USDOIS30YZ=R USD 30Y 1.4445 0.6502534 13-08-46

Looking into the curve data, the maturity date of the 25th node point is in Aug/2021, that is very close to the maturity of the pricing swap trade. Thus the 25th element of the bucketed PV01 is expected to be large.

Seems like I paste the wrong bucketed, I updated it

On the updated bucketed PV01 numbers, the sensitivities values are not small well beyond the maturity of the traded swap. We will continue to investigate this.

my bad. the previous was good. I’ll update again the previous bucketed. as I wrote, I send multiple trade and the common for all of them is concentration of sensitivity in the one before last bucket

Yuki, how do you define “bucketed sensitivities”? I don’t think we’re using the same terminology.

For example, our definition for the “2Y-3Y Bucket PV01” is:
2Y3Y_Bucket_PV01 = P’ - P
where:
P = Value of all actual payments made between 2Y and 3Y
P’ = Value of all actual payments made between 2Y and 3Y when shifting the underlying curve by 1bp

This means that if (for example) we’re pricing a 30Y swap that pays every 10Y (both legs) - out of 30 1Y buckets (0-1, 1-2, 2-3, etc) - only 3 buckets (9-10, 19-20, 29-30) will have any sensitivity values. Everything else will be at 0.

This doesn’t seem to be the way Strata defines bucketed sensitivity, is that correct?
If that’s accurate - how would you go about using Strata to calculate the “payment buckets sensitivity” I described?

Thanks, sorry for the confusion

The definition of “bucketed PV01” is the following:
The sensitivity at node N_i (for example 3Y) is the partial derivative of the PV with respect to the input value at node i (multiplied by one basis point). That sensitivity can be approximated by the finite difference of the PV by keeping the curve constant except for the value of the i-th node which is shifted by 1 bp:
PV(N1, …, N_i + 1bp, …) - PV(N1, …, N_i, …)

All the cash flows of the instrument are taken into account. Which one will change value when the node is shifted will depend on the interpolator used in the curve description.

Note that the sensitivities are computed by Algorithmic Differentiation. The one basis point finite difference in the formula above is not computed as such by the code.

There are two bucketed PV01 available, one called ‘PV01CalibratedBucketed’, ‘Parameter sensitivity’ or ‘zero rate sensitivity’ and the other called ’ PV01MarketQuoteBucketed’, ‘Market Quote sensitivity’ or 'Par Rate sensitivity. In the first case, the internal parameters of the calibrated curves (often the zero-coupon rates) are bumped; in the second case, the market data (often the par rates) are bumped and the curves are re-calibrated.

Marc

Hey Marc, thanks for the detailed answer.
This sounds like the more thorough version of “our” Bucketed PV01 - which is great.
Still, this can be described as "every curve point’s contribution to the total sensitivity "- where our version is “every payment period’s contribution to the total sensitivity”.

What I’m not fully getting is why the last bucket (or one before last) is always so dominant - when it’s a simple swap, shouldn’t the distribution be fairly consistent?

1 Like

In this description of the curves, the x year point is the rate over the x year period, from day 0 to year x. In the example by ‘yanlvh’, the maturity is around 5 years. If you move the 1 year rate up by 1bp and keep the 5 year rate constant (to compute the 1Y sensitivity), what is happening? The valuation of the swap over the 1st year changes; let’s say it goes up. But as the 5 year rate, which is some kind of average over the 5 y period, is unchanged, the forward rate between 1 y and 5y goes down (roughly by 0.25bp). The value of the swap on the 1Y to 5Y period goes down and the total value is almost unchanged.

If you move the 5Y rate by 1 bp, the full curve up to 5Y changes and all the cash flows are impacted in the same direction. The value of the swap goes up significantly. For the above swap which is 10m over 5Y, I’m expecting a pv01 of 10,000,000 USD x 5Y x 1 bps/Y ~ 5,000 USD. This is roughly what appears in the last bucketed of the example.

If instead of zero-rate over the period, we where using forward rate to describe the curve, the situation would be different. If the data used was based on FRA or interest rate futures on 3 months periods, then we would see what you describe. The sensitivity would be roughly consistent between the different points as each of them contribute to one 3 month sub-period of the swap.

Regarding the quote-based measures - all we have are zero rates, so I don’t think we’ll be able to use those.

As for the sensitivity - our users seem to be more interested in the finite “payment” sensitivity than the actual parametric sensitivity. Using a multiple scenario (0,1bp shift) calculation and the cashflows measure to achieve that looks like a good fit.

Things are clearer now, mostly thanks to your detailed answers.
Thanks Marc.