/** * Creates a {@code IborAveragedFixing} from the fixing date with a weight of 1. * * @param observation the Ibor observation * @param fixedRate the fixed rate for the fixing date, optional, may be null * @return the unweighted fixing information */ public static IborAveragedFixing of(IborIndexObservation observation, Double fixedRate) { return IborAveragedFixing.builder() .observation(observation) .fixedRate(fixedRate) .build(); }
/** * Returns a builder used to create an instance of the bean. * @return the builder, not null */ public static OvernightAveragedRateComputation.Builder builder() { return new OvernightAveragedRateComputation.Builder(); }
@Override public OvernightAveragedRateComputation build() { return new OvernightAveragedRateComputation( index, fixingCalendar, startDate, endDate, rateCutOffDays); }
/** * Restricted copy constructor. * @param beanToCopy the bean to copy from, not null */ private Builder(OvernightCompoundedAnnualRateComputation beanToCopy) { this.index = beanToCopy.getIndex(); this.fixingCalendar = beanToCopy.getFixingCalendar(); this.startDate = beanToCopy.getStartDate(); this.endDate = beanToCopy.getEndDate(); }
/** * Gets the Ibor index. * * @return the ibor index */ public IborIndex getIndex() { return iborRate.getIndex(); }
/** * Creates an instance from the underlying index observation. * * @param underlyingObservation the underlying index observation * @return the rate computation */ public static IborRateComputation of(IborIndexObservation underlyingObservation) { return new IborRateComputation(underlyingObservation); }
/** * Creates an instance from the individual fixings. * <p> * All the fixings must have the same index. * * @param fixings the weighted fixings * @return the averaged rate computation */ public static IborAveragedRateComputation of(List<IborAveragedFixing> fixings) { return new IborAveragedRateComputation(fixings); }
/** * 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 OvernightAveragedDailyRateComputation build() { return new OvernightAveragedDailyRateComputation( index, fixingCalendar, startDate, endDate); }
@Override public InflationEndMonthRateComputation build() { return new InflationEndMonthRateComputation( startIndexValue, endObservation); }
/** * Gets the Overnight index that the future is based on. * * @return the Overnight index */ public OvernightIndex getIndex() { return overnightRate.getIndex(); }
@Override public IborInterpolatedRateComputation build() { return new IborInterpolatedRateComputation( shortObservation, longObservation); }
/** * 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 OvernightCompoundedRateComputation build() { return new OvernightCompoundedRateComputation( index, fixingCalendar, startDate, endDate, rateCutOffDays); }
/** * 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 InflationInterpolatedRateComputation build() { return new InflationInterpolatedRateComputation( startObservation, startSecondObservation, endObservation, endSecondObservation, weight); }
/** * Creates an instance. * * @param rate the fixed rate * @return the fixed rate computation */ public static FixedRateComputation of(double rate) { return new FixedRateComputation(rate); }
/** * Gets the Ibor index that the future is based on. * * @return the Ibor index */ public IborIndex getIndex() { return iborRate.getIndex(); }
@Override public IborRateComputation build() { return new IborRateComputation( observation); }
@Override public IborAveragedRateComputation build() { return new IborAveragedRateComputation( fixings); }