Foreign Exchange Forward Curve Related Functions
About 4 min
Foreign Exchange Forward Curve Related Functions
Visit the Mathema Option Pricing System for foreign exchange options and structured product valuation!
Construction Functions
Excel: =McpFXForwardPointsCurve2(args1, args2, args3, args4, args5, fmt="VP")
Python: McpFXForwardPointsCurve2(*args)
- Function: Constructs a bilateral foreign exchange forward curve.
- Parameters:
args1~args5 or *args: Parameter groups, supporting the following four input methods:- First Parameter Set:
ReferenceDate: Trade date.BidFXSpotRate: Bid-side spot rate.BidForwardPoints: Array of bid-side forward points.AskFXSpotRate: Ask-side spot rate.AskForwardPoints: Array of ask-side forward points.Tenors: Array of tenors.Method: Interpolation method (default isLINEARINTERPOLATION).Calendar: Holiday calendar object (default is empty).Pair: Currency pair (default isUSD/CNY).
- Second Parameter Set:
- Similar to the first set but adds
ScaleFactor(default is10000) andQuoteUnit(default is1).
- Similar to the first set but adds
- Third Parameter Set:
ReferenceDate: Trade date.BidSpot: Bid-side spot rate.AskSpot: Ask-side spot rate.ForeignCurve2: Interest rate curve object for Ccy1.DomesticCurve2: Interest rate curve object for Ccy2.Calendar: Holiday calendar object (default is empty).ScaleFactor: Default is10000.QuoteUnit: Quote unit (default is1).
- Fourth Parameter Set:
ReferenceDate: Trade date.FxForwardPointsCurve2_1: Forward curve object for currency pair 1.FxForwardPointsCurve2_2: Forward curve object for currency pair 2.IsCur1Direct: Whether currency pair 1 is a direct quote.IsCur2Direct: Whether currency pair 2 is a direct quote.BidFXSpotRate: Bid-side spot rate.AskFXSpotRate: Ask-side spot rate.CrossFXSpot: Whether to use the cross-calculated spot rate.Calendar: Holiday calendar object (default is empty).SpotDate: Value date.ScaleFactor: 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 forward curve object.
Server-side functions
Excel: =McpFXForwardPointsCurves2(identifiers, refdate)
- Function: Constructs a bilateral forward curve object using the forward curve identifier.
- Parameters:
identifiers: Forward curve identifier.refdate: Pricing date.
- Returns: A bilateral forward curve object for subsequent calculations.
Excel: =McpFXForwardPointsCurve(args1, args2, args3, args4, args5, fmt="VP")
Python: McpFXForwardPointsCurve(\*args)
- Function: Constructs a unilateral foreign exchange forward curve.
- Parameters:
args1~args5 or *args: Parameter groups, supporting the following three input methods:- First Parameter Set:
ReferenceDate: Trade date.Tenors: Array of tenors.FXForwardPoints: Array of forward points.FXSpotRate: Spot rate.Method: Interpolation method (default isLINEARINTERPOLATION).Calendar: Holiday calendar object (default is empty).ScaleFactor: Scaling factor.
- Second Parameter Set:
ReferenceDate: Trade date.FXOutright: Array of forward outright prices.Tenors: Array of tenors.Method: Interpolation method (default isLINEARINTERPOLATION).Calendar: Holiday calendar object (default is empty).FXSpotRate: Spot rate.ScaleFactor: Scaling factor.
- Third Parameter Set:
ReferenceDate: Trade date.Tenors: Array of tenors.FXForwardPoints: Array of forward points.FXSpotRate: Spot rate.Method: Interpolation method (default isLINEARINTERPOLATION).Calendar: Holiday calendar object (default is empty).Pair: Currency pair.
- First Parameter Set:
fmt: Parameter format (default isVP),Excel-specific parameters.
- Returns: Unilateral foreign exchange forward curve object.
Foreign Exchange Usage Functions
Excel: =Fxfpc2FXForwardPoints(Curve, Date, BidMidAsk)
Python: FXForwardPoints(*args)
- Function: Retrieves the forward points for a specified date from a bilateral foreign exchange forward curve.
- Parameters:
Curve: Bilateral foreign exchange forward curve object.Date: Target date.BidMidAsk: Specifies the direction (bid,mid, orask).*args:is a dictionary, does not require the Curve parameter, other parameters are the same as those in Excel.
- Returns: Forward points for the specified direction.
- Example:Returns
=Fxfpc2FXForwardPoints(McpFXForwardPointsCurve2(...), "2023-12-31", "mid")0.0015(assuming the mid forward points are 15 pips).
Excel: =FxfpcFXForwardPoints(Curve, Date)
Python: FXForwardPoints(endDate)
- Function: Retrieves the forward points for a specified date from a unilateral foreign exchange forward curve.
- Parameters:
Curve: Unilateral foreign exchange forward curve object,Python API does not require this parameter.Date: Target date.
- Returns: Forward points.
Excel: =Fxfpc2FXForwardOutright(Curve, Date, BidMidAsk)
Python: FXForwardOutright(*args)
- Function: Retrieves the forward outright price for a specified date from a bilateral foreign exchange forward curve.
- Parameters:
Curve: Bilateral foreign exchange forward curve object.Date: Target date.BidMidAsk: Specifies the direction (bid,mid, orask).*args:is a dictionary, does not require the Curve parameter, other parameters are the same as those in Excel.
- Returns: Forward outright price for the specified direction.
Excel: =FxfpcFXForwardOutright(Curve, Date)
Python: FXForwardOutright(endDate)
- Function: Retrieves the forward outright price for a specified date from a unilateral foreign exchange forward curve.
- Parameters:
Curve: Unilateral foreign exchange forward curve object,Python API does not require this parameter.Date: Target date.
- Returns: Forward outright price.
Excel: =Fxfpc2TOForwardOutright(curve, startDate, endDate, findMax, bidMidAsk)
- Function: Calculates the worst-case outright price for a Time Option (or Delivery Window) Forward contract.
- Parameters:
curve: A forward curve object (typically a VanillaSwap object).startDate: Start date of the delivery window.endDate: End date of the delivery window.findMax: Boolean indicating whether to find the maximum price (True for the worst-case scenario, typically unfavorable to the client).bidMidAsk: Price direction (Bid, Mid, Ask).
- Returns: The worst-case outright price.
Excel: =Fxfpc2TimeOptionDate(curve, startDate, endDate, findMax, bidMidAsk)
- Function: Calculates the specific delivery date corresponding to the worst-case price scenario for a Time Option Forward contract.
- Parameters:
curve: A forward curve object (typically a VanillaSwap object).startDate: Start date of the delivery window.endDate: End date of the delivery window.findMax: Boolean indicating whether to find the maximum price (True for the worst-case scenario, typically unfavorable to the client).bidMidAsk: Price direction (Bid, Mid, Ask).
- Returns: The delivery date corresponding to the worst-case price.
Excel: =ImpliedFwdPoints(pair, baseRate, termRate, spot, spotDate, deliveryDate)
- Function: Calculates the implied forward points based on interest rates for two currencies, the spot rate, and relevant dates.
- Parameters:
pair: Currency pair (e.g., USDCNY).baseRate: Interest rate for the base currency (Ccy1).termRate: Interest rate for the term currency (Ccy2).spot: Spot exchange rate price.spotDate: Spot value date.deliveryDate: Forward delivery date.
- Returns: The calculated forward points.
Excel: =ImpliedForward(pair, baseRate, termRate, spot, spotDate, deliveryDate)
- Function: Calculates the implied forward outright rate based on interest rates for two currencies, the spot rate, and relevant dates.
- Parameters:
pair: Currency pair (e.g., USDCNY).baseRate: Interest rate for the base currency (Ccy1).termRate: Interest rate for the term currency (Ccy2).spot: Spot exchange rate price.spotDate: Spot value date.deliveryDate: Forward delivery date.
- Returns: The calculated forward outright rate.
