All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.opengamma.strata.product.swap.SwapPaymentPeriod Maven / Gradle / Ivy

There is a newer version: 2.12.56
Show newest version
/*
 * Copyright (C) 2014 - present by OpenGamma Inc. and the OpenGamma group of companies
 *
 * Please see distribution for license.
 */
package com.opengamma.strata.product.swap;

import java.time.LocalDate;
import java.time.temporal.TemporalAdjuster;

import com.google.common.collect.ImmutableSet;
import com.opengamma.strata.basics.currency.Currency;
import com.opengamma.strata.basics.date.BusinessDayAdjustment;
import com.opengamma.strata.basics.index.Index;

/**
 * A period over which interest is accrued with a single payment.
 * 

* A single payment period within a swap leg. * The amount of the payment is defined by implementations of this interface. * It is typically based on a rate of interest. *

* This interface imposes few restrictions on the payment periods. * The period must have a payment date, currency and period dates. *

* Implementations must be immutable and thread-safe beans. */ public interface SwapPaymentPeriod { /** * Gets the date that the payment is made. *

* Each payment period has a single payment date. * This date has been adjusted to be a valid business day. * * @return the payment date of the period */ public abstract LocalDate getPaymentDate(); /** * Gets the currency of the payment resulting from the period. *

* This is the currency of the generated payment. * A period has a single currency. * * @return the currency of the period */ public abstract Currency getCurrency(); /** * Gets the start date of the period. *

* This is the first accrual date in the period. * This date has been adjusted to be a valid business day. * * @return the start date of the period */ public abstract LocalDate getStartDate(); /** * Gets the end date of the period. *

* This is the last accrual date in the period. * This date has been adjusted to be a valid business day. * * @return the end date of the period */ public abstract LocalDate getEndDate(); //------------------------------------------------------------------------- /** * Collects all the indices referred to by this period. *

* A period will typically refer to at least one index, such as 'GBP-LIBOR-3M'. * Each index that is referred to must be added to the specified builder. * * @param builder the builder to use */ public abstract void collectIndices(ImmutableSet.Builder builder); /** * Adjusts the payment date using the rules of the specified adjuster. *

* The adjuster is typically an instance of {@link BusinessDayAdjustment}. * Implementations must return a new instance unless they are immutable and no change occurs. * * @param adjuster the adjuster to apply to the payment date * @return the adjusted payment event */ public abstract SwapPaymentPeriod adjustPaymentDate(TemporalAdjuster adjuster); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy