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
.
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
."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
."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 IRTree Name-Value Pair Arguments.IRMonteCarlo
— For more information, see IRMonteCarlo Name-Value Arguments.Black
— For more information, see Black Name-Value Pair Arguments.CMSConvexityHull
— For more information, see CMSConvexityHull Name-Value Pair Arguments.HullWhite
— For more information, see HullWhite Name-Value Pair Arguments.Normal
— For more information, see Normal Name-Value Pair Arguments.Sabr
— For more information, see SABR Name-Value Pair Arguments.Discount
— For more information, see Discount Name-Value Pair Arguments.Future
— For more information, see Future Name-Value Pair Arguments.
Inflation
— For more information, see Inflation Name-Value Pair Arguments.
Levy
— For more information, see Levy Name-Value Pair Arguments.KemnaVorst
— For more information, see KemnaVorst Name-Value Pair Arguments.TurnbullWakeman
— For more information, see TurnbullWakeman Name-Value Pair Arguments.BlackScholes
— For more information, see BlackScholes Name-Value Pair Arguments.IkedaKunitomo
— For more information, see IkedaKunitomo Name-Value Pair Arguments.HeynenKat
— For more information, see HeynenKat Name-Value Arguments.Heston
— For more information, see Heston Name-Value Pair Arguments.ConzeViswanathan
— For more information, see ConzeViswanathan Name-Value Pair Arguments.GoldmanSosinGatto
— For more information, see GoldmanSosinGatto Name-Value Pair Arguments.Rubinstein
— For more information, see Rubinstein Name-Value Pair Arguments.RollGeskeWhaley
— For more information, see RollGeskeWhaley Name-Value Pair Arguments.Kirk
— For more information, see Kirk Name-Value Pair Arguments.BjerksundStensland
— For more information, see BjerksundStensland Name-Value Pair Arguments.AssetMonteCarlo
— For more information, see AssetMonteCarlo Name-Value Pair Arguments.AssetTree
— For more information, see AssetTree Name-Value Pair Arguments.FiniteDifference
— For more information, see FiniteDifference Name-Value Pair Arguments.FFT
— For more information, see FFT Name-Value Pair Arguments.NumericalIntegration
— For more information, see NumericalIntegration Name-Value Pair Arguments.VannaVolga
— For more information, see Required VannaVolga Name-Value Pair Arguments.ReplicatingVarianceSwap
— For more information, see ReplicatingVarianceSwap Name-Value Pair Arguments.Future
— For more information, see Future Name-Value Pair Arguments.
Credit
— For more information, see Credit Name-Value Pair Arguments.CDSBlack
— For more information, see CDSBlack Name-Value Pair Arguments.
Output Arguments
Pricer
— Pricer
pricer object
Pricer, returned as a pricer object.
Version History
Introduced in R2020a
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)