Class Swap

    • Constructor Detail

      • Swap

        public Swap​(Notional notional,
                    Schedule scheduleReceiveLeg,
                    AbstractIndex indexReceiveLeg,
                    double spreadReceiveLeg,
                    Schedule schedulePayLeg,
                    AbstractIndex indexPayLeg,
                    double spreadPayLeg)
        Create a swap from schedules, notional, indices and spreads (fixed coupons).
        Parameters:
        notional - The notional.
        scheduleReceiveLeg - The period schedule for the receiver leg.
        indexReceiveLeg - The index of the receiver leg, may be null if no index is received.
        spreadReceiveLeg - The constant spread or fixed coupon rate of the receiver leg.
        schedulePayLeg - The period schedule for the payer leg.
        indexPayLeg - The index of the payer leg, may be null if no index is paid.
        spreadPayLeg - The constant spread or fixed coupon rate of the payer leg.
      • Swap

        @Deprecated
        public Swap​(double[] fixingDates,
                    double[] paymentDates,
                    double[] swaprates)
        Deprecated.
        This constructor is deprecated. If you like to create a payer swap from fixingDates, paymentDates and swaprates use SimpleSwap.
        Create a payer swap from idealized data.
        Parameters:
        fixingDates - Vector of fixing dates
        paymentDates - Vector of payment dates (must have same length as fixing dates)
        swaprates - Vector of strikes (must have same length as fixing dates)