org.jquantlib.instruments
Class VanillaSwap
- java.lang.Object
-
- org.jquantlib.util.LazyObject
-
- org.jquantlib.instruments.Instrument
-
- org.jquantlib.instruments.Swap
-
- org.jquantlib.instruments.VanillaSwap
-
- All Implemented Interfaces:
- Observable, Observer
public class VanillaSwap extends Swap
Plain-vanilla swap
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interfaceVanillaSwap.ArgumentsclassVanillaSwap.ArgumentsImplArguments for simple swap calculationstatic interfaceVanillaSwap.ResultsclassVanillaSwap.ResultsImplResults from simple swap calculationstatic classVanillaSwap.Type-
Nested classes/interfaces inherited from class org.jquantlib.instruments.Swap
Swap.EngineImpl
-
-
Constructor Summary
Constructors Constructor and Description VanillaSwap(VanillaSwap.Type type, double nominal, Schedule fixedSchedule, double fixedRate, DayCounter fixedDayCount, Schedule floatSchedule, IborIndex iborIndex, double spread, DayCounter floatingDayCount)VanillaSwap(VanillaSwap.Type type, double nominal, Schedule fixedSchedule, double fixedRate, DayCounter fixedDayCount, Schedule floatSchedule, IborIndex iborIndex, double spread, DayCounter floatingDayCount, BusinessDayConvention paymentConvention)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublefairRate()doublefairSpread()voidfetchResults(PricingEngine.Results results)Obtains theInstrument.Resultspopulated by aPricingEngine.LegfixedLeg()doublefixedLegBPS()doublefixedLegNPV()LegfloatingLeg()doublefloatingLegBPS()doublefloatingLegNPV()voidsetupArguments(PricingEngine.Arguments arguments)Passes arguments to be used by aPricingEngine.voidsetupExpired()This method must leave the instrument in a consistent state when the expiration condition is met.java.lang.StringtoString()-
Methods inherited from class org.jquantlib.instruments.Swap
isExpired, maturityDate, startDate
-
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
-
VanillaSwap
public VanillaSwap(VanillaSwap.Type type, double nominal, Schedule fixedSchedule, double fixedRate, DayCounter fixedDayCount, Schedule floatSchedule, IborIndex iborIndex, double spread, DayCounter floatingDayCount)
-
VanillaSwap
public VanillaSwap(VanillaSwap.Type type, double nominal, Schedule fixedSchedule, double fixedRate, DayCounter fixedDayCount, Schedule floatSchedule, IborIndex iborIndex, double spread, DayCounter floatingDayCount, BusinessDayConvention paymentConvention)
-
-
Method Detail
-
fairRate
public double fairRate()
-
fairSpread
public double fairSpread()
-
fixedLeg
public final Leg fixedLeg()
-
floatingLeg
public final Leg floatingLeg()
-
fixedLegBPS
public double fixedLegBPS()
-
floatingLegBPS
public double floatingLegBPS()
-
fixedLegNPV
public double fixedLegNPV()
-
floatingLegNPV
public double floatingLegNPV()
-
setupExpired
public void setupExpired()
Description copied from class:InstrumentThis method must leave the instrument in a consistent state when the expiration condition is met.
-
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.- Overrides:
setupArgumentsin classSwap- 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.- Overrides:
fetchResultsin classSwap- See Also:
Instrument.Results,PricingEngine
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG