@Override public InflationNodalCurve build() { return new InflationNodalCurve( underlying, seasonality, adjustmentType); }
private Object readResolve() { return new InflationNodalCurve(underlying, seasonality, adjustmentType); }
/** * Obtains an instance of the curve. * <p> * The seasonal adjustment is the total adjustment for each month, starting with January. * <p> * See {@link #of(NodalCurve, LocalDate, YearMonth, double, SeasonalityDefinition)} for * month-on-month adjustments and the adjustment starting point, including locking the last fixing. * * @param curve the curve with initial fixing * @param seasonality the total seasonal adjustment for each month, with the first element the January adjustment * @param adjustmentType the adjustment type * @return the seasonal curve instance */ public static InflationNodalCurve of( NodalCurve curve, DoubleArray seasonality, ShiftType adjustmentType) { return new InflationNodalCurve(curve, seasonality, adjustmentType); }
@Override public InflationNodalCurve withParameter(int parameterIndex, double newValue) { return new InflationNodalCurve(underlying.withParameter(parameterIndex + 1, newValue), seasonality, adjustmentType); }
@Override public InflationNodalCurve withMetadata(CurveMetadata metadata) { return new InflationNodalCurve(underlying.withMetadata(metadata), seasonality, adjustmentType); }
@Override public InflationNodalCurve withNode(double x, double y, ParameterMetadata paramMetadata) { ArgChecker.isTrue(xFixing < x, "node can be added only after the fixing anchor"); return new InflationNodalCurve(underlying.withNode(x, y, paramMetadata), seasonality, adjustmentType); }
@Override public InflationNodalCurve withYValues(DoubleArray values) { DoubleArray yExtended = DoubleArray.of(yFixing).concat(values); return new InflationNodalCurve(underlying.withYValues(yExtended), seasonality, adjustmentType); }
@Override public InflationNodalCurve withValues(DoubleArray xValues, DoubleArray yValues) { DoubleArray xExtended = DoubleArray.of(xFixing).concat(xValues); DoubleArray yExtended = DoubleArray.of(yFixing).concat(yValues); return new InflationNodalCurve(underlying.withValues(xExtended, yExtended), seasonality, adjustmentType); }
seasonalityDefinition.getSeasonalityMonthOnMonth().get((lastMonthIndex + i) % 12)); return new InflationNodalCurve( extendedCurve, DoubleArray.ofUnsafe(seasonalityCompoundedArray),