org.jquantlib.instruments
Class Instrument
- java.lang.Object
-
- org.jquantlib.util.LazyObject
-
- org.jquantlib.instruments.Instrument
-
- All Implemented Interfaces:
- Observable, Observer
public abstract class Instrument extends LazyObject
This is an abstractInstrumentclass which is able to use aPricingEngineimplemented internally or externally to it.- See Also:
PricingEngine, QuantLib: Financial Instruments
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interfaceInstrument.Argumentsbasic instrument argumentsstatic interfaceInstrument.ResultsResults from instrument calculationstatic classInstrument.ResultsImplResults are used byPricingEngines in order to store results of calculations relative to new-styleInstruments
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description doubleerrorEstimate()returns the error estimate on the NPV when available.abstract booleanisExpired()doubleNPV()returns the net present value of the instrument.voidsetPricingEngine(PricingEngine engine)This method defines an externalPricingEngineto be used for a new-styleInstrument.-
Methods inherited from class org.jquantlib.util.LazyObject
addObserver, countObservers, deleteObserver, deleteObservers, freeze, getObservers, notifyObservers, notifyObservers, recalculate, unfreeze, update
-
-
-
-
Method Detail
-
isExpired
public abstract boolean isExpired()
- Returns:
trueif the instrument is still tradeable.
-
setPricingEngine
public final void setPricingEngine(PricingEngine engine)
This method defines an externalPricingEngineto be used for a new-styleInstrument.- Parameters:
engine- is the externalPricingEngineto be used- See Also:
PricingEngine
-
NPV
public final double NPV()
returns the net present value of the instrument.
-
errorEstimate
public final double errorEstimate()
returns the error estimate on the NPV when available.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG