Main Content

fininstrument

Create specified instrument object type

Since R2020a

Description

Instrument = fininstrument(InstrumentType,Name,Value) creates an instrument object for one or more instruments specified by the InstrumentType and specifies options using one or more name-value pair arguments. The available name-value pair arguments depend on the InstrumentType you specify.

For more information on the workflow for creating an instrument object, a model object, and a pricer object, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.

For more information on the available instruments, models, and pricing methods, see Choose Instruments, Models, and Pricers.

example

Examples

collapse all

Use fininstrument to create an OptionEmbeddedFixedBond instrument object.

CallDates = datetime(2025,9,15) + calyears([0 1 2]');
CallStrikes = [101 103 105]';
CallSchedule = timetable(CallDates,CallStrikes);
OptionEmbedFixedBOption = fininstrument("OptionEmbeddedFixedBond",'Maturity',"15-Sep-2031",'CouponRate',.03,'CallSchedule',CallSchedule,'Period',1,'Name',"option_embedded_fixedbond")
OptionEmbedFixedBOption = 
  OptionEmbeddedFixedBond with properties:

                  CouponRate: 0.0300
                      Period: 1
                       Basis: 0
                EndMonthRule: 1
                   Principal: 100
    DaycountAdjustedCashFlow: 0
       BusinessDayConvention: "actual"
                    Holidays: NaT
                   IssueDate: NaT
             FirstCouponDate: NaT
              LastCouponDate: NaT
                   StartDate: NaT
                    Maturity: 15-Sep-2031
                   CallDates: [3x1 datetime]
                    PutDates: [0x1 datetime]
                CallSchedule: [3x1 timetable]
                 PutSchedule: [0x0 timetable]
           CallExerciseStyle: "bermudan"
            PutExerciseStyle: [0x0 string]
                        Name: "option_embedded_fixedbond"

Input Arguments

collapse all

Type of instrument, specified as a scalar string or character vector.

Use these options for interest-rate instruments:

  • "CMS" — For more information, see CMS.

  • "CMSNote" — For more information, see CMSNote.

  • "Deposit" — For more information, see Deposit.

  • "FRA" — For more information, see FRA.

  • "FixedBond" — For more information, see FixedBond.

  • "FixedBondOption" — For more information, see FixedBondOption.

  • "FloatBond" — For more information, see FloatBond.

  • "FloatBondOption" — For more information, see FloatBondOption.

  • "OptionEmbeddedFixedBond" — For more information, see OptionEmbeddedFixedBond.

  • "OptionEmbeddedFloatBond" — For more information, see OptionEmbeddedFloatBond.

  • "Swap" — For more information, see Swap.

  • "Cap" — For more information, see Cap.

  • "Floor" — For more information, see Floor.

  • "Swaption" — For more information, see Swaption.

  • "STIRFuture" — For more information, see STIRFuture.

  • "OISFuture" — For more information, see OISFuture.

  • "OvernightIndexSwap" — For more information, see OvernightIndexedSwap.

  • "BondFuture" — For more information, see BondFuture.

  • "ConvertibleBond" — For more information, see ConvertibleBond.

Use these options for inflation instruments:

Use these options for equity, commodity, FX, or energy instruments:

  • "Vanilla" — For more information, see Vanilla.

  • "Lookback" — For more information, see Lookback.

  • "PartialLookback" — For more information, see PartialLookback.

  • "Barrier" — For more information, see Barrier.

  • "DoubleBarrier" — For more information, see DoubleBarrier.

  • "Asian" — For more information, see Asian.

  • "Spread" — For more information, see Spread.

  • "VarianceSwap" — For more information, see VarianceSwap.

  • "CurrencySwap" — For more information, see CurrencySwap.

  • "Touch" — For more information, see Touch.

  • "DoubleTouch" — For more information, see DoubleTouch.

  • "Cliquet" — For more information, see Cliquet.

  • "Binary" — For more information, see Binary.

  • "CommodityFuture" — For more information, see CommodityFuture.

  • "EquityIndexFuture" — For more information, see EquityIndexFuture.

  • "FXFuture" — For more information, see FXFuture.

  • "ConvertibleBond" — For more information, see ConvertibleBond.

Use these options for credit derivative instruments:

  • "CDS" — For more information, see CDS.

  • "CDSOption" — For more information, see CDSOption.

Data Types: string | char

Name-Value Arguments

Specify 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.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: Instrument = fininstrument("Cap",Name,Value)

The available name-value pair arguments depend on the value you specify for InstrumentType.

Name-Value Pair Arguments for Interest-Rate Instruments
Name-Value Pair Arguments for Inflation Instruments
Name-Value Pair Arguments for Equity Instruments
Name-Value Pair Arguments for Credit Derivative Instruments

Output Arguments

collapse all

Instrument, returned as an instrument object.

Version History

Introduced in R2020a

expand all