Equity/Commodity Volatility Surface Related Functions
About 2 min
Equity/Commodity Volatility Surface Related Functions
Visit the Mathema Option Pricing System for foreign exchange options and structured product valuation!
Constructor Functions
Excel: =McpVolSurface2(args1, args2, args3, args4, args5, fmt='VP')
Python: McpVolSurface2(*args)
- Function: Constructs a commodity volatility surface.
- Parameters:
args1~args5 or *args
: Parameter groups, supporting the following parameter passing methods:- Equity Product Parameters:
ReferenceDate
: Trading or valuation date.BidSpot
: Bid-side spot price.AskSpot
: Ask-side spot price.ExpiryDates
: Array of expiry dates.BidStrikes
: Array of bid-side strike prices.BidOptionTypes
: Array of bid-side option types.BidPremiums
: Array of bid-side option premiums.AskStrikes
: Array of ask-side strike prices.AskOptionTypes
: Array of ask-side option types.AskPremiums
: Array of ask-side option premiums.RiskFreeRateCurve2
: Risk-free rate curve object.Dividend
: Dividend.SmileInterp
: Interpolation method (enumeration value).Calendar
: Holiday calendar object.DateAdjusterRule
: Adjustment rule (defaultModifiedFollowing
).BidImpVols
: Array of bid-side implied volatilities.AskImpVols
: Array of ask-side implied volatilities.SpotDate
: Value date.MiniStrikeSize
: Minimum strike size (default: strikes smaller than this value are not calculated).
- Futures Product Parameters:
- Similar to equity products, but with the addition of a
ForwardCurve2
object.
- Similar to equity products, but with the addition of a
- Equity Product Parameters:
fmt
: Parameter format (defaultVP
),Excel-specific parameters.
- Returns: Commodity volatility surface object.
Equity/Commodity Utility Functions
Excel: =VolSurface2GetSpot(Vs, BidMidAsk)
Python: GetSpot(bidMidAsk)
- Function: Retrieves the spot price for the specified direction from a two-sided commodity volatility surface.
- Parameters:
Vs
: Two-sided commodity volatility surface object,Python API does not require this parameter.BidMidAsk
: Specified direction (bid
,mid
, orask
).
- Returns: Spot price for the specified direction.
Excel: =VolSurfaceGetSpot(Vs)
- Function: Retrieves the spot price from a one-sided commodity volatility surface.
- Parameters:
Vs
: One-sided commodity volatility surface object.
- Returns: Spot price.
Excel: =VolSurface2GetATMVol(vs, expiryDate, bidMidAsk)
- Function: Retrieves the ATM volatility for the specified expiry date and direction from a two-sided commodity volatility surface.
- Parameters:
vs
: Two-sided commodity volatility surface object.expiryDate
: Expiry date.bidMidAsk
: Specified direction (bid
,mid
, orask
).
- Returns: ATM volatility for the specified direction.
Excel: =VolSurfaceGetATMVol(vs, expiryDate)
- Function: Retrieves the ATM volatility for the specified expiry date from a one-sided commodity volatility surface.
- Parameters:
vs
: One-sided commodity volatility surface object.expiryDate
: Expiry date.
- Returns: ATM volatility.
Excel: =VolSurface2GetVolatility(vs, strike, maturityDate, bidMidAsk, midForward)
- Function: Retrieves the volatility for the specified expiry date and direction from a two-sided commodity volatility surface.
- Parameters:
vs
: Two-sided commodity volatility surface object.strike
: Strike price.maturityDate
: Maturity date.bidMidAsk
: Specified direction (bid
,mid
, orask
).midForward
: Mid forward price.
- Returns: Volatility for the specified direction.
Excel: =VolSurfaceGetVolatility(vs, strike, expiryDate, forward)
- Function: Retrieves the volatility for the specified expiry date from a one-sided commodity volatility surface.
- Parameters:
vs
: One-sided commodity volatility surface object.strike
: Strike price.expiryDate
: Expiry date.forward
: Forward price.
- Returns: Volatility.
Excel: =VolSurface2ExpiryDates(vs, bidMidAsk, fmt='V')
- Function: Retrieves the expiry dates for the specified direction from a volatility surface.
- Parameters:
vs
: Volatility surface.bidMidAsk
: Specified direction (bid
,mid
, orask
).fmt
: Parameter format (defaultV
).
- Returns: Array of expiry dates.
Excel: =VolSurface2GetReferenceDate(vs)
- Function: Retrieves the reference date from a volatility surface.
- Parameters:
vs
: Volatility surface.
- Returns: Reference date.
Excel: =VolSurface2GetSpotDate(vs)
- Function: Retrieves the spot date from a volatility surface.
- Parameters:
vs
: Volatility surface.
- Returns: Spot date.
Excel: =VolSurface2GetForward(vs, expiryOrDeliveryDate, isDeliveryDate, bidMidAsk)
- Function: Retrieves the forward price for the specified expiry or delivery date and direction from a volatility surface.
- Parameters:
vs
: Volatility surface.expiryOrDeliveryDate
: Expiry or delivery date.isDeliveryDate
: Boolean indicating whetherexpiryOrDeliveryDate
is a delivery date (true
) or expiry date (false
).bidMidAsk
: Specified direction (bid
,mid
, orask
).
- Returns: Forward price.
Excel: =VolSurface2Strikes(vs, bidMidAsk, fmt='V')
- Function: Retrieves the strike prices for the specified direction from a volatility surface.
- Parameters:
vs
: Volatility surface.bidMidAsk
: Specified direction (bid
,mid
, orask
).fmt
: Parameter format (defaultV
).
- Returns: Array of strike prices.
Notes
- Parameter Format: The
fmt
parameter specifies the parameter format, with a default value ofVP
orDT|VP|HD
. - Enumeration Values: Some parameters (e.g.,
SmileInterpMethod
,DeltaType
) are enumeration values and should refer to specific definitions. - Default Values: Parameters not explicitly stated usually have default values and can be adjusted as needed.