DoubleBarrier
instrument object
Create and price a DoubleBarrier
instrument object using
this workflow:
Use fininstrument
to create a DoubleBarrier
instrument object.
Use finmodel
to specify
a BlackScholes
, Heston
, Bates
, or Merton
model for
the DoubleBarrier
instrument.
When using a BlackScholes
model, use finpricer
to
specify an IkedaKunitomo
or VannaVolga
pricing method for the DoubleBarrier
instrument.
When using a BlackScholes
, Heston
,
Bates
, or Merton
model, use
finpricer
to
specify a FiniteDifference
or an AssetMonteCarlo
pricing method for the
DoubleBarrier
instrument.
For more 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 a
DoubleBarrier
instrument, see Choose Instruments, Models, and Pricers.
creates a DoubleBarrierOpt
= fininstrument(InstrumentType
,'Strike
',strike_value,'ExerciseDate
',exercise_date,'BarrierValue
',barrier_value)DoubleBarrier
object by specifying
InstrumentType
and sets properties using
the required name-value pair arguments Strike
,
ExerciseDate
, and
BarrierValue
.
sets optional properties using
additional name-value pair arguments in addition to the required arguments
in the previous syntax. For example, DoubleBarrierOpt
= fininstrument(___,Name,Value
)DoubleBarrierOpt =
fininstrument("DoubleBarrier",'Strike',100,'ExerciseDate',datetime(2019,1,30),'BarrierValue',110,'OptionType',"put",'ExerciseStyle',"European",'BarrierType',"DKI",'Name',"doublebarrier_option")
creates a DoubleBarrier
put option with a European
exercise. You can specify multiple name-value pair arguments.
After creating an DoubleBarrier
instrument object with an
ExerciseStyle
set to "American"
, you can
modify the ExerciseStyle
property to change it to
"European"
using dot
notation.
DoubleBarrier.ExerciseStyle = "European"
Strike
and
ExerciseDate
value and an American option has a 2-element
vector for Strike
and ExerciseDate
values,
when you change to ExerciseStyle
from "American"
to "European"
, the Strike
and
ExerciseDate
values become the last element in the 2-element
vector for the Strike
and ExerciseDate
values.