@Override public ResolvedSwapTrade resolve(ReferenceData refData) { return new ResolvedSwapTrade(info, product.resolve(refData)); }
private double unitNotionalAccrualRaw(RateAccrualPeriod accrualPeriod, double rawRate, double spread) { double treatedRate = rawRate * accrualPeriod.getGearing() + spread; return accrualPeriod.getNegativeRateMethod().adjust(treatedRate * accrualPeriod.getYearFraction()); }
/** * Restricted copy constructor. * @param beanToCopy the bean to copy from, not null */ private Builder(InflationRateCalculation beanToCopy) { this.index = beanToCopy.getIndex(); this.lag = beanToCopy.getLag(); this.indexCalculationMethod = beanToCopy.getIndexCalculationMethod(); this.firstIndexValue = beanToCopy.firstIndexValue; this.gearing = beanToCopy.gearing; }
@Override public void collectCurrencies(ImmutableSet.Builder<Currency> builder) { builder.add(getCurrency()); calculation.collectCurrencies(builder); notionalSchedule.getFxReset().ifPresent(fxReset -> builder.add(fxReset.getReferenceCurrency())); }
/** * Restricted copy constructor. * @param beanToCopy the bean to copy from, not null */ private Builder(FixedRateCalculation beanToCopy) { this.dayCount = beanToCopy.getDayCount(); this.rate = beanToCopy.getRate(); this.initialStub = beanToCopy.initialStub; this.finalStub = beanToCopy.finalStub; this.futureValueNotional = beanToCopy.futureValueNotional; }
/** * Restricted copy constructor. * @param beanToCopy the bean to copy from, not null */ private Builder(ImmutableSwapIndex beanToCopy) { this.name = beanToCopy.getName(); this.active = beanToCopy.isActive(); this.fixingTime = beanToCopy.getFixingTime(); this.fixingZone = beanToCopy.getFixingZone(); this.template = beanToCopy.getTemplate(); }
/** * Returns a builder used to create an instance of the bean. * @return the builder, not null */ public static FutureValueNotional.Builder builder() { return new FutureValueNotional.Builder(); }
@Override public KnownAmountSwapPaymentPeriod build() { preBuild(this); return new KnownAmountSwapPaymentPeriod( payment, startDate, endDate, unadjustedStartDate, unadjustedEndDate); }
/** * Obtains an instance from the payment. * * @param payment the payment to be made * @return the notional exchange */ public static NotionalExchange of(Payment payment) { return new NotionalExchange(payment); }
@Override public RateCalculationSwapLeg build() { return new RateCalculationSwapLeg( payReceive, accrualSchedule, paymentSchedule, notionalSchedule, calculation); }
/** * Returns a builder that allows this bean to be mutated. * @return the mutable builder, not null */ public Builder toBuilder() { return new Builder(this); }
@Override public InflationRateCalculation build() { return new InflationRateCalculation( index, lag, indexCalculationMethod, firstIndexValue, gearing); }
/** * Returns a builder that allows this bean to be mutated. * @return the mutable builder, not null */ public Builder toBuilder() { return new Builder(this); }
/** * Returns a builder that allows this bean to be mutated. * @return the mutable builder, not null */ public Builder toBuilder() { return new Builder(this); }
@Override public FxResetCalculation build() { preBuild(this); return new FxResetCalculation( index, referenceCurrency, fixingRelativeTo, fixingDateOffset, initialNotionalValue); }
@Override public PaymentSchedule build() { return new PaymentSchedule( paymentFrequency, businessDayAdjustment, paymentRelativeTo, paymentDateOffset, compoundingMethod, firstRegularStartDate, lastRegularEndDate); }
/** * Returns a builder used to create an instance of the bean. * @return the builder, not null */ public static ImmutableSwapIndex.Builder builder() { return new ImmutableSwapIndex.Builder(); }
@Override public ImmutableSwapIndex build() { return new ImmutableSwapIndex( name, active, fixingTime, fixingZone, template); }