Main Content

FXFuture

FXFuture instrument object

Since R2022a

Description

Create and price an FXFuture instrument object for one or more FX Future instruments using this workflow:

  1. Use fininstrument to create an FXFuture instrument object for one or more FX Future instruments.

  2. Use ratecurve to specify a curve model for the FXFuture instrument object.

  3. Use finpricer to specify a Discount pricing method for one or more FXFuture instruments.

  4. Use cashsettle to compute the cash settlement for the FXFuture instrument and fairdelivery to compute the fair delivery price for the underlying asset for the FXFuture instrument.

For more detailed information on this workflow, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.

For more information on the available models and pricing methods for an FXFuture instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

example

FXFutureObj = fininstrument(InstrumentType,Maturity=maturity_value,QuotedPrice=quoted_price,ForeignRateCurve=foreign_rate_curve) creates an FXFuture object for one or more FX Future instruments by specifying InstrumentType and sets the properties for the required name-value arguments Maturity, QuotedPrice, and ForeignRateCurve.

The FXFuture instrument supports currency pairs where the price is quoted in domestic currency for one unit of foreign currency. For more information, see FXFuture.

example

FXFutureObj = fininstrument(___,Name=Value) sets optional properties using additional name-value arguments in addition to the required arguments in the previous syntax. For example, FXFutureObj = fininstrument("FXFuture",Maturity=datetime(2022,9,1),QuotedPrice=0.78,ForeignRateCurve=ForeignRC,Notional=200000,Name="fxfuture_instrument") creates an FXFuture. You can specify multiple name-value arguments.

Input Arguments

expand all

Instrument type, specified as a string with the value of "FXFuture", a character vector with the value of 'FXFuture', an NINST-by-1 string array with values of "FXFuture", or an NINST-by-1 cell array of character vectors with values of 'FXFuture'.

Data Types: char | cell | string

Name-Value Arguments

Specify required and optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: FXFutureObj = fininstrument("FXFuture",Maturity=datetime(2022,9,1),QuotedPrice=0.78,ForeignRateCurve=ForeignRC,Notional=200000,Name="fxfuture_instrument")

Required FXFuture Name-Value Arguments

expand all

FXFuture maturity date, specified as Maturity and a scalar or an NINST-by-1 vector using a datetime array, string array, or date character vectors.

To support existing code, FXFuture also accepts serial date numbers as inputs, but they are not recommended.

If you use date character vectors or strings, the format must be recognizable by datetime because the Maturity property is stored as a datetime.

FXFuture delivery price quoted in domestic currency for one unit of foreign currency, specified as QuotedPrice and a scalar numeric or an NINST-by-1 numeric vector.

Data Types: double

Rate curve object for foreign currency, specified as a scalar ratecurve object or an NINST-by-1 vector of ratecurve objects.

Data Types: object

Optional FXFuture Name-Value Arguments

expand all

Notional in foreign currency, specified as Notional and a scalar numeric or an NINST-by-1 numeric vector.

Data Types: double

User-defined name for one or more instruments, specified as Name and a scalar string or character vector or an NINST-by-1 cell array of character vectors or string array.

Data Types: char | cell | string

Properties

expand all

FXFuture maturity date, returned as a scalar datetime or NINST-by-1 vector of datetimes.

Data Types: datetime

FXFuture quoted price, returned as a scalar numeric or an NINST-by-1 numeric vector.

Data Types: double

Rate curve object for foreign currency, returned as a scalar ratecurve object or an NINST-by-1 vector of ratecurve objects.

Data Types: object

Notional in foreign currency, returned as a scalar numeric or an NINST-by-1 numeric vector.

Data Types: double

User-defined name for the instrument, returned as a scalar string or an NINST-by-1 string array.

Data Types: string

Object Functions

cashsettleCompute cash settlement for BondFuture, CommodityFuture, EquityIndexFuture, or FXFuture instrument
fairdeliveryCompute fair delivery price of underlying asset for BondFuture, CommodityFuture, EquityIndexFuture, or FXFuture instrument

Examples

collapse all

This example shows the workflow to price an FXFuture instrument when you use a ratecurve object and a Future pricing method.

Create ratecurve Objects

Create ratecurve objects using ratecurve for the foreign and domestic zero curves.

% Define Foreign Zero Curve
Settle = datetime(2022, 3, 1);
ForeignZeroTimes = [calmonths(6) calyears([1 2 3 4 5 7 10 20 30])]';
ForeignZeroRates = [0.0031 0.0035 0.0047 0.0058 0.0062 0.0093 0.0128 0.0182 0.0223 0.0285]';
ForeignZeroDates = Settle + ForeignZeroTimes;
ForeignRC = ratecurve('zero', Settle, ForeignZeroDates, ForeignZeroRates);

