| Library: | finance |
| See also: | mcmillan |
| Macro: | bs1 | |
| Description: | calculates option prices using the Black and Scholes formula |
| Usage: | {opvv,sel,ingred} = bs1(task) | |
| Input: | ||
| task | scalar , =1 without dividend =2 with continuously paid dividend =3 with a fixed dividend at the end of T =4 if for exchange rate | |
| Output: | ||
| opvv | scalar , value of the option | |
| sel | 2 x 1 vector , if sel[1]=1 'call', else 'put' | |
| ingred | 6 x 1 vector , stock price, strike price, time of expiration, volatility, domain interest rate, dividend | |
see optstart
option price using Black and Scholes formula
| Library: | finance |
| See also: | mcmillan |