naginterfaces.library.specfun.opt_jumpdiff_merton_price¶
- naginterfaces.library.specfun.opt_jumpdiff_merton_price(calput, x, s, t, sigma, r, lamda, jvol)[source]¶
opt_jumpdiff_merton_price
computes the European option price using the Merton jump-diffusion model.For full information please refer to the NAG Library document for s30ja
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/s/s30jaf.html
- Parameters
- calputstr, length 1
Determines whether the option is a call or a put.
A call; the holder has a right to buy.
A put; the holder has a right to sell.
- xfloat, array-like, shape
must contain , the th strike price, for .
- sfloat
, the price of the underlying asset.
- tfloat, array-like, shape
must contain , the th time, in years, to expiry, for .
- sigmafloat
, the annual total volatility, including jumps.
- rfloat
, the annual risk-free interest rate, continuously compounded. Note that a rate of 5% should be entered as .
- lamdafloat
, the number of expected jumps per year.
- jvolfloat
The proportion of the total volatility associated with jumps.
- Returns
- pfloat, ndarray, shape
contains , the option price evaluated for the strike price at expiry for and .
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: and .
- (errno )
On entry, .
Constraint: and .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: and .
- Notes
opt_jumpdiff_merton_price
uses Merton’s jump-diffusion model (Merton (1976)) to compute the price of a European option. This assumes that the asset price is described by a Brownian motion with drift, as in the Black–Scholes–Merton case, together with a compound Poisson process to model the jumps. The corresponding stochastic differential equation is,Here is the instantaneous expected return on the asset price, ; is the instantaneous variance of the return when the Poisson event does not occur; is a standard Brownian motion; is the independent Poisson process and where is the random variable change in the stock price if the Poisson event occurs and is the expectation operator over the random variable .
This leads to the following price for a European option (see Haug (2007))
where is the time to expiry; is the strike price; is the annual risk-free interest rate; is the Black–Scholes–Merton option pricing formula for a European call (see
opt_bsm_price()
).where is the total volatility including jumps; is the expected number of jumps given as an average per year; is the proportion of the total volatility due to jumps.
The value of a put is obtained by substituting the Black–Scholes–Merton put price for .
The option price is computed for each strike price in a set , , and for each expiry time in a set , .
- References
Haug, E G, 2007, The Complete Guide to Option Pricing Formulas, (2nd Edition), McGraw-Hill
Merton, R C, 1976, Option pricing when underlying stock returns are discontinuous, Journal of Financial Economics (3), 125–144