lookbacksensbycvgsg
Calculate prices or sensitivities of European lookback options using Conze-Viswanathan and Goldman-Sosin-Gatto models
Syntax
Description
returns prices or sensitivities of European lookback options using Conze-Viswanathan and
Goldman-Sosin-Gatto models. PriceSens
= lookbacksensbycvgsg(RateSpec
,StockSpec
,OptSpec
,Strike
,Settle
,ExerciseDates
)lookbacksensbycvgsg
calculates prices of
European fixed- and floating-strike lookback options. To compute the value of a
floating-strike lookback option, Strike
must be specified as
NaN
. The Goldman-Sosin-Gatto model is used for floating-strike
lookback options. The Conze-Viswanathan model is used for fixed-strike lookback
options.
adds optional name-value pair arguments.PriceSens
= lookbacksensbycvgsg(___,Name,Value
)
Examples
Compute the Price and Delta of a Floating Lookback Option Using the Goldman-Sosin-Gatto Model
Define the RateSpec
.
StartDates = 'Jan-1-2013'; EndDates = 'Jan-1-2014'; Rates = 0.41; Compounding = -1; RateSpec = intenvset('ValuationDate', StartDates, 'StartDates', StartDates,... 'EndDates', EndDates, 'Rates', Rates,'Compounding', Compounding)
RateSpec = struct with fields:
FinObj: 'RateSpec'
Compounding: -1
Disc: 0.6637
Rates: 0.4100
EndTimes: 1
StartTimes: 0
EndDates: 735600
StartDates: 735235
ValuationDate: 735235
Basis: 0
EndMonthRule: 1
Define the StockSpec
with continuous dividend yield.
AssetPrice = 120;
Sigma = 0.3;
Yield = 0.045;
StockSpec = stockspec(Sigma, AssetPrice, 'Continuous', Yield)
StockSpec = struct with fields:
FinObj: 'StockSpec'
Sigma: 0.3000
AssetPrice: 120
DividendType: {'continuous'}
DividendAmounts: 0.0450
ExDividendDates: []
Define the floating lookback option.
Settle = 'Jan-1-2013'; Maturity = 'July-1-2013'; OptSpec = 'call'; Strike = NaN; SMinMax = 100;
Compute the price and delta of the European floating lookback option.
OutSpec = {'price', 'delta'}; [Price, Delta] = lookbacksensbycvgsg(RateSpec, StockSpec, OptSpec, Strike,... Settle, Maturity,'AssetMinMax', SMinMax, 'OutSpec', OutSpec)
Price = 36.9926
Delta = 0.8659
Compute the Price and Delta of a Fixed Lookback Option Using the Conze-Viswanathan Model
Define the RateSpec
.
StartDates = 'Jan-1-2013'; EndDates = 'Jan-1-2015'; Rates = 0.1; Compounding = -1; RateSpec = intenvset('ValuationDate', StartDates, 'StartDates', StartDates,... 'EndDates', EndDates, 'Rates', Rates,'Compounding', Compounding)
RateSpec = struct with fields:
FinObj: 'RateSpec'
Compounding: -1
Disc: 0.8187
Rates: 0.1000
EndTimes: 2
StartTimes: 0
EndDates: 735965
StartDates: 735235
ValuationDate: 735235
Basis: 0
EndMonthRule: 1
Define the StockSpec
.
AssetPrice = 103; Sigma = 0.30; StockSpec = stockspec(Sigma, AssetPrice)
StockSpec = struct with fields:
FinObj: 'StockSpec'
Sigma: 0.3000
AssetPrice: 103
DividendType: []
DividendAmounts: 0
ExDividendDates: []
Define the fixed lookback option.
Settle = 'Jan-1-2013'; Maturity = 'July-1-2013'; OptSpec = 'call'; Strike = 99;
Price and delta for the European fixed lookback option.
OutSpec = {'price', 'delta'}; [Price, Delta] = lookbacksensbyls(RateSpec, StockSpec, OptSpec,... Strike, Settle, Maturity,'OutSpec', OutSpec)
Price = 22.7227
Delta = 1.1349
Input Arguments
StockSpec
— Stock specification for underlying asset
structure
Stock specification for the underlying asset. For information on the stock
specification, see stockspec
.
stockspec
handles several types of
underlying assets. For example, for physical commodities the price is represented by
StockSpec.Asset
, the volatility is represented by
StockSpec.Sigma
, and the convenience yield is represented by
StockSpec.DividendAmounts
.
Data Types: struct
OptSpec
— Definition of option
character vector with values 'call'
or
'put'
| cell array of character vectors
Definition of option as 'call'
or 'put'
,
specified as a NINST
-by-1
cell array of character
vectors.
Data Types: char
| cell
Strike
— Option strike price values
integer | vector of integers
Option strike price values, specified as an integer using a
NINST
-by-1
vector of strike price values.
Data Types: single
| double
Settle
— Settlement or trade date
serial date number | vector of serial date numbers | date character vector | cell array of character vectors
Settlement or trade date for the lookback option, specified as date character
vectors or as serial date numbers using a
NINST
-by-1
vector or cell array of character
vector dates.
Data Types: double
| char
| cell
ExerciseDates
— European option expiry date
serial date number | vector of serial date numbers | date character vector | cell array of character vectors
European option expiry date, specified as date character vectors or as serial date
numbers using a NINST
-by-1
vector or cell array of
dates.
Data Types: double
| char
| cell
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: PriceSens =
lookbacksensbycvgsg(RateSpec,StockSpec,OptSpec,Strike,Settle,ExerciseDates,'AssetMinMax',AssetMinMax,'OutSpec',{'All'})
AssetMinMax
— Maximum or minimum underlying asset price
if unspecified, the lookback option is newly issued, and
AssetMinMax
= StockSpec.AssetPrice
(default) | nonnegative integer
Maximum or minimum underlying asset price, specified as a
NINST
-by-1
vector.
Data Types: single
| double
OutSpec
— Define outputs
{'Price'}
(default) | character vector with values 'Price'
,
'Delta'
, 'Gamma'
, 'Vega'
,
'Lambda'
, 'Rho'
, 'Theta'
,
and 'All'
| cell array of character vectors with values 'Price'
,
'Delta'
, 'Gamma'
, 'Vega'
,
'Lambda'
, 'Rho'
, 'Theta'
,
and 'All'
Define outputs, specified as the comma-separated pair consisting of
'OutSpec'
and a NOUT
- by-1
or a 1
-by-NOUT
cell array of character vectors
with possible values of 'Price'
, 'Delta'
,
'Gamma'
, 'Vega'
, 'Lambda'
,
'Rho'
, 'Theta'
, and
'All'
.
OutSpec = {'All'}
specifies that the output should be
Delta
, Gamma
, Vega
,
Lambda
, Rho
, Theta
, and
Price
, in that order. This is the same as specifying
OutSpec
to include each sensitivity.
Example: OutSpec =
{'delta','gamma','vega','lambda','rho','theta','price'}
Data Types: char
| cell
Output Arguments
PriceSens
— Expected prices or sensitivities of lookback option
vector
Expected prices or sensitivities (defined by OutSpec
) of the
lookback option, returned as a NINST
-by-1
vector.
More About
Lookback Option
A lookback option is a path-dependent option based on the maximum or minimum value the underlying asset achieves during the entire life of the option.
Financial Instruments Toolbox™ software supports two types of lookback options: fixed and floating. Fixed lookback options have a specified strike price, while floating lookback options have a strike price determined by the asset path. For more information, see Lookback Option.
References
[1] Hull, J. C. Options, Futures, and Other Derivatives 5th Edition. Englewood Cliffs, NJ, Prentice Hall, 2002.
Version History
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes 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)