crodriguezvega / black-scholes-european-option

European option price and greeks graphs in Black-Scholes model using Matlab.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

European option price and greeks using Matlab

Matlab class that lets you easily display the price and greeks graphs for an European call or put option under the Black-Scholes model.

Usage

Instantiate the Matlab class by passing as arguments:

  1. the current asset price,
  2. the strike price,
  3. the annualized risk-free interest rate,
  4. the time to expiration in years,
  5. the annualized asset return volatility
  6. 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();

Alt text

Similarly, we can execute methods to display the graph of the greeks:

callOption.showDelta();

Alt text

callOption.showGamma();

Alt text

callOption.showVega();

Alt text

callOption.showTheta();

Alt text

callOption.showRho();

Alt text

About

European option price and greeks graphs in Black-Scholes model using Matlab.


Languages

Language:MATLAB 100.0%