% Define Domestic Zero Curve
DomesticZeroTimes = [calmonths(6) calyears([1 2 3 4 5 7 10 20 30])]';
DomesticZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307]';
DomesticZeroDates = Settle + DomesticZeroTimes;
DomesticRC = ratecurve('zero', Settle, DomesticZeroDates, DomesticZeroRates);

Create FXFuture Instrument Object

Use fininstrument to create an FXFuture instrument object.

FXFut = fininstrument("FXFuture",Maturity=datetime(2022,9,1),QuotedPrice=0.78,ForeignRateCurve=ForeignRC,Notional=200000,Name="FXfuture_instrument")
FXFut = 
  FXFuture with properties:

            Maturity: 01-Sep-2022
         QuotedPrice: 0.7800
    ForeignRateCurve: [1x1 ratecurve]
            Notional: 200000
                Name: "FXfuture_instrument"

Create Future Pricer Object

Use finpricer to create a Future pricer object and use the ratecurve object with the DiscountCurve name-value argument.

outPricer = finpricer("Future",DiscountCurve=DomesticRC,SpotPrice=0.79)
outPricer = 
  Future with properties:

    DiscountCurve: [1x1 ratecurve]
        SpotPrice: 0.7900

Price FXFuture Instrument

Use price to compute the price and price result for the FXFuture instrument.

[Price,outPR] = price(outPricer,FXFut)
Price = 2.1617e+03
outPR = 
  priceresult with properties:

       Results: [1x4 table]
    PricerData: []

outPR.Results
ans=1×4 table
    Price     FairDeliveryPrice    FairFuturePrice    AccruedInterest
    ______    _________________    _______________    _______________

    2161.7       1.5817e+05            0.79084               0       

This example shows the workflow to price multiple FXFuture instruments when you use a ratecurve object and a Future pricing method.

Create ratecurve Objects

Create ratecurve objects using ratecurve for the foreign and domestic zero curves.

% Define Foreign Zero Curve
Settle = datetime(2022, 3, 1);
ForeignZeroTimes = [calmonths(6) calyears([1 2 3 4 5 7 10 20 30])]';
ForeignZeroRates = [0.0031 0.0035 0.0047 0.0058 0.0062 0.0093 0.0128 0.0182 0.0223 0.0285]';
ForeignZeroDates = Settle + ForeignZeroTimes;
ForeignRC = ratecurve('zero', Settle, ForeignZeroDates, ForeignZeroRates);

% Define Domestic Zero Curve
DomesticZeroTimes = [calmonths(6) calyears([1 2 3 4 5 7 10 20 30])]';
DomesticZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307]';
DomesticZeroDates = Settle + DomesticZeroTimes;
DomesticRC = ratecurve('zero', Settle, DomesticZeroDates, DomesticZeroRates);

Create FXFuture Instrument Object

Use fininstrument to create an FXFuture instrument object for three FX Future instruments.

FXFut = fininstrument("FXFuture",Maturity=datetime([2022,9,1 ; 2022,10,1 ; 2022,11,1]),QuotedPrice=[0.78 ; 0.82 ; 0.86],ForeignRateCurve=ForeignRC,Notional=200000,Name=["FXfuture_instrument1";"FXfuture_instrument2";"FXfuture_instrument3"])
FXFut=3×1 FXFuture array with properties:
    Maturity
    QuotedPrice
    ForeignRateCurve
    Notional
    Name

Create Future Pricer Object

Use finpricer to create a Future pricer object and use the ratecurve object with the DiscountCurve name-value argument.

outPricer = finpricer("Future",DiscountCurve=DomesticRC,SpotPrice=0.79)
outPricer = 
  Future with properties:

    DiscountCurve: [1x1 ratecurve]
        SpotPrice: 0.7900

Price FXFuture Instruments

Use price to compute the prices and price results for the FXFuture instrument.

[Price,outPR] = price(outPricer,FXFut)
Price = 3×1
104 ×

    0.2162
   -0.5789
   -1.3732

outPR=1×3 priceresult array with properties:
    Results
    PricerData

outPR.Results
ans=1×4 table
    Price     FairDeliveryPrice    FairFuturePrice    AccruedInterest
    ______    _________________    _______________    _______________

    2161.7       1.5817e+05            0.79084               0       

ans=1×4 table
    Price    FairDeliveryPrice    FairFuturePrice    AccruedInterest
    _____    _________________    _______________    _______________

    -5789       1.5819e+05            0.79097               0       

ans=1×4 table
    Price     FairDeliveryPrice    FairFuturePrice    AccruedInterest
    ______    _________________    _______________    _______________

    -13732       1.5822e+05            0.7911                0       

More About

expand all

Version History

Introduced in R2022a

expand all