Compute the value of both a call and a put option in a Black and Scholes framework (with both constant riskless interest rate and volatility)
[C,P]=bsoption(S,K,r,T,sigma);
Compute the Black and Scholes value of both a call and a put option
current price of the underlying asset
strike price of the option
We assume that an option (either call or put) is written on an asset whose value is 25 euros, with a strike price of 25 euros. If the (annual) riskless interest rate is 0.001, the time to maturity is 3 months, and the (annual) volatility of the underlying (log-) returns is 0.22, then the value of the call and the put options are computed as follows.
-->[C,P]=bsoption(25,25,0.001,3/12,0.22)
P = 1.0932796
C = 1.0995288
Francesco Menoncin - Brescia University - 2010