Class BlackVolTermStructure
- java.lang.Object
-
- org.jquantlib.termstructures.AbstractTermStructure
-
- org.jquantlib.termstructures.volatilities.VolatilityTermStructure
-
- org.jquantlib.termstructures.BlackVolTermStructure
-
- All Implemented Interfaces:
- Extrapolator, TermStructure, Observable, Observer, PolymorphicVisitable
- Direct Known Subclasses:
- BlackVarianceTermStructure, BlackVolatilityTermStructure
public abstract class BlackVolTermStructure extends VolatilityTermStructure implements PolymorphicVisitable
Black-volatility term structureThis abstract class defines the interface of concrete Black-volatility term structures which will be derived from this one.
Volatilities are assumed to be expressed on an annual basis.
-
-
Constructor Summary
Constructors Constructor and Description BlackVolTermStructure()'default' constructorBlackVolTermStructure(Calendar cal)'default' constructorBlackVolTermStructure(Calendar cal, BusinessDayConvention bdc)'default' constructorBlackVolTermStructure(Calendar cal, BusinessDayConvention bdc, DayCounter dc)'default' constructorBlackVolTermStructure(Date referenceDate)initialize with a fixed reference dateBlackVolTermStructure(Date referenceDate, Calendar cal)initialize with a fixed reference dateBlackVolTermStructure(Date referenceDate, Calendar cal, BusinessDayConvention bdc)initialize with a fixed reference dateBlackVolTermStructure(Date referenceDate, Calendar cal, BusinessDayConvention bdc, DayCounter dc)initialize with a fixed reference dateBlackVolTermStructure(int settlementDays, Calendar cal)calculate the reference date based on the global evaluation dateBlackVolTermStructure(int settlementDays, Calendar cal, BusinessDayConvention bdc)calculate the reference date based on the global evaluation dateBlackVolTermStructure(int settlementDays, Calendar cal, BusinessDayConvention bdc, DayCounter dc)calculate the reference date based on the global evaluation date
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description voidaccept(PolymorphicVisitor pv)This method is intended to extend the semantics of methodVisitable.accept(Visitor)doubleblackForwardVariance(Date date1, Date date2, double strike, boolean extrapolate)Future (a.k.a.doubleblackForwardVariance(double time1, double time2, double strike, boolean extrapolate)Future (a.k.a.doubleblackForwardVol(Date date1, Date date2, double strike, boolean extrapolate)Future (a.k.a.doubleblackForwardVol(double time1, double time2, double strike, boolean extrapolate)Future (a.k.a.doubleblackVariance(Date maturity, double strike)Present (a.k.a spot) variancedoubleblackVariance(Date maturity, double strike, boolean extrapolate)Present (a.k.a spot) variancedoubleblackVariance(double maturity, double strike)Present (a.k.a spot) variancedoubleblackVariance(double maturity, double strike, boolean extrapolate)Present (a.k.a spot) variancedoubleblackVol(Date maturity, double strike)Present (a.k.a spot) volatilitydoubleblackVol(Date maturity, double strike, boolean extrapolate)Present (a.k.a spot) volatilitydoubleblackVol(double maturity, double strike)Present (a.k.a spot) volatilitydoubleblackVol(double maturity, double strike, boolean extrapolate)Present (a.k.a spot) volatilityabstract doublemaxStrike()The maximum strike for which the term structure can return volsabstract doubleminStrike()The minimum strike for which the term structure can return vols-
Methods inherited from class org.jquantlib.termstructures.volatilities.VolatilityTermStructure
businessDayConvention, optionDateFromTenor
-
Methods inherited from class org.jquantlib.termstructures.AbstractTermStructure
addObserver, allowsExtrapolation, calendar, countObservers, dayCounter, deleteObserver, deleteObservers, disableExtrapolation, enableExtrapolation, getObservers, maxTime, notifyObservers, notifyObservers, referenceDate, settlementDays, timeFromReference, update
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jquantlib.termstructures.TermStructure
maxDate
-
-
-
-
Constructor Detail
-
BlackVolTermStructure
public BlackVolTermStructure()
'default' constructor
-
BlackVolTermStructure
public BlackVolTermStructure(Calendar cal)
'default' constructor
-
BlackVolTermStructure
public BlackVolTermStructure(Calendar cal, BusinessDayConvention bdc)
'default' constructor
-
BlackVolTermStructure
public BlackVolTermStructure(Calendar cal, BusinessDayConvention bdc, DayCounter dc)
'default' constructor
-
BlackVolTermStructure
public BlackVolTermStructure(Date referenceDate)
initialize with a fixed reference date
-
BlackVolTermStructure
public BlackVolTermStructure(Date referenceDate, Calendar cal)
initialize with a fixed reference date
-
BlackVolTermStructure
public BlackVolTermStructure(Date referenceDate, Calendar cal, BusinessDayConvention bdc)
initialize with a fixed reference date
-
BlackVolTermStructure
public BlackVolTermStructure(Date referenceDate, Calendar cal, BusinessDayConvention bdc, DayCounter dc)
initialize with a fixed reference date
-
BlackVolTermStructure
public BlackVolTermStructure(int settlementDays, Calendar cal)calculate the reference date based on the global evaluation date
-
BlackVolTermStructure
public BlackVolTermStructure(int settlementDays, Calendar cal, BusinessDayConvention bdc)calculate the reference date based on the global evaluation date
-
BlackVolTermStructure
public BlackVolTermStructure(int settlementDays, Calendar cal, BusinessDayConvention bdc, DayCounter dc)calculate the reference date based on the global evaluation date
-
-
Method Detail
-
minStrike
public abstract double minStrike()
The minimum strike for which the term structure can return vols- Specified by:
minStrikein classVolatilityTermStructure
-
maxStrike
public abstract double maxStrike()
The maximum strike for which the term structure can return vols- Specified by:
maxStrikein classVolatilityTermStructure
-
blackVol
public final double blackVol(Date maturity, double strike)
Present (a.k.a spot) volatility
-
blackVol
public final double blackVol(Date maturity, double strike, boolean extrapolate)
Present (a.k.a spot) volatility
-
blackVol
public final double blackVol(double maturity, double strike)Present (a.k.a spot) volatility
-
blackVol
public final double blackVol(double maturity, double strike, boolean extrapolate)Present (a.k.a spot) volatility
-
blackVariance
public final double blackVariance(Date maturity, double strike)
Present (a.k.a spot) variance
-
blackVariance
public final double blackVariance(Date maturity, double strike, boolean extrapolate)
Present (a.k.a spot) variance
-
blackVariance
public final double blackVariance(double maturity, double strike)Present (a.k.a spot) variance
-
blackVariance
public final double blackVariance(double maturity, double strike, boolean extrapolate)Present (a.k.a spot) variance
-
blackForwardVol
public final double blackForwardVol(Date date1, Date date2, double strike, boolean extrapolate)
Future (a.k.a. forward) volatility- Parameters:
date1-date2-strike-extrapolate-- Returns:
-
blackForwardVol
public final double blackForwardVol(double time1, double time2, double strike, boolean extrapolate)Future (a.k.a. forward) volatility- Parameters:
time1-time2-strike-extrapolate-- Returns:
-
blackForwardVariance
public final double blackForwardVariance(Date date1, Date date2, double strike, boolean extrapolate)
Future (a.k.a. forward) variance- Parameters:
date1-date2-strike-extrapolate-- Returns:
-
blackForwardVariance
public final double blackForwardVariance(double time1, double time2, double strike, boolean extrapolate)Future (a.k.a. forward) variance- Parameters:
time1-time2-strike-extrapolate-- Returns:
-
accept
public void accept(PolymorphicVisitor pv)
Description copied from interface:PolymorphicVisitableThis method is intended to extend the semantics of methodVisitable.accept(Visitor)In a conventional Visitor design pattern, the
acceptmethod is called when access to visit a data structure is requested. AVisitorobject is passed as argument in case permission is granted to thatVisitorto access the data structure. Obviously,Visitors andVisitables work in pairs and the class which provides the data structure to be visited also implementsVisitablein order to properly grant access when the expectedVisitoris received.In the case of a
PolymorphicVisitable, aPolymorphicVisitoris passed instead of aVisitor. APolymorphicVisitoris in fact, a composition ofVisitors and not only a singleVisitor. APolymorphicVisitoris responsible for returning the correctVisitorresponsible for processing a certain data structure.The initial design of pairs made of <
Visitor,Visitable> is extended to a concept of a matrix made of multipleVisitors against multipleVisitables. Every class which implementsPolymorphicVisitablepasses different data structures when queryingPolymorphicVisitors.- Specified by:
acceptin interfacePolymorphicVisitable- See Also:
PolymorphicVisitor#getVisitor(Class)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG