Matlab class that lets you easily display the price and greeks graphs for an European call or put option under the Black-Scholes model.
Instantiate the Matlab class by passing as arguments:
- the current asset price,
- the strike price,
- the annualized risk-free interest rate,
- the time to expiration in years,
- the annualized asset return volatility
- and the type of option ('call' or 'put').
For example:
callOption = blsEuropeanOption(100, 130, 0.05, 1, 0.2, 'Call');
Now it is possible to execute a method on the object callOption
to generate the graph of the option price:
callOption.showPrice();
Similarly, we can execute methods to display the graph of the greeks:
callOption.showDelta();
callOption.showGamma();
callOption.showVega();
callOption.showTheta();
callOption.showRho();