finpricer
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
Use finpricer
to Create ConzeViswanathan
Pricer
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: [10x1 datetime] Rates: [10x1 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: [1x1 ratecurve] Model: [1x1 finmodel.BlackScholes] SpotPrice: 950 DividendValue: 2.5000 DividendType: "continuous"
Input Arguments
PricerType
— Pricer type
character vector | string
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
— Pricer
pricer object
Pricer, returned as a pricer object.
Version History
Introduced in R2020aR2024a: Added Support for FXDiscount
and RoughVolMonteCarlo
Pricers
finpricer
supports FXDiscount
and
RoughVolMonteCarlo
pricers.
R2023b: Added Support for JarrowYildirim
Pricer
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.
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)