Class KnownAmountSwapLeg.Builder

    • Method Detail

      • payReceive

        public KnownAmountSwapLeg.Builder payReceive​(PayReceive payReceive)
        Sets whether the leg is pay or receive.

        A value of 'Pay' implies that the resulting amount is paid to the counterparty. A value of 'Receive' implies that the resulting amount is received from the counterparty. Note that negative interest rates can result in a payment in the opposite direction to that implied by this indicator.

        Parameters:
        payReceive - the new value, not null
        Returns:
        this, for chaining, not null
      • accrualSchedule

        public KnownAmountSwapLeg.Builder accrualSchedule​(PeriodicSchedule accrualSchedule)
        Sets the accrual period schedule.

        This is used to define the accrual periods. These are used directly or indirectly to determine other dates in the swap.

        Parameters:
        accrualSchedule - the new value, not null
        Returns:
        this, for chaining, not null
      • paymentSchedule

        public KnownAmountSwapLeg.Builder paymentSchedule​(PaymentSchedule paymentSchedule)
        Sets the payment period schedule.

        This is used to define the payment periods, including any compounding. The payment period dates are based on the accrual schedule.

        Parameters:
        paymentSchedule - the new value, not null
        Returns:
        this, for chaining, not null
      • amount

        public KnownAmountSwapLeg.Builder amount​(ValueSchedule amount)
        Sets the known amount schedule.

        This defines the schedule of known amounts, relative to the payment schedule. The schedule is defined as an initial amount, with optional changes during the tenor of the swap. The amount is only permitted to change at payment period boundaries.

        Note that the date of the payment is implied by the payment schedule. Any dates in the known amount schedule refer to the payment schedule, not the payment date.

        For example, consider a two year swap where each payment period is 3 months long. This schedule could define two entries, one that defines the payment amounts as GBP 1000 for the first year and one that defines the amount as GBP 500 for the second year. In this case there will be eight payments in total, four payments of GBP 1000 in the first year and four payments of GBP 500 in the second year. Each payment will occur on the date specified using the offset in PaymentSchedule.

        Parameters:
        amount - the new value, not null
        Returns:
        this, for chaining, not null
      • currency

        public KnownAmountSwapLeg.Builder currency​(Currency currency)
        Sets the currency of the swap leg.

        This is the currency of the known payments.

        Parameters:
        currency - the new value, not null
        Returns:
        this, for chaining, not null