BlackVarianceSurface¶
- class BlackVarianceSurface(Date reference_date, Calendar cal, list dates, vector[Real] strikes, Matrix black_vol_matrix, DayCounter dc, Extrapolation lower_extrap=Extrapolation.InterpolatorDefaultExtrapolation, Extrapolation upper_extrap=Extrapolation.InterpolatorDefaultExtrapolation)¶
Bases:
BlackVarianceTermStructureBlack volatility surface modelled as variance surface
This class calculates time/strike dependent Black volatilities using as input a matrix of Black volatilities observed in the market.
The calculation is performed interpolating on the variance surface. Bilinear interpolation is used as default; this can be changed by the set_interpolation method.
- Parameters:
- reference_dateDate
- calCalendar
- dateslist of Date
- strikeslist of floats
- black_vol_matrixMatrix
- dcDayCounter
- lower_extrapExtrapolation
- upper_extrapExtrapolation
- Attributes:
calendarCalendar: calendarday_counterDayCounter: day counter- extrapolation
max_dateDate: the latest date for which the curve can return values- max_strike
max_timeTime: the latest time for which the curve can return values- min_strike
reference_dateDate: the date at which discount = 1.0 and/or variance = 0.0settlement_daysint: number of settlement days used for reference date calculation
Methods
blackForwardVariance(self, time_1, time_2, ...)forward (at-the-money) variance
blackForwardVol(self, time_1, time_2, ...)forward (at-the-money) volatility
blackVariance(self, maturity, Real strike, ...)spot variance
blackVol(self, maturity, Real strike, ...)spot volatility
option_date_from_tenor(self, Period period)set_interpolation(self, Interpolation i)time_from_reference(self, Date dt)date/time conversion