// calibrated sum PV01 for one scenario MultiCurrencyAmount pv01CalibratedSum(ResolvedDsfTrade trade, RatesProvider ratesProvider) { PointSensitivities pointSensitivity = tradePricer.presentValueSensitivity(trade, ratesProvider); return ratesProvider .parameterSensitivity(pointSensitivity) .total() .multipliedBy(ONE_BASIS_POINT); }
// market quote bucketed PV01 for one scenario CurrencyParameterSensitivities pv01MarketQuoteBucketed( ResolvedDsfTrade trade, RatesProvider ratesProvider) { PointSensitivities pointSensitivity = tradePricer.presentValueSensitivity(trade, ratesProvider); CurrencyParameterSensitivities parameterSensitivity = ratesProvider.parameterSensitivity(pointSensitivity); return MARKET_QUOTE_SENS .sensitivity(parameterSensitivity, ratesProvider) .multipliedBy(ONE_BASIS_POINT); }