コード例 #1
0
 // resolve the FX rate sensitivity from the FX reset
 private PointSensitivityBuilder fxRateSensitivity(RatePaymentPeriod paymentPeriod, RatesProvider provider)
 {
     if (paymentPeriod.FxReset.Present)
     {
         FxReset      fxReset = paymentPeriod.FxReset.get();
         FxIndexRates rates   = provider.fxIndexRates(fxReset.Observation.Index);
         return(rates.ratePointSensitivity(fxReset.Observation, fxReset.ReferenceCurrency));
     }
     return(PointSensitivityBuilder.none());
 }
        public virtual PointSensitivityBuilder forecastValueSensitivity(FxResetNotionalExchange @event, RatesProvider provider)
        {
            FxIndexRates rates = provider.fxIndexRates(@event.Observation.Index);

            return(rates.ratePointSensitivity(@event.Observation, @event.ReferenceCurrency).multipliedBy(@event.Notional));
        }