fininstrument
Description
creates an instrument object for one or more instruments specified by the
Instrument
= fininstrument(InstrumentType
,Name,Value
)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.
Examples
Use fininstrument
to Create OptionEmbeddedFixedBond
Instrument
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
InstrumentType
— Type of instrument
character vector | string
Type of instrument, specified as a scalar string or character vector.
Use these options for interest-rate instruments:
"CMS"
— For more information, seeCMS
."CMSNote"
— For more information, seeCMSNote
."Deposit"
— For more information, seeDeposit
."FRA"
— For more information, seeFRA
."FixedBond"
— For more information, seeFixedBond
."FixedBondOption"
— For more information, seeFixedBondOption
."FloatBond"
— For more information, seeFloatBond
."FloatBondOption"
— For more information, seeFloatBondOption
."OptionEmbeddedFixedBond"
— For more information, seeOptionEmbeddedFixedBond
."OptionEmbeddedFloatBond"
— For more information, seeOptionEmbeddedFloatBond
."Swap"
— For more information, seeSwap
."Cap"
— For more information, seeCap
."Floor"
— For more information, seeFloor
."Swaption"
— For more information, seeSwaption
."STIRFuture"
— For more information, seeSTIRFuture
."OISFuture"
— For more information, seeOISFuture
."OvernightIndexSwap"
— For more information, seeOvernightIndexedSwap
."BondFuture"
— For more information, seeBondFuture
.
Use these options for inflation instruments:
"InflationBond"
— For more information, seeInflationBond
."YearYearInflationSwap"
— For more information, seeYearYearInflationSwap
."ZeroCouponInflationSwap"
— For more information, seeZeroCouponInflationSwap
."ConvertibleBond"
— For more information, seeConvertibleBond
.
Use these options for equity, commodity, FX, or energy instruments:
"Vanilla"
— For more information, seeVanilla
."Lookback"
— For more information, seeLookback
."PartialLookback"
— For more information, seePartialLookback
."Barrier"
— For more information, seeBarrier
."DoubleBarrier"
— For more information, seeDoubleBarrier
."Asian"
— For more information, seeAsian
."Spread"
— For more information, seeSpread
."VarianceSwap"
— For more information, seeVarianceSwap
."Touch"
— For more information, seeTouch
."DoubleTouch"
— For more information, seeDoubleTouch
."Cliquet"
— For more information, seeCliquet
."Binary"
— For more information, seeBinary
."CommodityFuture"
— For more information, seeCommodityFuture
."EquityIndexFuture"
— For more information, seeEquityIndexFuture
."FXFuture"
— For more information, seeFXFuture
."ConvertibleBond"
— For more information, seeConvertibleBond
.
Use these options for credit derivative instruments:
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
.
CMS
— For more information, see CMS Name-Value Arguments.CMSNote
— For more information, see Swap Name-Value Arguments.Deposit
— For more information, see Deposit Name-Value Pair Arguments.FRA
— For more information, see FRA Name-Value Pair Arguments.FixedBond
— For more information, see FixedBond Name-Value Pair Arguments.FixedBondOption
— For more information, see FixedBondOption Name-Value Pair Arguments.FloatBond
— For more information, see FloatBond Name-Value Pair Arguments.FloatBondOption
— For more information, see FloatBondOption Name-Value Pair Arguments.OptionEmbeddedFixedBond
— For more information, see OptionEmbeddedFixedBond Name-Value Pair Arguments.OptionEmbeddedFloatBond
— For more information, see OptionEmbeddedFloatBond Name-Value Pair Arguments.Swap
— For more information, see Swap Name-Value Pair Arguments.Cap
— For more information, see Cap Name-Value Pair Arguments.Floor
— For more information, see Floor Name-Value Pair Arguments.Swaption
— For more information, see Swaption Name-Value Pair Arguments.STIRFuture
— For more information, see STIRFuture Name-Value Arguments.OvernightIndexedSwap
— For more information, see OvernightIndexedSwap Name-Value Arguments.OISFuture
— For more information, see OISFuture Name-Value Pair Arguments.BondFuture
— For more information, see BondFuture Name-Value Arguments.ConvertibleBond
— For more information, see ConvertibleBond Name-Value Pair Arguments.
InflationBond
— For more information, see InflationBond Name-Value Pair Arguments.YearYearInflationSwap
— For more information, see YearYearInflationSwap Name-Value Pair Arguments.ZeroCouponInflationSwap
— For more information, see ZeroCouponInflationSwap Name-Value Pair Arguments.
Vanilla
— For more information, see Vanilla Name-Value Pair Arguments.Lookback
— For more information, see Lookback Name-Value Pair Arguments.PartialLookback
— For more information, see PartialLookback Name-Value Arguments.Barrier
— For more information, see Barrier Name-Value Pair Arguments.DoubleBarrier
— For more information, see DoubleBarrier Name-Value Pair Arguments.Asian
— For more information, see Asian Name-Value Pair Arguments.Spread
— For more information, see Spread Name-Value Pair Arguments.VarianceSwap
— For more information, see VarianceSwap Name-Value Pair Arguments.Touch
— For more information, see Touch Name-Value Pair Arguments.DoubleTouch
— For more information, see DoubleTouch Name-Value Pair Arguments.Cliquet
— For more information, see Cliquet Name-Value Arguments.Binary
— For more information, see Binary Name-Value Pair Arguments.CommodityFuture
— For more information, see CommodityFuture Name-Value Arguments.EquityIndexFuture
— For more information, see EquityIndexFuture Name-Value Arguments.FXFuture
— For more information, see FXFuture Name-Value Arguments.ConvertibleBond
— For more information, see ConvertibleBond Name-Value Pair Arguments.
CDS
— For more information, see CDS Name-Value Pair Arguments.CDSOption
— For more information, see CDSOption Name-Value Pair Arguments.
Output Arguments
Instrument
— Instrument
instrument object
Instrument, returned as an instrument object.
Version History
Introduced in R2020a
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)