dblbarrierbybls
Price European double barrier options using Black-Scholes option pricing model
Syntax
Description
calculates European double barrier option prices using the Black-Scholes option
pricing model and the Ikeda and Kunitomo approximation.Price
= dblbarrierbybls(RateSpec
,StockSpec
,OptSpec
,Strike
,Settle
,ExerciseDates
,BarrierSpec
,Barrier
)
Note
Alternatively, you can use the DoubleBarrier
object to price double barrier options. For more
information, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.
specifies options using one or more name-value pair arguments in addition to the
input arguments in the previous syntax.Price
= dblbarrierbybls(___,Name,Value
)
Examples
Price a European Double Knock-Out Call Option
Compute the price of a European for a double knock-out (down and out-up and out) call option using the following data:
Rate = 0.05; Settle = datetime(2018,6,1); Maturity = datetime(2018,12,1); Basis = 1;
Define a RateSpec
.
RateSpec = intenvset('ValuationDate', Settle, 'StartDates', Settle, 'EndDates', Maturity,'Rates', Rate, 'Compounding', -1, 'Basis', Basis);
Define a StockSpec
.
AssetPrice = 100; Volatility = 0.25; StockSpec = stockspec(Volatility, AssetPrice);
Define the double barrier option.
LBarrier = 80; UBarrier = 130; Barrier = [UBarrier LBarrier]; BarrierSpec = 'DKO'; OptSpec = 'Call'; Strike = 110;
Compute price of option using flat boundaries.
PriceFlat = dblbarrierbybls(RateSpec, StockSpec, OptSpec, Strike, Settle, Maturity, BarrierSpec, Barrier)
PriceFlat = 1.1073
Compute price of option using two curved boundaries.
Curvature = [0.05 -0.05];
PriceCurved = dblbarrierbybls(RateSpec, StockSpec, OptSpec, Strike, Settle, Maturity, BarrierSpec, Barrier, 'Curvature', Curvature)
PriceCurved = 1.4548
Input Arguments
StockSpec
— Stock specification for underlying asset
structure
Stock specification for the underlying asset, specified by the
StockSpec
obtained from stockspec
.
stockspec
handles several
types of underlying assets. For example, for physical commodities the price
is StockSpec.Asset
, the volatility is
StockSpec.Sigma
, and the convenience yield is
StockSpec.DividendAmounts
.
Data Types: struct
OptSpec
— Definition of option
cell array of character vectors with values 'call'
or
'put'
| string array with values "call"
or
"put"
Definition of the option as 'call'
or
'put'
, specified as a
NINST
-by-1
cell array of character
vectors or string array with values 'call'
or
'put'
or "call"
or
"put"
.
Data Types: char
| cell
| string
Strike
— Option strike price value
matrix
Option strike price value, specified as an
NINST
-by-1
matrix of numeric
values, where each row is the schedule for one option.
Data Types: double
Settle
— Settlement or trade date
datetime array | string array | date character vector
Settlement or trade date for the double barrier option, specified as an
NINST
-by-1
vector using a datetime
array, string array, or date character vectors.
To support existing code, dblbarrierbybls
also
accepts serial date numbers as inputs, but they are not recommended.
ExerciseDates
— Option exercise dates
datetime array | string array | date character vector
Option exercise dates, specified as an
NINST
-by-1
vector using a datetime
array, string array, or date character vectors.
Note
For a European option, the option expiry date has only one
ExerciseDates
value, which is the maturity of
the instrument.
To support existing code, dblbarrierbybls
also
accepts serial date numbers as inputs, but they are not recommended.
BarrierSpec
— Double barrier option type
cell array of character vectors with values of 'DKI'
or 'DKO'
| string array with values of "DKI"
or
"DKO"
Double barrier option type, specified as an
NINST
-by-1
cell array of character
vectors or string array with the following values:
'DKI'
— Double Knock-InThe
'DKI'
option becomes effective when the price of the underlying asset reaches one of the barriers. It gives the option holder the right but not the obligation to buy or sell the underlying security at the strike price, if the underlying asset goes above or below the barrier levels during the life of the option.'DKO'
— Double Knock-OutThe
'DKO'
option gives the option holder the right but not the obligation to buy or sell the underlying security at the strike price, as long as the underlying asset remains between the barrier levels during the life of the option. This option terminates when the price of the underlying asset passes one of the barriers.
Option | Barrier Type | Payoff If Any Barrier Crossed | Payoff If Barriers Not Crossed |
---|---|---|---|
Call/Put | Double Knock-in | Standard Call/Put | Worthless |
Call/Put | Double Knock-out | Worthless | Standard Call/Put |
Data Types: char
| cell
| string
Barrier
— Double barrier value
numeric
Double barrier value, specified as
NINST
-by-1
matrix of numeric
values, where each element is a 1
-by-2
vector where the first column is Barrier(1)(UB) and the second column is
Barrier(2)(LB). Barrier(1) must be greater than Barrier(2).
Data Types: double
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: Price =
dblbarrierbybls(RateSpec,StockSpec,OptSpec,Strike,Settle,Maturity,BarrierSpec,Barrier,'Curvature',[1,5])
Curvature
— Curvature levels of the upper and lower barriers
[]
(default) | matrix
Curvature levels of the upper and lower barriers, specified as the
comma-separated pair consisting of 'Curvature'
and an
NINST
-by-1
matrix, where each
element is a 1
-by-2
vector. The
first column is the upper barrier curvature (d1) and
the second column is the lower barrier curvature
(d2).
d1 = d2 =
0
corresponds to two flat boundaries.d1 < 0 < d2 corresponds to an exponentially growing lower boundary and an exponentially decaying upper boundary.
d1 > 0 > d2 corresponds to a convex downward lower boundary and a convex upward upper boundary.
Data Types: double
Output Arguments
Price
— Expected prices for double barrier options
matrix
Expected prices for double barrier options at time 0, returned as a
NINST
-by-1
matrix.
More About
Double Barrier Option
A double barrier option is similar to the
standard single barrier option except that it has two barrier levels: a lower
barrier (LB
) and an upper barrier (UB
).
The payoff for a double barrier option depends on whether the underlying asset remains between the barrier levels during the life of the option. Double barrier options are less expensive than single barrier options as they have a higher knock-out probability. Because of this, double barrier options allow investors to reduce option premiums and match an investor’s belief about the future movement of the underlying price process.
Ikeda and Kunitomo Approximation
The analytical formulas of Ikeda and Kunitomo approach pricing as constrained by curved boundaries.
This approach has the advantage of covering barriers that are flat, have exponential growth or decay, or are concave. The Ikeda and Kunitomo model for pricing double barrier options focuses on calculating double knock-out barriers.
References
[1] Hull, J. Options, Futures, and Other Derivatives. Fourth Edition. Upper Saddle River, NJ: Prentice Hall, 2000.
[2] Kunitomo, N., and M. Ikeda. “Pricing Options with Curved Boundaries.” Mathematical Finance. Vol. 2, Number 4, 1992.
[3] Rubinstein, M., and E. Reiner. “Breaking Down the Barriers.” Risk. Vol. 4, Number 8, 1991, pp. 28–35.
Version History
Introduced in R2019aR2022b: Serial date numbers not recommended
Although dblbarrierbybls
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.
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは 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)