Vanilla Option Related Functions
About 5 min
Vanilla Option Related Functions
Visit the Mathema Option Pricing System for foreign exchange options and structured product valuation!
Construction Functions
Excel: =McpVanillaOption(args1, args2, args3, args4, args5, fmt)
Python: McpVanillaOption(*args)
- Function: Constructs a
McpVanillaOptionobject. - Parameters:
args1~args5 or *args: Parameter groups, supporting the following three input methods:- Constructed via Market Data:
CallPut: Option type (enumeration value, e.g.,CallorPut).ReferenceDate: Trade date or valuation date.StrikePx: Strike price.SpotPx: Spot price.Volatility: Volatility.ExpiryDate: Expiry date.DeliveryDate: Delivery date.DomesticRate: Interest rate for currency 2.ForeignRate: Interest rate for currency 1.BuySell: Buy/sell direction (enumeration value, e.g.,BuyorSell).OptionExpiryNature: Option type (enumeration value).PricingMethod: Pricing model (enumeration value).Calendar: Holiday calendar object.DayCounter: Day count convention (enumeration value).PremiumDate: Premium payment date.NumSimulation: Number of simulations (for Monte Carlo).FaceAmount: Notional amount.
- Constructed via Volatility Surface:
CallPut: Option type (enumeration value).ReferenceDate: Trade date or valuation date.StrikePx: Strike price.SpotPx: Spot price.FaceAmount: Notional amount.ExpiryDate: Expiry date.DeliveryDate: Delivery date.PremiumDate: Premium payment date.BuySell: Buy/sell direction (enumeration value).OptionExpiryNature: Option type (enumeration value).PricingMethod: Pricing model (enumeration value).Calendar: Holiday calendar object.DayCounter: Day count convention (enumeration value).VolSurface: Volatility surface object.NumSimulation: Number of simulations (for Monte Carlo).DomesticRate: Interest rate curve object for currency 2.ForeignRate: Interest rate curve object for currency 1.
- Constructed via Volatility Surface (Simplified Version):
- Similar to the second method but omits some parameters.
- Constructed via Market Data:
fmt: Parameter format (default isVP),Excel-specific parameters.
- Returns:
McpVanillaOptionobject.
Usage Functions
Excel: =McpPrice(obj, isAmount=True)
Python: Price(*args)
- Function: Calculates the option premium.
- Parameters:
Obj:McpVanillaOptionobject.isAmount: Whether to calculate the amount (default isTrue).*args:is a dictionary, does not require the Obj parameter, other parameters are the same as those in Excel.
- Returns: Option premium.
Excel: =VoPrice(obj, isAmount=True, pricingMethod=None)
- Function: Calculates the pips value for currency 2.
- Parameters:
obj:McpVanillaOptionobject.isAmount: Whether to calculate the amount (default isTrue).pricingMethod: Pricing model (default isBlackScholes).
- Returns: Pips value for currency 2.
Excel: =McpDelta(obj, isCcy2=False, isAmount=True, pricingMethod=1, isClosedFormMethod=True)
Python: Delta(*args)
- Function: Calculates the Delta value of the option.
- Parameters:
obj:McpVanillaOptionobject.isCcy2: Whether it is for currency 2 (Truefor currency 2,Falseotherwise).isAmount: Whether to calculate the amount (default isTrue).pricingMethod: Pricing method (default is1).isClosedFormMethod: Whether to use the closed-form method for Greeks calculation (default isTrue). IfTrue, Greeks are calculated using the Black-Scholes model regardless of the selected pricing model; otherwise, the selected model is used.*args:is a dictionary, does not require the obj parameter, other parameters are the same as those in Excel.
- Returns: Delta.
Excel: =McpForwardDelta(obj, isCcy2=False, isAmount=True, pricingMethod=1, isClosedFormMethod=True)
Python: ForwardDelta(isCCY2=False, isAmount=True, npricingMethod=1, isClosedFormMethod=True)
- Function: Calculates the Forward Delta value of the option.
- Parameters:
obj:McpVanillaOptionobject,Python API does not require this parameter.isCcy2: Whether it is for currency 2 (Truefor currency 2,Falseotherwise).isAmount: Whether to calculate the amount (default isTrue).pricingMethod: Pricing method (default is1).isClosedFormMethod: Whether to use the closed-form method for Greeks calculation (default isTrue).
- Returns: Forward Delta.
Excel: =McpVega(obj, isCcy2=False, isAmount=True, pricingMethod=1, isClosedFormMethod=True)
Python: Vega(*args)
- Function: Calculates the Vega value of the option.
- Parameters:
obj:McpVanillaOptionobject.isCcy2: Whether it is for currency 2 (Truefor currency 2,Falseotherwise).isAmount: Whether to calculate the amount (default isTrue).pricingMethod: Pricing method (default is1).isClosedFormMethod: Whether to use the closed-form method for Greeks calculation (default isTrue).*args:is a dictionary, does not require the obj parameter, other parameters are the same as those in Excel.
- Returns: Vega.
Excel: =McpGamma(obj, isCcy2=False, isAmount=True, pricingMethod=1, isClosedFormMethod=True)
Python: Gamma(*args)
- Function: Calculates the Gamma value of the option.
- Parameters:
obj:McpVanillaOptionobject.isCcy2: Whether it is for currency 2 (Truefor currency 2,Falseotherwise).isAmount: Whether to calculate the amount (default isTrue).pricingMethod: Pricing method (default is1).isClosedFormMethod: Whether to use the closed-form method for Greeks calculation (default isTrue).*args:is a dictionary, does not require the obj parameter, other parameters are the same as those in Excel.
- Returns: Gamma.
Excel: =McpTheta(obj, isCcy2=False, isAmount=True, pricingMethod=1, isClosedFormMethod=True)
Python: Theta(*args)
- Function: Calculates the Theta value of the option.
- Parameters:
obj:McpVanillaOptionobject.isCcy2: Whether it is for currency 2 (Truefor currency 2,Falseotherwise).isAmount: Whether to calculate the amount (default isTrue).pricingMethod: Pricing method (default is1).isClosedFormMethod: Whether to use the closed-form method for Greeks calculation (default isTrue).*args:is a dictionary, does not require the obj parameter, other parameters are the same as those in Excel.
- Returns: Theta.
Excel: =McpVanna(obj, isCcy2=False, isAmount=True, pricingMethod=1, isClosedFormMethod=True)
Python: Vanna(isCCY2=False, isAmount=True, npricingMethod=1, isClosedFormMethod=True)
- Function: Calculates the Vanna value of the option.
- Parameters:
obj:McpVanillaOptionobject,Python API does not require this parameter.isCcy2: Whether it is for currency 2 (Truefor currency 2,Falseotherwise).isAmount: Whether to calculate the amount (default isTrue).pricingMethod: Pricing method (default is1).isClosedFormMethod: Whether to use the closed-form method for Greeks calculation (default isTrue).
- Returns: Vanna.
Excel: =McpVolga(obj, isCcy2=False, isAmount=True, pricingMethod=1, isClosedFormMethod=True)
Python: Volga(isCCY2=False, isAmount=True, npricingMethod=1, isClosedFormMethod=True)
- Function: Calculates the Volga value of the option.
- Parameters:
obj:McpVanillaOptionobject,Python API does not require this parameter.isCcy2: Whether it is for currency 2 (Truefor currency 2,Falseotherwise).isAmount: Whether to calculate the amount (default isTrue).pricingMethod: Pricing method (default is1).isClosedFormMethod: Whether to use the closed-form method for Greeks calculation (default isTrue).
- Returns: Volga.
Excel: =McpRho(obj, isCcy2=False, isAmount=True, pricingMethod=1, isClosedFormMethod=True)
Python: Rho(*args)
- Function: Calculates the Rho value of the option.
- Parameters:
obj:McpVanillaOptionobject.isCcy2: Whether it is for currency 2 (Truefor currency 2,Falseotherwise).isAmount: Whether to calculate the amount (default isTrue).pricingMethod: Pricing method (default is1).isClosedFormMethod: Whether to use the closed-form method for Greeks calculation (default isTrue).*args:is a dictionary, does not require the obj parameter, other parameters are the same as those in Excel.
- Returns: Rho.
Excel: =McpMarketValue(obj, isAmount=True)
Python: MarketValue(isAmount=True)
- Function: Calculates the market value.
- Parameters:
Obj:McpVanillaOptionobject,Python API does not require this parameter.isAmount: Whether to calculate the amount (default isTrue).
- Returns: Market value.
Excel: =McpPV(obj, isAmount=True)
Python: PV(isAmount=True)
- Function: Calculates the present value (PV).
- Parameters:
Obj:McpVanillaOptionobject,Python API does not require this parameter.isAmount: Whether to calculate the amount (default isTrue).
- Returns: Present value (PV).
Other Usage Functions
Excel: =Forward2ImpliedBaseRate(pair, forward, spot, termRate, spotDate, deliveryDate)
- Function: Calculates the implied base rate (CCY1).
- Parameters:
pair: Currency pair.forward: Forward price.spot: Spot price.termRate: Interest rate for CCY2.spotDate: Spot value date.deliveryDate: Delivery date.
- Returns: Implied base rate for CCY1.
Excel: =Forward2ImpliedTermRate(pair, forward, spot, baseRate, spotDate, deliveryDate)
- Function: Calculates the implied term rate (CCY2).
- Parameters:
pair: Currency pair.forward: Forward price.spot: Spot price.baseRate: Interest rate for CCY1.spotDate: Spot value date.deliveryDate: Delivery date.
- Returns: Implied term rate for CCY2.
Excel: =ImpliedForward(pair, baseRate, termRate, spot, spotDate, deliveryDate)
- Function: Calculates the implied forward price.
- Parameters:
pair: Currency pair.baseRate: Interest rate for CCY1.termRate: Interest rate for CCY2.spot: Spot price.spotDate: Spot value date.deliveryDate: Delivery date.
- Returns: Implied forward price.
Excel: =ImpliedFwdPoints(pair, baseRate, termRate, spot, spotDate, deliveryDate)
- Function: Calculates the implied forward points.
- Parameters:
pair: Currency pair.baseRate: Interest rate for CCY1.termRate: Interest rate for CCY2.spot: Spot price.spotDate: Spot value date.deliveryDate: Delivery date.
- Returns: Implied forward points.
Notes
- Parameter Format: The
fmtparameter specifies the parameter format, with a default value ofVP. - Enumeration Values: Some parameters (e.g.,
CallPut,BuySell) are enumeration values. Refer to specific definitions for details. - Default Values: Parameters not explicitly stated usually have default values, which can be adjusted as needed.
