org.jquantlib.model.shortrate.calibrationhelpers
Class CapHelper
- java.lang.Object
-
- org.jquantlib.model.CalibrationHelper
-
- org.jquantlib.model.shortrate.calibrationhelpers.CapHelper
-
- All Implemented Interfaces:
- Observable, Observer
public class CapHelper extends CalibrationHelper
-
-
Constructor Summary
Constructors Constructor and Description CapHelper(Period length, Handle<Quote> volatility, IborIndex index, Frequency fixedLegFrequency, DayCounter fixedLegDayCounter, boolean includeFirstSwaplet, Handle<YieldTermStructure> termStructure)CapHelper(Period length, Handle<Quote> volatility, IborIndex index, Frequency fixedLegFrequency, DayCounter fixedLegDayCounter, boolean includeFirstSwaplet, Handle<YieldTermStructure> termStructure, boolean calibrateVolatility)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddObserver(Observer observer)Attaches a observer to the Observable.voidaddTimesTo(java.util.ArrayList<Time> times)doubleblackPrice(double volatility)intcountObservers()Counts how many Observers were attached to this class.voiddeleteObserver(Observer observer)Detaches a previously attached observer to the observable.voiddeleteObservers()Detaches all previously attached observer to the observable.java.util.List<Observer>getObservers()Returns list of observers registered with the Observable.doublemodelValue()voidnotifyObservers()Notifies all attached observers about changes in the observable.voidnotifyObservers(java.lang.Object arg)Notifies all attached observers about changes in the observable.voidupdate()This method is called whenever the observed object is changed.-
Methods inherited from class org.jquantlib.model.CalibrationHelper
calibrationError, impliedVolatility, setPricingEngine
-
-
-
-
Constructor Detail
-
CapHelper
public CapHelper(Period length, Handle<Quote> volatility, IborIndex index, Frequency fixedLegFrequency, DayCounter fixedLegDayCounter, boolean includeFirstSwaplet, Handle<YieldTermStructure> termStructure)
-
CapHelper
public CapHelper(Period length, Handle<Quote> volatility, IborIndex index, Frequency fixedLegFrequency, DayCounter fixedLegDayCounter, boolean includeFirstSwaplet, Handle<YieldTermStructure> termStructure, boolean calibrateVolatility)
-
-
Method Detail
-
addTimesTo
public void addTimesTo(java.util.ArrayList<Time> times)
- Specified by:
addTimesToin classCalibrationHelper
-
blackPrice
public double blackPrice(double volatility)
- Specified by:
blackPricein classCalibrationHelper
-
modelValue
public double modelValue()
- Specified by:
modelValuein classCalibrationHelper
-
update
public void update()
Description copied from interface:ObserverThis method is called whenever the observed object is changed.- Specified by:
updatein interfaceObserver- Overrides:
updatein classCalibrationHelper
-
addObserver
public void addObserver(Observer observer)
Description copied from interface:ObservableAttaches a observer to the Observable. After attachment the observer gets informed about changes in the Observable.- Specified by:
addObserverin interfaceObservable- Overrides:
addObserverin classCalibrationHelper- Parameters:
observer- The observer to attach to the observable
-
countObservers
public int countObservers()
Description copied from interface:ObservableCounts how many Observers were attached to this class.- Specified by:
countObserversin interfaceObservable- Overrides:
countObserversin classCalibrationHelper- Returns:
- the number of Observers
- See Also:
Observer
-
deleteObserver
public void deleteObserver(Observer observer)
Description copied from interface:ObservableDetaches a previously attached observer to the observable. After detachment the observer does no longer receive change notifications from the observable.- Specified by:
deleteObserverin interfaceObservable- Overrides:
deleteObserverin classCalibrationHelper- Parameters:
observer- The observer to detach from the observable
-
deleteObservers
public void deleteObservers()
Description copied from interface:ObservableDetaches all previously attached observer to the observable. After detachment observers do not longer receive change notifications from the observable.- Specified by:
deleteObserversin interfaceObservable- Overrides:
deleteObserversin classCalibrationHelper
-
getObservers
public java.util.List<Observer> getObservers()
Description copied from interface:ObservableReturns list of observers registered with the Observable. List returned is unmodifiable list.- Specified by:
getObserversin interfaceObservable- Overrides:
getObserversin classCalibrationHelper- Returns:
- list of observers
-
notifyObservers
public void notifyObservers()
Description copied from interface:ObservableNotifies all attached observers about changes in the observable.- Specified by:
notifyObserversin interfaceObservable- Overrides:
notifyObserversin classCalibrationHelper
-
notifyObservers
public void notifyObservers(java.lang.Object arg)
Description copied from interface:ObservableNotifies all attached observers about changes in the observable.- Specified by:
notifyObserversin interfaceObservable- Overrides:
notifyObserversin classCalibrationHelper- Parameters:
arg- an arbitrary Object to be passed to the Observer
-
-
DataMelt 3.0 © DataMelt by jWork.ORG