naginterfaces.library.specfun.opt_amer_bs_price¶
- naginterfaces.library.specfun.opt_amer_bs_price(calput, x, s, t, sigma, r, q)[source]¶
opt_amer_bs_price
computes the Bjerksund and Stensland (2002) approximation to the price of an American option.For full information please refer to the NAG Library document for s30qc
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/s/s30qcf.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 volatility of the underlying asset. Note that a rate of 15% should be entered as .
- rfloat
, the annual risk-free interest rate, continuously compounded. Note that a rate of 5% should be entered as .
- qfloat
, the annual continuous yield rate. Note that a rate of 8% should be entered as .
- 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, and .
Constraint: .
- Notes
opt_amer_bs_price
computes the price of an American option using the closed form approximation of Bjerksund and Stensland (2002). The time to maturity, , is divided into two periods, each with a flat early exercise boundary, by choosing a time , such that . The two boundary values are defined as , withwhere
with , the cost of carry, where is the risk-free interest rate and is the annual dividend rate. Here is the strike price and is the annual volatility.
The price of an American call option is approximated as
where , and are as defined in Bjerksund and Stensland (2002).
The price of a put option is obtained by the put-call transformation,
The option price is computed for each strike price in a set , , and for each expiry time in a set , .
- References
Bjerksund, P and Stensland, G, 2002, Closed form valuation of American options (Discussion Paper 2002/09), NHH Bergen Norway
Genz, A, 2004, Numerical computation of rectangular bivariate and trivariate Normal and probabilities, Statistics and Computing (14), 151–160