bkvolspec
Specify Black-Karasinski interest-rate volatility process
Syntax
Description
creates a structure specifying the volatility for VolSpec
= bdtvolspec(ValuationDate
,VolDates
,VolCurve
,AlphaDates
,AlphaCurve
)bktree
.
adds the optional argument VolSpec
= bdtvolspec(___,InterpMethod
)InterpMethod
.
Examples
Create a Black-Karasinski Volatility Specification
This example shows how to create a Black-Karasinski volatility specification (VolSpec) using the following data.
ValuationDate = datetime(2004,1,1);
StartDate = ValuationDate;
VolDates = [datetime(2004,12,31) ; datetime(2005,12,31) ; datetime(2006,12,31) ;
datetime(2007,12,31) ];
VolCurve = 0.01;
AlphaDates = datetime(2008,1,1);
AlphaCurve = 0.1;
BKVolSpec = bkvolspec(ValuationDate, VolDates, VolCurve,...
AlphaDates, AlphaCurve)
BKVolSpec = struct with fields:
FinObj: 'BKVolSpec'
ValuationDate: 731947
VolDates: [4x1 double]
VolCurve: [4x1 double]
AlphaCurve: 0.1000
AlphaDates: 733408
VolInterpMethod: 'linear'
Input Arguments
ValuationDate
— Observation date of the investment horizon
datetime scalar | string scalar | date character vector
Observation date of the investment horizon, specified as a scalar datetime, string, or date character vector.
To support existing code, bkvolspec
also
accepts serial date numbers as inputs, but they are not recommended.
VolDates
— Number of points of yield volatility end dates
datetime array | string array | date character vector
Number of points of yield volatility end dates, specified as a
NPOINTS
-by-1
vector using a
datetime array, string array, or date character vectors.
To support existing code, bkvolspec
also
accepts serial date numbers as inputs, but they are not recommended.
VolCurve
— Yield volatility values
decimal
Yield volatility values, specified as a
NPOINTS
-by-1
vector of decimal
values. The term structure of VolCurve
is the yield
volatility represented by the value of the volatility of the yield from time
t
= 0 to time t
+
i, where i is any point within the
volatility curve.
Data Types: double
AlphaDates
— Mean reversion end dates
datetime array | string array | date character vector
Mean reversion end dates, specified as a
NPOINTS
-by-1
vector using a
datetime array, string array, or date character vectors.
To support existing code, bkvolspec
also
accepts serial date numbers as inputs, but they are not recommended.
AlphaCurve
— Positive mean reversion values
positive decimal
Positive mean reversion values, specified as a
NPOINTS
-by-1
vector of positive
decimal values.
Data Types: double
InterpMethod
— Interpolation method
'linear'
(default) | character vector with values supported by
interp1
(Optional) Interpolation method, specified as a character vector with
values supported by interp1
.
Data Types: char
Output Arguments
VolSpec
— Specification for the volatility model for bktree
structure
Structure specifying the volatility model for bktree
.
Version History
Introduced before R2006aR2022b: Serial date numbers not recommended
Although bkvolspec
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.
See Also
bktree
| bkprice
| bktimespec
| interp1
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)