PartialLookback
Description
Create and price a PartialLookback
instrument object for
one or more Partial Lookback instruments using this workflow:
Use
fininstrument
to create aPartialLookback
instrument object for one or more Partial Lookback instruments.Use
finmodel
to specify aBlackScholes
,Heston
,Bates
, orMerton
model for thePartialLookback
instrument object.Choose a pricing method.
When using a
BlackScholes
model, usefinpricer
to specify aHeynenKat
pricing method for one or morePartialLookback
instruments.When using a
BlackScholes
,Heston
,Bates
, orMerton
model, usefinpricer
to specify anAssetMonteCarlo
pricing method for one or morePartialLookback
instruments.
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
PartialLookback
instrument, see Choose Instruments, Models, and Pricers.
Creation
Syntax
Description
creates a PartialLookbackObj
= fininstrument(InstrumentType
,ExerciseDate
=exercise_date,Strike
=strike_value,MonitorDate
=monitor_date)PartialLookback
object for one or more Partial
Lookback instruments by specifying InstrumentType
and
sets the properties for
the required name-value arguments Strike
,
ExerciseDate
, and MonitorDate
.
The PartialLookback
instrument supports fixed-strike
and floating-strike partial lookback options. To compute the value of a
floating-strike partial lookback option, the Strike
must be specified as NaN
. For more information on a
PartialLookback
instrument, see More About.
sets optional PartialLookbackObj
= fininstrument(___,Name=Value
)
properties
using additional name-value arguments in addition to the required arguments
in the previous syntax. For example, LookbackObj =
fininstrument("Lookback",Strike=100,ExerciseDate=datetime(2022,1,30),MonitorDate=datetime(2021,1,30),OptionType="put",ExerciseStyle="European",Name="partial_lookback_option")
creates a PartialLookback
put option with an European
exercise. You can specify multiple name-value arguments.
Input Arguments
InstrumentType
— Instrument type
string with value "PartialLookback"
| string array with values of
"PartialLookback"
| character vector with value
'PartialLookback'
| cell array of character vectors with values of
'PartialLookback'
Instrument type, specified as a string with the value of
"PartialLookback"
, a character vector with the
value of 'PartialLookback'
, an
NINST
-by-1
string array with
values of "PartialLookback"
, or an
NINST
-by-1
cell array of
character vectors with values of 'PartialLookback'
.
Data Types: char
| cell
| string
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: LookbackObj =
fininstrument("Lookback",Strike=100,ExerciseDate=datetime(2022,1,30),MonitorDate=datetime(2021,1,30),OptionType="put",ExerciseStyle="European",Name="partial_lookback_option")
Lookback
Name-Value ArgumentsStrike
— Option strike price value
nonnegative numeric | vector of nonnegative values | NaN
Option strike price value, specified as Strike
and a scalar nonnegative numeric or an
NINST
-by-1
vector of
nonnegative values for a fixed-strike
PartialLookback
option. For a floating-strike
partial lookback option, specify Strike
as a
NaN
or an
NINST
-by-1
vector of
NaN
s.
Data Types: double
ExerciseDate
— Option exercise date
datetime array | string array | date character vector
Option exercise date, specified as ExerciseDate
and a scalar or an NINST
-by-1
vector using a datetime array, string array, or date character vectors.
Note
For a European option, there is only one
ExerciseDate
on the option expiry
date.
To support existing code, PartialLookback
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 ExerciseDate
property is stored as a
datetime.
MonitorDate
— Predetermined lookback monitoring date
datetime array | string array | date character vector
Predetermined lookback monitoring date, specified as
MonitorDate
and a scalar or an
NINST
-by-1
vector using a
datetime array, string array, or date character vectors.
For a fixed-strike partial lookback, the monitoring period is [
MonitorDate
,ExerciseDate
]. TheMonitorDate
is the start date for a fixed-strike partial lookback option.For a floating-strike partial lookback, the monitoring period is [
Settle
,MonitorDate
], whereSettle
is <MonitorDate
<ExerciseDate
. TheMonitorDate
is the end date for a floating-strike partial lookback option.
To support existing code, PartialLookback
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 ExerciseDate
property is stored as a
datetime.
PartialLookback
Name-Value ArgumentsOptionType
— Option type
"call"
(default) | string with value "call"
or
"put"
| string array with values "call"
or
"put"
| character vector with value 'call'
or
'put'
| cell array of character vectors with values
'call'
or 'put'
Option type, specified as OptionType
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
ExerciseStyle
— Option exercise style
"European"
(default) | string with value "European"
or
"American"
| string array with values "European"
or
"American"
| character vector with value 'European'
or
'American'
| cell array of character vectors with values
'European'
or
'American'
Option exercise style, specified as
ExerciseStyle
and a scalar string or
character vector or an
NINST
-by-1
cell array of
character vectors or string array.
Data Types: string
| cell
| char
AssetMinMax
— Maximum or minimum underlying asset price
NaN
where
SpotPrice
of the underlying asset is
used (default) | scalar numeric | numeric vector
Maximum or minimum underlying asset price, specified as
AssetMinMax
and a scalar numeric or an
NINST
-by-1
numeric
vector.
Data Types: double
StrikeScaler
— Degree of partiality for floating-strike partial lookback
1
(default) | scalar numeric | numeric vector
Degree of partiality for a floating-strike partial lookback,
specified as StrikeScaler
and a scalar numeric or
an NINST
-by-1
numeric vector.
The StrikeScaler
value indicates the percentage
of the Strike
that is fixed above or below the
AssetMinMax
value.
For a call floating-strike partial lookback, the
StrikeScaler
is ≥ 1.For a put floating-strike partial lookback, 0 <
StrikeScaler
≤ 1.
Data Types: double
Name
— User-defined name for instrument
" "
(default) | string | string array | character vector | cell array of character vectors
User-defined name for one of 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
Strike
— Option strike price value
nonnegative numeric | vector of nonnegative values
Option strike price value, returned as a scalar nonnegative numeric or an
NINST
-by-1
vector of nonnegative
values.
Data Types: double
ExerciseDate
— Option exercise date
datetime | vector of datetimes
Option exercise date, returned as a scalar datetime or an
NINST
-by-1
vector of
datetimes.
Data Types: datetime
MonitorDate
— Predetermined lookback monitoring date
datetime | vector of datetimes
Predetermined monitoring date, returned as a scalar datetime or an
NINST
-by-1
vector of
datetimes.
Data Types: datetime
OptionType
— Option type
"call"
(default) | string with value "call"
or
"put"
| string array with values "call"
or
"put"
Option type, returned as a scalar string or an
NINST
-by-1
string array with
values of "call"
or "put"
.
Data Types: string
ExerciseStyle
— Option exercise style
"European"
(default) | string with value "European"
or
"American"
| string array with value "European"
or
"American"
Option exercise style, returned as a scalar string or an
NINST
-by-1
string array with
values of "European"
or "American"
.
Data Types: string
AssetMinMax
— Maximum or minimum underlying asset price
NaN
where SpotPrice
of the underlying asset is used (default) | scalar numeric | numeric vector
Maximum or minimum underlying asset price, returned as a scalar numeric or
an NINST
-by-1
numeric vector.
Data Types: double
StrikeScaler
— Degree of partiality for partial floating-strike lookback
1
(default) | scalar numeric | numeric vector
Degree of partiality for partial floating-strike lookback, returned as a
scalar numeric or an NINST
-by-1
numeric vector.
Data Types: double
Name
— User-defined name for instrument
" "
(default) | string | string array
User-defined name for the instrument, returned as an
NINST
-by-1
string array.
Data Types: string
Examples
Price PartialLookback
Instrument Using BlackScholes
Model and HeynenKat
Pricer
This example shows the workflow to price a floating-strike PartialLookback
instrument when you use a BlackScholes
model and a HeynenKat
pricing method.
Create PartialLookback
Instrument Object
Use fininstrument
to create an PartialLookback
instrument object.
PartialLookbackOpt = fininstrument("PartialLookback",ExerciseDate=datetime(2022,9,15),Strike=NaN,StrikeScaler=0.75,MonitorDate=datetime(2021,9,15),OptionType="put",ExerciseStyle="european",AssetMinMax=98,Name="partial_lookback_option")
PartialLookbackOpt = PartialLookback with properties: MonitorDate: 15-Sep-2021 StrikeScaler: 0.7500 OptionType: "put" Strike: NaN AssetMinMax: 98 ExerciseStyle: "european" ExerciseDate: 15-Sep-2022 Name: "partial_lookback_option"
Create BlackScholes
Model Object
Use finmodel
to create a BlackScholes
model object.
BlackScholesModel = finmodel("BlackScholes",Volatility=0.32)
BlackScholesModel = BlackScholes with properties: Volatility: 0.3200 Correlation: 1
Create ratecurve
Object
Create a flat ratecurve
object using ratecurve
.
Settle = datetime(2018,9,15);
Maturity = datetime(2023,9,15);
Rate = 0.035;
myRC = ratecurve('zero',Settle,Maturity,Rate,Basis=12)
myRC = ratecurve with properties: Type: "zero" Compounding: -1 Basis: 12 Dates: 15-Sep-2023 Rates: 0.0350 Settle: 15-Sep-2018 InterpMethod: "linear" ShortExtrapMethod: "next" LongExtrapMethod: "previous"
Create HeynenKat
Pricer Object
Use finpricer
to create a HeynenKat
pricer object and use the ratecurve
object for the 'DiscountCurve'
name-value pair argument.
outPricer = finpricer("analytic",Model=BlackScholesModel,DiscountCurve=myRC,SpotPrice=100,DividendType="continuous",DividendValue=.05,PricingMethod="HeynenKat")
outPricer = HeynenKat with properties: DiscountCurve: [1x1 ratecurve] Model: [1x1 finmodel.BlackScholes] SpotPrice: 100 DividendValue: 0.0500 DividendType: "continuous"
Price PartialLookback
Instrument
Use price
to compute the price and sensitivities for the PartialLookback
instrument.
[Price, outPR] = price(outPricer,PartialLookbackOpt,["all"])
Price = 24.8148
outPR = priceresult with properties: Results: [1x7 table] PricerData: []
outPR.Results
ans=1×7 table
Price Delta Gamma Lambda Vega Theta Rho
______ _______ ________ ______ ______ _______ _______
24.815 0.27297 0.012438 1.1 131.33 -5.0942 -193.51
Price Multiple PartialLookback
Instruments Using BlackScholes
Model and HeynenKat
Pricer
This example shows the workflow to price multiple floating-strike PartialLookback
instruments when you use a BlackScholes
model and a HeynenKat
pricing method.
Create PartialLookback
Instrument Object
Use fininstrument
to create an PartialLookback
instrument object for three Partial Lookback instruments.
PartialLookbackOpt = fininstrument("PartialLookback",ExerciseDate=datetime([2022,9,15 ; 2022,10,15 ; 2022,11,15]),Strike=NaN,StrikeScaler=0.75,MonitorDate=datetime([2021,9,15 ; 2021,10,15 ; 2021,11,15]),OptionType="put",ExerciseStyle="european",AssetMinMax=98,Name="partial_lookback_option")
PartialLookbackOpt=3×1 PartialLookback array with properties:
MonitorDate
StrikeScaler
OptionType
Strike
AssetMinMax
ExerciseStyle
ExerciseDate
Name
Create BlackScholes
Model Object
Use finmodel
to create a BlackScholes
model object.
BlackScholesModel = finmodel("BlackScholes",Volatility=0.32)
BlackScholesModel = BlackScholes with properties: Volatility: 0.3200 Correlation: 1
Create ratecurve
Object
Create a flat ratecurve
object using ratecurve
.
Settle = datetime(2018,9,15);
Maturity = datetime(2023,9,15);
Rate = 0.035;
myRC = ratecurve('zero',Settle,Maturity,Rate,Basis=12)
myRC = ratecurve with properties: Type: "zero" Compounding: -1 Basis: 12 Dates: 15-Sep-2023 Rates: 0.0350 Settle: 15-Sep-2018 InterpMethod: "linear" ShortExtrapMethod: "next" LongExtrapMethod: "previous"
Create HeynenKat
Pricer Object
Use finpricer
to create a HeynenKat
pricer object and use the ratecurve
object for the 'DiscountCurve'
name-value pair argument.
outPricer = finpricer("analytic",Model=BlackScholesModel,DiscountCurve=myRC,SpotPrice=100,DividendType="continuous",DividendValue=0.05,PricingMethod="HeynenKat")
outPricer = HeynenKat with properties: DiscountCurve: [1x1 ratecurve] Model: [1x1 finmodel.BlackScholes] SpotPrice: 100 DividendValue: 0.0500 DividendType: "continuous"
Price PartialLookback
Instruments
Use price
to compute the prices and sensitivities for the PartialLookback
instruments.
[Price, outPR] = price(outPricer,PartialLookbackOpt,["all"])
Price = 3×1
24.8148
25.2306
25.6545
outPR=3×1 priceresult array with properties:
Results
PricerData
outPR.Results
ans=1×7 table
Price Delta Gamma Lambda Vega Theta Rho
______ _______ ________ ______ ______ _______ _______
24.815 0.27297 0.012438 1.1 131.33 -5.0942 -193.51
ans=1×7 table
Price Delta Gamma Lambda Vega Theta Rho
______ _______ ________ ______ ______ _______ _______
25.231 0.27694 0.012349 1.0976 133.05 -5.0265 -198.37
ans=1×7 table
Price Delta Gamma Lambda Vega Theta Rho
______ _______ ________ ______ ______ _______ ______
25.655 0.28099 0.012264 1.0953 134.81 -4.9578 -203.4
Price PartialLookback
Instrument Using Heston
Model and AssetMonteCarlo
Pricer
This example shows the workflow to price a fixed-strike PartialLookback
instrument when you use a Heston
model and an AssetMonteCarlo
pricing method.
Create PartialLookback
Instrument Object
Use fininstrument
to create an PartialLookback
instrument object.
PartialLookbackOpt = fininstrument("PartialLookback",ExerciseDate=datetime(2022,9,15),Strike=102,MonitorDate=datetime(2021,9,15),OptionType="call",ExerciseStyle="european",Name="partial_lookback_option")
PartialLookbackOpt = PartialLookback with properties: MonitorDate: 15-Sep-2021 StrikeScaler: 1 OptionType: "call" Strike: 102 AssetMinMax: NaN ExerciseStyle: "european" ExerciseDate: 15-Sep-2022 Name: "partial_lookback_option"
Create Heston
Model Object
Use finmodel
to create a Hestone
model object.
HestonModel = finmodel("Heston",V0=0.032,ThetaV=0.1,Kappa=0.003,SigmaV=0.2,RhoSV=-0.9)
HestonModel = Heston with properties: V0: 0.0320 ThetaV: 0.1000 Kappa: 0.0030 SigmaV: 0.2000 RhoSV: -0.9000
Create ratecurve
Object
Create a flat ratecurve
object using ratecurve
.
Settle = datetime(2018,9,15);
Maturity = datetime(2023,9,15);
Rate = 0.035;
myRC = ratecurve('zero',Settle,Maturity,Rate,Basis=12)
myRC = ratecurve with properties: Type: "zero" Compounding: -1 Basis: 12 Dates: 15-Sep-2023 Rates: 0.0350 Settle: 15-Sep-2018 InterpMethod: "linear" ShortExtrapMethod: "next" LongExtrapMethod: "previous"
Create AssetMonteCarlo
Pricer Object
Use finpricer
to create an AssetMonteCarlo
pricer object and use the ratecurve
object for the 'DiscountCurve'
name-value pair argument.
outPricer = finpricer("AssetMonteCarlo",DiscountCurve=myRC,Model=HestonModel,SpotPrice=100,simulationDates=Settle+calmonths(1):calmonths(1):datetime(2022,9,15))
outPricer = HestonMonteCarlo with properties: DiscountCurve: [1x1 ratecurve] SpotPrice: 100 SimulationDates: [15-Oct-2018 15-Nov-2018 15-Dec-2018 15-Jan-2019 15-Feb-2019 15-Mar-2019 15-Apr-2019 15-May-2019 15-Jun-2019 15-Jul-2019 15-Aug-2019 15-Sep-2019 15-Oct-2019 ... ] (1x48 datetime) NumTrials: 1000 RandomNumbers: [] Model: [1x1 finmodel.Heston] DividendType: "continuous" DividendValue: 0 MonteCarloMethod: "standard" BrownianMotionMethod: "standard"
Price PartialLookback
Instrument
Use price
to compute the price and sensitivities for the PartialLookback
instrument.
[Price, outPR] = price(outPricer,PartialLookbackOpt,["all"])
Price = 19.9479
outPR = priceresult with properties: Results: [1x8 table] PricerData: [1x1 struct]
outPR.Results
ans=1×8 table
Price Delta Gamma Lambda Rho Theta Vega VegaLT
______ _______ _________ ______ ______ ______ _____ ______
19.948 0.93159 0.0084898 4.6701 283.87 1.9218 48.04 2.666
Price PartialLookback
Instrument Using Heston
Model and AssetMonteCarlo
Pricer with Quasi-Monte Carlo Simulation
This example shows the workflow to price a fixed-strike PartialLookback
instrument when you use a Heston
model and an AssetMonteCarlo
pricing method with quai-Monte Carlo simulation.
Create PartialLookback
Instrument Object
Use fininstrument
to create an PartialLookback
instrument object.
PartialLookbackOpt = fininstrument("PartialLookback",ExerciseDate=datetime(2022,9,15),Strike=102,MonitorDate=datetime(2021,9,15),OptionType="call",ExerciseStyle="european",Name="partial_lookback_option")
PartialLookbackOpt = PartialLookback with properties: MonitorDate: 15-Sep-2021 StrikeScaler: 1 OptionType: "call" Strike: 102 AssetMinMax: NaN ExerciseStyle: "european" ExerciseDate: 15-Sep-2022 Name: "partial_lookback_option"
Create Heston
Model Object
Use finmodel
to create a Hestone
model object.
HestonModel = finmodel("Heston",V0=0.032,ThetaV=0.1,Kappa=0.003,SigmaV=0.2,RhoSV=-0.9)
HestonModel = Heston with properties: V0: 0.0320 ThetaV: 0.1000 Kappa: 0.0030 SigmaV: 0.2000 RhoSV: -0.9000
Create ratecurve
Object
Create a flat ratecurve
object using ratecurve
.
Settle = datetime(2018,9,15);
Maturity = datetime(2023,9,15);
Rate = 0.035;
myRC = ratecurve('zero',Settle,Maturity,Rate,Basis=12)
myRC = ratecurve with properties: Type: "zero" Compounding: -1 Basis: 12 Dates: 15-Sep-2023 Rates: 0.0350 Settle: 15-Sep-2018 InterpMethod: "linear" ShortExtrapMethod: "next" LongExtrapMethod: "previous"
Create AssetMonteCarlo
Pricer Object
Use finpricer
to create an AssetMonteCarlo
pricer object and use the ratecurve
object for the 'DiscountCurve'
name-value argument and use the name-value arguments for MonteCarloMethod
and BrownianMotionMethod
.
outPricer = finpricer("AssetMonteCarlo",DiscountCurve=myRC,Model=HestonModel,SpotPrice=100,simulationDates=Settle+calmonths(1):calmonths(1):datetime(2022,9,15),NumTrials=1e3, ... MonteCarloMethod="quasi",BrownianMotionMethod="brownian-bridge")
outPricer = HestonMonteCarlo with properties: DiscountCurve: [1x1 ratecurve] SpotPrice: 100 SimulationDates: [15-Oct-2018 15-Nov-2018 15-Dec-2018 15-Jan-2019 15-Feb-2019 15-Mar-2019 15-Apr-2019 15-May-2019 15-Jun-2019 15-Jul-2019 15-Aug-2019 15-Sep-2019 15-Oct-2019 ... ] (1x48 datetime) NumTrials: 1000 RandomNumbers: [] Model: [1x1 finmodel.Heston] DividendType: "continuous" DividendValue: 0 MonteCarloMethod: "quasi" BrownianMotionMethod: "brownian-bridge"
Price PartialLookback
Instrument
Use price
to compute the price and sensitivities for the PartialLookback
instrument.
[Price, outPR] = price(outPricer,PartialLookbackOpt,"all")
Price = 19.7466
outPR = priceresult with properties: Results: [1x8 table] PricerData: [1x1 struct]
outPR.Results
ans=1×8 table
Price Delta Gamma Lambda Rho Theta Vega VegaLT
______ _______ _________ ______ ______ ______ ______ ______
19.747 0.91573 0.0030552 4.6374 279.16 -2.394 84.632 1.2039
More About
Partial Lookback Option
A partial lookback option gives the investor the right to exercise the option with the highest (or lowest) price of the underling asset during the partial lookback period.
Partial lookback options are called fractional lookback options because:
The extreme values (Smax and Smin) are monitored during a subset of the lives of the options
Only a fraction of the floating-strike values are in effect
For the latter, the factor λ (lambda) is introduced. The λ factor, represented by
the optional name-value argument StrikeScaler
, is a constant
and enables the creation of the fractional floating-strike lookback option where the
strike is fixed at some percentage above or below the actual extreme values
(Smax and Smin).
For calls when λ ≥ 1, the call floating strike increases
For puts when 0 ≤ λ ≤ 1, the put floating strike decreases
Financial Instruments Toolbox™ software supports two types of partial lookback options: fixed and floating. The fixed-strike partial lookback option is similar to a standard fixed-strike lookback option, but the lookback period starts at a predetermined date (T) after the settlement date of the option. The payoff for this options is
Max(0, Smax - K) for a call
Max(0, K -Smin) for a put
where
Smax is the maximum value of underlying asset during the monitoring period.
Smin is the minimum value of underlying asset during the monitoring period.
K is the strike price.
The floating-strike partial lookback option is similar to a standard floating-strike lookback option, but the lookback period starts at settle and ends at a predetermined date(T) before expiration.
The payoff for this options is
Max(0, S - λ × Smin) for a call
Max(0, λ × Smax - S) for a put
where
Smax is the maximum value of underlying asset during the monitoring period.
Smin is the minimum value of underlying asset during the monitoring period.
K is the strike price.
S is the price of underlying asset.
λ, represented by StrikeScaler
, is the degree of
partiality.
Version History
Introduced in R2021bR2022b: Serial date numbers not recommended
Although PartialLookback
supports serial date numbers,
datetime
values are recommended instead. The
datetime
data type provides flexible date and time
formats, storage out to nanosecond precision, and properties to account for time
zones and daylight saving time.
To convert serial date numbers or text to datetime
values, use the datetime
function. For example:
t = datetime(738427.656845093,"ConvertFrom","datenum"); y = year(t)
y = 2021
There are no plans to remove support for serial date number inputs.
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
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)