org.jquantlib.instruments
Class Swap
- java.lang.Object
-
- org.jquantlib.util.LazyObject
-
- org.jquantlib.instruments.Instrument
-
- org.jquantlib.instruments.Swap
-
- All Implemented Interfaces:
- Observable, Observer
- Direct Known Subclasses:
- BMASwap, VanillaSwap
public class Swap extends Instrument
Interest rate swapThe cash flows belonging to the first leg are paid; the ones belonging to the second leg are received.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interfaceSwap.ArgumentsBasic swap argumentsstatic classSwap.ArgumentsImplstatic classSwap.EngineImplstatic interfaceSwap.ResultsBasic swap resultsstatic classSwap.ResultsImpl
-
Constructor Summary
Constructors Constructor and Description Swap(Leg firstLeg, Leg secondLeg)Swap(java.util.List<Leg> legs, boolean[] payer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidfetchResults(PricingEngine.Results results)Obtains theInstrument.Resultspopulated by aPricingEngine.booleanisExpired()DatematurityDate()voidsetupArguments(PricingEngine.Arguments arguments)Passes arguments to be used by aPricingEngine.DatestartDate()-
Methods inherited from class org.jquantlib.instruments.Instrument
errorEstimate, NPV, setPricingEngine
-
Methods inherited from class org.jquantlib.util.LazyObject
addObserver, countObservers, deleteObserver, deleteObservers, freeze, getObservers, notifyObservers, notifyObservers, recalculate, unfreeze, update
-
-
-
-
Constructor Detail
-
Swap
public Swap(java.util.List<Leg> legs, boolean[] payer)
-
-
Method Detail
-
startDate
public Date startDate()
-
maturityDate
public Date maturityDate()
-
isExpired
public boolean isExpired()
- Specified by:
isExpiredin classInstrument- Returns:
trueif the instrument is still tradeable.
-
setupArguments
public void setupArguments(PricingEngine.Arguments arguments)
Description copied from class:InstrumentPasses arguments to be used by aPricingEngine. When a derived argument structure is defined for an instrument, this method should be overridden to fill it.- See Also:
Instrument.Arguments,PricingEngine
-
fetchResults
public void fetchResults(PricingEngine.Results results)
Description copied from class:InstrumentObtains theInstrument.Resultspopulated by aPricingEngine. When a derived result structure is defined for an instrument, this method should be overridden to read from it.- See Also:
Instrument.Results,PricingEngine
-
-
DataMelt 3.0 © DataMelt by jWork.ORG