public virtual PointSensitivityBuilder rateSensitivity(OvernightCompoundedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider) { OvernightIndexRates rates = provider.overnightIndexRates(computation.Index); ObservationDetails details = new ObservationDetails(computation, rates); return(details.calculateRateSensitivity()); }
public virtual PointSensitivityBuilder rateSensitivity(OvernightAveragedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider) { OvernightIndexRates rates = provider.overnightIndexRates(computation.Index); LocalDate valuationDate = rates.ValuationDate; LocalDate startFixingDate = computation.StartDate; LocalDate startPublicationDate = computation.calculatePublicationFromFixing(startFixingDate); // No fixing to analyze. Go directly to approximation and cut-off. if (valuationDate.isBefore(startPublicationDate)) { return(rateForwardSensitivity(computation, rates)); } ObservationDetails details = new ObservationDetails(computation, rates); return(details.calculateRateSensitivity()); }