All Implemented Interfaces:
Product, TermStructureMonteCarloProduct, MonteCarloProduct

public class Swap extends AbstractTermStructureMonteCarloProduct
Create a swap from schedules, notional, indices and spreads (fixed coupons). The getValue method of this class simple returns legReceiver.getValue(evaluationTime, model).sub(legPayer.getValue(evaluationTime, model)) where legReceiver and legPayer are SwapLegs.
Version:
1.0
Author:
Christian Fries
  • Constructor Details

    • Swap

      Create a swap which values as legReceiver - legPayer.
      Parameters:
      legReceiver - The receiver leg.
      legPayer - The payer leg.
    • 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)
  • Method Details