BSOption Procedure |
@BSOPTION computes the value of a European call or put option using the Black-Scholes formula.
@BSOption( options ) value
Parameters
|
value |
(output) value of the option |
Options
PRICE=current price of the stock
STRIKE=strike price
EXPIRE=time to expiration (in fractions of a year) [1.0]
RATE=riskless interest rate (annual) [0.05]
SIGMA=volatility (annualized) [.20]
CASHFLOW=cash flow rate from security (annual rate) [0.0]
Example
The procedure doesn't display any direct output. The computed value is in the value parameter. In this example, values are computed for two call and two put options and displayed.
*
* Tsay, Analysis of Financial Time Series, 3rd edition
* Examples 6.5 and 6.6 from pp 302-303
*
* Example 6.5
*
@BSoption(price=80,sigma=.20,rate=.08,strike=90,expire=.25) callvalue
@BSoption(price=80,sigma=.20,rate=.08,strike=90,expire=.25,put) putvalue
disp "Example 6.5" *.## "Call" callvalue "Put" putvalue
*
* Example 6.6
*
@BSoption(price=80,sigma=.20,rate=.08,strike=81,expire=.25) callvalue
@BSoption(price=80,sigma=.20,rate=.08,strike=81,expire=.25,put) putvalue
disp "Example 6.6" *.## "Call" callvalue "Put" putvalue
Copyright © 2025 Thomas A. Doan