# price

Compute price for equity instrument with FFT pricer

Since R2020a

## Description

[Price,PriceResult] = price(inpPricer,inpInstrument) computes the instrument price and related pricing information based on the pricing object inpPricer and the instrument object inpInstrument.

example

[Price,PriceResult] = price(___,inpSensitivity) adds an optional argument to specify sensitivities.

example

## Examples

collapse all

This example shows the workflow to price a Vanilla instrument when you use a Heston model and an FFT pricing method.

Create Vanilla Instrument Object

Use fininstrument to create a Vanilla instrument object.

VanillaOpt = fininstrument("Vanilla",'ExerciseDate',datetime(2022,9,15),'Strike',105,'ExerciseStyle',"european",'Name',"vanilla_option")
VanillaOpt =
Vanilla with properties:

OptionType: "call"
ExerciseStyle: "european"
ExerciseDate: 15-Sep-2022
Strike: 105
Name: "vanilla_option"

Create Heston Model Object

Use finmodel to create a Heston model object.

HestonModel = finmodel("Heston",'V0',0.032,'ThetaV',0.1,'Kappa',0.003,'SigmaV',0.2,'RhoSV',0.9)
HestonModel =
Heston with properties:

V0: 0.0320
ThetaV: 0.1000
Kappa: 0.0030
SigmaV: 0.2000
RhoSV: 0.9000

Create ratecurve Object

Create a flat ratecurve object using ratecurve.

Settle = datetime(2018,9,15);
Maturity = datetime(2023,9,15);
Rate = 0.035;
myRC = ratecurve('zero',Settle,Maturity,Rate,'Basis',12)
myRC =
ratecurve with properties:

Type: "zero"
Compounding: -1
Basis: 12
Dates: 15-Sep-2023
Rates: 0.0350
Settle: 15-Sep-2018
InterpMethod: "linear"
ShortExtrapMethod: "next"
LongExtrapMethod: "previous"

Create FFT Pricer Object

Use finpricer to create an FFT pricer object and use the ratecurve object for the 'DiscountCurve' name-value pair argument.

outPricer = finpricer("fft",'DiscountCurve',myRC,'Model',HestonModel,'SpotPrice',100,'CharacteristicFcnStep', 0.2,'NumFFT',2^13)
outPricer =
FFT with properties:

Model: [1x1 finmodel.Heston]
DiscountCurve: [1x1 ratecurve]
SpotPrice: 100
DividendType: "continuous"
DividendValue: 0
NumFFT: 8192
CharacteristicFcnStep: 0.2000
LogStrikeStep: 0.0038
CharacteristicFcn: @characteristicFcnHeston
DampingFactor: 1.5000
LittleTrap: 1

Price Vanilla Instrument

Use price to compute the price and sensitivities for the Vanilla instrument.

[Price, outPR] = price(outPricer,VanillaOpt,["all"])
Price =
14.7545
outPR =
priceresult with properties:

Results: [1x7 table]
PricerData: []

outPR.Results
ans=1×7 table
Price      Delta      Gamma       Theta       Rho       Vega     VegaLT
______    _______    ________    ________    ______    ______    ______

14.754    0.44868    0.021649    -0.20891    120.45    88.192    1.3248

## Input Arguments

collapse all

Pricer object, specified as a scalar FFT pricer object. Use finpricer to create the FFT pricer object.

Data Types: object

Instrument object, specified as a scalar or vector of Vanilla instrument objects. Use fininstrument to create Vanilla instrument objects.

Data Types: object

(Optional) List of sensitivities to compute, specified as a NOUT-by-1 or a 1-by-NOUT cell array of character vectors or string array with possible values of 'Price', 'Delta', 'Gamma', 'Vega', 'Rho', 'Theta', 'Vegalt', and 'All'.

Note

For a Vanilla instrument using a Heston model, 'Vegalt' is not supported.

inpSensitivity = {'All'} or inpSensitivity = ["All"] specifies that the output is 'Delta', 'Gamma', 'Vega', 'Rho', 'Theta', 'Vegalt', and 'Price'. This is the same as specifying inpSensitivity to include each sensitivity.

Example: inpSensitivity = {'delta','gamma','vega','rho','theta','vegalt','price'}

Data Types: string | cell

## Output Arguments

collapse all

Instrument price, returned as a numeric.

Price result, returned as a PriceResult object. The object has the following fields:

• PriceResult.Results — Table of results that includes sensitivities (if you specify inpSensitivity)

• PriceResult.PricerData — Structure for pricer data

collapse all

### Delta

A delta sensitivity measures the rate at which the price of an option is expected to change relative to a \$1 change in the price of the underlying asset.

Delta is not a static measure; it changes as the price of the underlying asset changes (a concept known as gamma sensitivity), and as time passes. Options that are near the money or have longer until expiration are more sensitive to changes in delta.

### Gamma

A gamma sensitivity measures the rate of change of an option's delta in response to a change in the price of the underlying asset.

In other words, while delta tells you how much the price of an option might move, gamma tells you how fast the option's delta itself will change as the price of the underlying asset moves. This is important because this helps you understand the convexity of an option's value in relation to the underlying asset's price.

### Vega

A vega sensitivity measures the sensitivity of an option's price to changes in the volatility of the underlying asset.

Vega represents the amount by which the price of an option would be expected to change for a 1% change in the implied volatility of the underlying asset. Vega is expressed as the amount of money per underlying share that the option's value will gain or lose as volatility rises or falls.

### Theta

A theta sensitivity measures the rate at which the price of an option decreases as time passes, all else being equal.

Theta is essentially a quantification of time decay, which is a key concept in options pricing. Theta provides an estimate of the dollar amount that an option's price would decrease each day, assuming no movement in the price of the underlying asset and no change in volatility.

### Rho

A rho sensitivity measures the rate at which the price of an option is expected to change in response to a change in the risk-free interest rate.

Rho is expressed as the amount of money an option's price would gain or lose for a one percentage point (1%) change in the risk-free interest rate.

### Vegalt

A vegalt sensitivity measures the sensitivity of an option's price to changes in the long-term volatility of the underlying asset.

## Version History

Introduced in R2020a