finpricer
Create pricing method
Description
creates a Pricer = finpricer(PricerType,Name,Value)Pricer object based on PricerType
creates a pricer object and specifies pricing options using one or more name-value pair
arguments. The available name-value pair arguments depend on the
PricerType you specify.
For more information on the workflow for creating an instrument object, a model object, and a pricer object, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.
For more information on the available instruments, models, and pricing methods, see Choose Instruments, Models, and Pricers.
Examples
This example shows the workflow to create a BlackScholes model and ratecurve object to use with a ConzeViswanathan pricing method.
Create BlackScholes Model Object
Use finmodel to create a BlackScholes model object.
BlackScholesModel = finmodel("BlackScholes",'Volatility',.358)
BlackScholesModel =
BlackScholes with properties:
Volatility: 0.3580
Correlation: 1
Create ratecurve Object
Create a ratecurve object using ratecurve.
Settle = datetime(2020,9,15); Type = 'zero'; ZeroTimes = [calmonths(6) calyears([1 2 3 4 5 7 10 20 30])]'; ZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307]'; ZeroDates = Settle + ZeroTimes; myRC = ratecurve('zero',Settle,ZeroDates,ZeroRates)
myRC =
ratecurve with properties:
Type: "zero"
Compounding: -1
Basis: 0
Dates: [10×1 datetime]
Rates: [10×1 double]
Settle: 15-Sep-2020
InterpMethod: "linear"
ShortExtrapMethod: "next"
LongExtrapMethod: "previous"
Create ConzeViswanathan Pricer Object
Use finpricer to create a ConzeViswanathan pricer object and use the ratecurve object for the 'DiscountCurve' name-value pair argument.
outPricer = finpricer("analytic",'Model',BlackScholesModel,'DiscountCurve',myRC,'SpotPrice',950,'DividendValue',2.5,'DividendType',"continuous",'PricingMethod',"ConzeViswanathan")
outPricer =
ConzeViswanathan with properties:
DiscountCurve: [1×1 ratecurve]
Model: [1×1 finmodel.BlackScholes]
SpotPrice: 950
DividendValue: 2.5000
DividendType: "continuous"
Input Arguments
Pricer type, specified as a scalar string or character vector.
These options are available for interest-rate instruments:
"CMSConvexityHull"— For more information, seeCMSConvexityHull."Discount"— For more information, seeDiscount."Future"— For more information, seeFuture."IRTree"— For more information, seeIRTree."IRMonteCarlo"— For more information, seeIRMonteCarlo."HullWhite"— For more information, seeHullWhite."Analytic"— The"Analytic"pricer can be any one of the following types of pricing methods:
These options are available for inflation instruments:
"Inflation"— For more information, seeInflation."JarrowYildirim"— For more information, seeJarrowYildirim.
These options are available for equity instruments:
"Analytic"— The"Analytic"pricer can be any one of the following types of pricing methods:BlackScholes— For more information, seeBlackScholes.IkedaKunitomo— For more information, seeIkedaKunitomo.HeynenKat— For more information, seeHeynenKat.Heston— For more information, seeHeston.Levy— For more information, seeLevy.KemnaVorst— For more information, seeKemnaVorst.TurnbullWakeman— For more information, seeTurnbullWakeman.ConzeViswanathan— For more information, seeConzeViswanathan.GoldmanSosinGatto— For more information, seeGoldmanSosinGatto.RollGeskeWhaley— For more information, seeRollGeskeWhaley.Rubinstein— For more information, seeRubinstein.Kirk— For more information, seeKirk.BjerksundStensland— For more information, seeBjerksundStensland.
"AssetTree"— For more information, seeAssetTree."AssetMonteCarlo"— For more information, seeAssetMonteCarlo."RoughVolMonteCarlo"— For more information, seeRoughVolMonteCarlo."FiniteDifference"— For more information, seeFiniteDifference."FFT"— For more information, seeFFT."NumericalIntegration"— For more information, seeNumericalIntegration."VannaVolga"— For more information, seeVannaVolga."ReplicatingVarianceSwap"— For more information, seeReplicatingVarianceSwap."FXDiscount"— For more information, seeFXDiscount."Future"— For more information, seeFuture.
These options are available for credit derivative instruments:
Data Types: string | char
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: Pricer = finpricer("Black",Name,Value)
Depending on the PricerType, the associated name-value pair
arguments are different.
IRTree— For more information, see Name-Value Arguments.IRMonteCarlo— For more information, see Name-Value Arguments.Black— For more information, see Name-Value Arguments.CMSConvexityHull— For more information, see Name-Value Arguments.HullWhite— For more information, see Name-Value Arguments.Normal— For more information, see Name-Value Arguments.Sabr— For more information, see Name-Value Arguments.Discount— For more information, see Name-Value Arguments.Future— For more information, see Name-Value Arguments.
Inflation— For more information, see Name-Value Arguments.JarrowYildirim— For more information, see Name-Value Arguments.
Levy— For more information, see Name-Value Arguments.KemnaVorst— For more information, see Name-Value Arguments.TurnbullWakeman— For more information, see Name-Value Arguments.BlackScholes— For more information, see Name-Value Arguments.IkedaKunitomo— For more information, see Name-Value Arguments.HeynenKat— For more information, see Name-Value Arguments.Heston— For more information, see Name-Value Arguments.ConzeViswanathan— For more information, see Name-Value Arguments.GoldmanSosinGatto— For more information, see Name-Value Arguments.Rubinstein— For more information, see Name-Value Arguments.RollGeskeWhaley— For more information, see Name-Value Arguments.Kirk— For more information, see Name-Value Arguments.BjerksundStensland— For more information, see Name-Value Arguments.AssetMonteCarlo— For more information, see Name-Value Arguments.RoughVolMonteCarlo— For more information, see Name-Value Arguments.AssetTree— For more information, see Name-Value Arguments.FiniteDifference— For more information, see Name-Value Arguments.FFT— For more information, see Name-Value Arguments.NumericalIntegration— For more information, see Name-Value Arguments.VannaVolga— For more information, see Name-Value Arguments.ReplicatingVarianceSwap— For more information, see Name-Value Arguments.FXDiscount— For more information, see Name-Value Arguments.Future— For more information, see Name-Value Arguments.
Credit— For more information, see Name-Value Arguments.CDSBlack— For more information, see Name-Value Arguments.
Output Arguments
Pricer, returned as a pricer object.
Version History
Introduced in R2020afinpricer supports FXDiscount and
RoughVolMonteCarlo
pricers.
finpricer supports a JarrowYildirim
pricer.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- 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)