Foreign Exchange Volatility Surface Related Functions
About 6 min
Foreign Exchange Volatility Surface Related Functions
Visit the Mathema Option Pricing System for foreign exchange options and structured product valuation!
Construction Functions
Excel: =McpFXVolSurface2(args1, args2, args3, args4, args5, fmt='VP')
Python: McpFXVolSurface2(*args)
- Function: Constructs a bilateral foreign exchange volatility surface (using bilateral interest rate and forward curves).
- Parameters:
args1~args5 or *args
: Parameter groups, supporting the following three input methods:- First Parameter Set:
ReferenceDate
: Trade date or valuation date.Tenors
: Array of tenors.DeltaStrings
: Array of delta types (e.g.,25RR
,25BF
,ATM
,25CALL
,25PUT
).BidVolatilities
: Bid-side volatilities.AskVolatilities
: Ask-side volatilities.FxForwardPointsCurve2
: Forward curve object.ForeignCurve2
: Interest rate curve object for currency 1.DomesticCurve2
: Interest rate curve object for currency 2.CalculatedTarget
: Calculation target (enumeration value).SmileInterpMethod
: Interpolation method (enumeration value).Calendar
: Holiday calendar object (default is empty).DateAdjusterRule
: Adjustment rule (enumeration value).DeltaType
: Delta type (enumeration value).PremiumAdjusted
: Whether to adjust for premium (default isTrue
).IsATMFwd
: Whether it is ATM forward (default isFalse
).SpotDate
: Spot value date (default is1901-01-01
).FXVolInterpType
: Volatility interpolation type (default isSPLINE_VOLATILITY
).DayCounter
: Day count convention.
- Second Parameter Set:
- Similar to the first set but adds
DeltaTypes
andAtmVolTypes
arrays.
- Similar to the first set but adds
- Third Parameter Set:
ReferenceDate
: Trade date or valuation date.FXVolSurface2_1
: Volatility surface object 1.FXVolSurface2_2
: Volatility surface object 2.Correlation
: Correlation coefficient.IsCur1Direct
: Whether currency pair 1 is a direct quote.IsCur2Direct
: Whether currency pair 2 is a direct quote.Calendar
: Holiday calendar object (default is empty).DateAdjusterRule
: Adjustment rule (enumeration value).CalculatedTarget
: Calculation target (enumeration value).SmileInterpMethod
: Interpolation method (enumeration value).UsingExternalForwardPointCurve
: Whether to use an external forward curve.ExternalForwardPointCurve2
: External forward curve object.DeltaType
: Delta type (enumeration value).PremiumAdjusted
: Whether to adjust for premium (default isTrue
).IsATMFwd
: Whether it is ATM forward (default isFalse
).SpotDate
: Spot value date (default is1901-01-01
).CrossFXSpot
: Whether to use cross-calculated spot rate (default isTrue
).BidFXSpotRate
: Bid-side spot rate (default is0
).AskFXSpotRate
: Ask-side spot rate (default is0
).SwapPointScaleFactor
: Swap point scaling factor (default is10000
).QuoteUnit
: Quote unit (default is1
).QuoteUnit1
: Quote unit for currency pair 1 (default is1
).QuoteUnit2
: Quote unit for currency pair 2 (default is1
).
- First Parameter Set:
fmt
: Parameter format (default isVP
),Excel-specific parameters.
- Returns: Bilateral foreign exchange volatility surface object.
Excel: =McpFXVolSurface(args1, args2, args3, args4, args5, fmt='DT|VP|HD')
Python: McpFXVolSurface(*args)
- Function: Constructs a unilateral foreign exchange volatility surface (using unilateral interest rate and forward curves).
- Parameters:
args1~args5 or *args
: Parameter groups, supporting the following five input methods:- First Parameter Set:
ReferenceDate
: Trade date or valuation date.spotPx
: Spot price.Tenors
: Array of tenors.DeltaStrings
: Array of delta types.Strikes
: Array of strike prices.Volatilities
: Array of volatilities.ForeignCurve
: Interest rate curve object for currency 1.DomesticCurve
: Interest rate curve object for currency 2.Calendar
: Holiday calendar object.DateAdjusterRule
: Adjustment rule (enumeration value).DeltaType
: Delta type (enumeration value).SmileInterpMethod
: Interpolation method (enumeration value).FxForwardPointsCurve
: Forward curve object.PremiumAdjusted
: Whether to adjust for premium (default isTrue
).IsATMFwd
: Whether it is ATM forward (default isFalse
).SpotDate
: Spot value date.CalculatedTarget
: Calculation target (default isCCY1
).
- Second Parameter Set:
- Similar to the first set but uses
MaturityDates
instead ofTenors
.
- Similar to the first set but uses
- Third Parameter Set:
- Similar to the first set but adds
FXVolInterpType
(default isSPLINE_VOLATILITY
).
- Similar to the first set but adds
- Fourth Parameter Set:
- Similar to the first set but adds
DeltaTypes
andAtmVolTypes
arrays.
- Similar to the first set but adds
- Fifth Parameter Set:
- Similar to the first set but adds
FXVolInterpType
andDeltaTypes
.
- Similar to the first set but adds
- First Parameter Set:
fmt
: Parameter format (default isDT|VP|HD
),Excel-specific parameters.
- Returns: Unilateral foreign exchange volatility surface object.
Foreign Exchange Usage Functions
Excel: =FXVolSurface2GetReferenceDate(vs)
Python: GetReferenceDate()
- Function: Retrieves the reference date from a bilateral volatility surface.
- Parameters:
vs
: Bilateral volatility surface object,Python API does not require this parameter.
- Returns: Reference date.
Excel: =FXVolSurfaceGetReferenceDate(vs)
Python: GetReferenceDate()
- Function: Retrieves the reference date from a unilateral volatility surface.
- Parameters:
vs
: Unilateral volatility surface object,Python API does not require this parameter.
- Returns: Reference date.
Excel: =FXVolSurface2GetSpotDate(vs)
Python: GetSpotDate()
- Function: Retrieves the spot date from a bilateral volatility surface.
- Parameters:
vs
: Bilateral volatility surface object,Python API does not require this parameter.
- Returns: Spot date.
Excel: =FXVolSurfaceGetSpotDate(vs)
Python: GetSpotDate()
- Function: Retrieves the spot date from a unilateral volatility surface.
- Parameters:
vs
: Unilateral volatility surface object,Python API does not require this parameter.
- Returns: Spot date.
Excel: =FXVolSurface2GetStrike(vs, deltaString, tenor, bidMidAsk)
Python: GetStrike(*args)
- Function: Retrieves the strike price for a specified delta, tenor, and direction from a bilateral volatility surface.
- Parameters:
vs
: Bilateral volatility surface object.deltaString
: Delta value.tenor
: Tenor.bidMidAsk
: Specifies the direction (bid
,mid
, orask
).*args
:is a dictionary, does not require the vs parameter, other parameters are the same as those in Excel.
- Returns: Strike price.
Excel: =FXVolSurfaceGetStrike(vs, deltaString, tenor)
Python: GetStrike(deltaString, tenor)
- Function: Retrieves the strike price for a specified delta and tenor from a unilateral volatility surface.
- Parameters:
vs
: Unilateral volatility surface object,Python API does not require this parameter.deltaString
: Delta value.tenor
: Tenor.
- Returns: Strike price.
Excel: =FXVolSurface2GetSpot(Vs, BidMidAsk)
Python: GetSpot(*args)
- Function: Retrieves the spot price for a specified direction from a bilateral volatility surface.
- Parameters:
Vs
: Bilateral volatility surface object.BidMidAsk
: Specifies the direction (bid
,mid
, orask
).*args
:is a dictionary, does not require the Vs parameter, other parameters are the same as those in Excel.
- Returns: Spot price for the specified direction.
Excel: =FXVolSurfaceGetSpot(Vs)
Python: GetSpot()
- Function: Retrieves the spot price from a unilateral volatility surface.
- Parameters:
Vs
: Unilateral volatility surface object,Python API does not require this parameter.
- Returns: Spot price.
Excel: =FXVolSurface2GetATMVol(vs, expiryDate, bidMidAsk)
Python: GetATMVol(*args)
- Function: Retrieves the ATM volatility for a specified expiry date and direction from a bilateral volatility surface.
- Parameters:
vs
: Bilateral volatility surface object.expiryDate
: Expiry date.bidMidAsk
: Specifies the direction (bid
,mid
, orask
).*args
:is a dictionary, does not require the vs parameter, other parameters are the same as those in Excel.
- Returns: ATM volatility for the specified direction.
Excel: =FXVolSurfaceGetATMVol(vs, expiryDate)
Python: GetATMVol(expiryDate)
- Function: Retrieves the ATM volatility for a specified expiry date from a unilateral volatility surface.
- Parameters:
vs
: Unilateral volatility surface object,Python API does not require this parameter.expiryDate
: Expiry date.
- Returns: ATM volatility.
Excel: =FXVolSurface2GetVolatility(vs, strike, expiryDate, bidMidAsk, midForward=0.0, bidInputDeltaVolPair='', askInputDeltaVolPair='')
Python: GetVolatility(*args)
- Function: Retrieves the volatility for a specified strike, expiry date, and direction from a bilateral volatility surface.
- Parameters:
vs
: Bilateral volatility surface object.strike
: Strike price.expiryDate
: Expiry date.bidMidAsk
: Specifies the direction (bid
,mid
, orask
).midForward
: Mid forward price.bidInputDeltaVolPair
: Bid-side delta value and corresponding implied volatility.askInputDeltaVolPair
: Ask-side delta value and corresponding implied volatility.*args
:is a dictionary, does not require the vs parameter, other parameters are the same as those in Excel.
- Returns: Volatility for the specified direction.
Excel: =FXVolSurfaceGetVolatility(vs, strike, expiryDate, forward=0.0, inputDeltaVolPair='')
Python: GetVolatility(*args)
- Function: Retrieves the volatility for a specified strike and expiry date from a unilateral volatility surface.
- Parameters:
vs
: Unilateral volatility surface object.strike
: Strike price.expiryDate
: Expiry date.forward
: Forward price.InputDeltaVolPair
: Delta value and corresponding implied volatility.*args
:is a dictionary, does not require the vs parameter, other parameters are the same as those in Excel.
- Returns: Volatility.
Excel: =FXVolSurface2GetForeignRate(vs, expiryOrDeliveryDate, isDeliveryDate, bidMidAsk)
Python: GetForeignRate(*args)
- Function: Retrieves the foreign currency rate for a specified expiry or delivery date and direction from a bilateral volatility surface.
- Parameters:
vs
: Bilateral volatility surface object.expiryOrDeliveryDate
: Expiry or delivery date.isDeliveryDate
: Boolean indicating whetherexpiryOrDeliveryDate
is a delivery date (true
for delivery date,false
for expiry date).bidMidAsk
: Specifies the direction (bid
,mid
, orask
).*args
:is a dictionary, does not require the vs parameter, other parameters are the same as those in Excel.
- Returns: Foreign currency rate.
Excel: =FXVolSurfaceGetForeignRate(vs, expiryOrDeliveryDate, isDeliveryDate)
Python: GetForeignRate(expiryOrDeliveryDate, isDeliveryDate=False)
- Function: Retrieves the foreign currency rate for a specified expiry or delivery date from a unilateral volatility surface.
- Parameters:
vs
: Unilateral volatility surface object,Python API does not require this parameter.expiryOrDeliveryDate
: Expiry or delivery date.isDeliveryDate
: Boolean indicating whetherexpiryOrDeliveryDate
is a delivery date (true
for delivery date,false
for expiry date).
- Returns: Foreign currency rate.
Excel: =FXVolSurface2GetDomesticRate(vs, expiryOrDeliveryDate, isDeliveryDate, bidMidAsk)
Python: GetDomesticRate(*args)
- Function: Retrieves the domestic currency rate for a specified expiry or delivery date and direction from a bilateral volatility surface.
- Parameters:
vs
: Bilateral volatility surface object.expiryOrDeliveryDate
: Expiry or delivery date.isDeliveryDate
: Boolean indicating whetherexpiryOrDeliveryDate
is a delivery date (true
for delivery date,false
for expiry date).bidMidAsk
: Specifies the direction (bid
,mid
, orask
).*args
:is a dictionary, does not require the vs parameter, other parameters are the same as those in Excel.
- Returns: Domestic currency rate.
Excel: =FXVolSurfaceGetDomesticRate(vs, expiryOrDeliveryDate, isDeliveryDate)
Python: GetDomesticRate(expiryOrDeliveryDate, isDeliveryDate=False)
- Function: Retrieves the domestic currency rate for a specified expiry or delivery date from a unilateral volatility surface.
- Parameters:
vs
: Unilateral volatility surface object,Python API does not require this parameter.expiryOrDeliveryDate
: Expiry or delivery date.isDeliveryDate
: Boolean indicating whetherexpiryOrDeliveryDate
is a delivery date (true
for delivery date,false
for expiry date).
- Returns: Domestic currency rate.
Excel: =FXVolSurface2GetForward(vs, expiryOrDeliveryDate, isDeliveryDate, bidMidAsk)
Python: GetForward(*args)
- Function: Retrieves the forward rate for a specified expiry or delivery date and direction from a bilateral volatility surface.
- Parameters:
vs
: Bilateral volatility surface object.expiryOrDeliveryDate
: Expiry or delivery date.isDeliveryDate
: Boolean indicating whetherexpiryOrDeliveryDate
is a delivery date (true
for delivery date,false
for expiry date).bidMidAsk
: Specifies the direction (bid
,mid
, orask
).*args
:is a dictionary, does not require the vs parameter, other parameters are the same as those in Excel.
- Returns: Forward rate.
Excel: =FXVolSurfaceGetForward(vs, expiryOrDeliveryDate, isDeliveryDate)
Python: GetForward(expiryOrDeliveryDate, isDeliveryDate=False)
- Function: Retrieves the forward rate for a specified expiry or delivery date from a unilateral volatility surface.
- Parameters:
vs
: Unilateral volatility surface object,Python API does not require this parameter.expiryOrDeliveryDate
: Expiry or delivery date.isDeliveryDate
: Boolean indicating whetherexpiryOrDeliveryDate
is a delivery date (true
for delivery date,false
for expiry date).
- Returns: Forward rate.
Excel: =FXVolSurface2GetForwardPoint(vs, expiryOrDeliveryDate, isDeliveryDate, bidMidAsk)
Python: GetForwardPoint(*args)
- Function: Retrieves the forward points for a specified expiry or delivery date and direction from a bilateral volatility surface.
- Parameters:
vs
: Bilateral volatility surface object.expiryOrDeliveryDate
: Expiry or delivery date.isDeliveryDate
: Boolean indicating whetherexpiryOrDeliveryDate
is a delivery date (true
for delivery date,false
for expiry date).bidMidAsk
: Specifies the direction (bid
,mid
, orask
).*args
:is a dictionary, does not require the vs parameter, other parameters are the same as those in Excel
- Returns: Forward points.
Excel: =FXVolSurfaceGetForwardPoint(vs, expiryOrDeliveryDate, isDeliveryDate)
Python: GetForwardPoint(expiryOrDeliveryDate, isDeliveryDate)
- Function: Retrieves the forward points for a specified expiry or delivery date from a unilateral volatility surface.
- Parameters:
vs
: Unilateral volatility surface object,Python API does not require this parameter..expiryOrDeliveryDate
: Expiry or delivery date.isDeliveryDate
: Boolean indicating whetherexpiryOrDeliveryDate
is a delivery date (true
for delivery date,false
for expiry date).
- Returns: Forward points.