Implement-Option-Pricing-Model-using-Python
Implement-Option-Pricing-Model-using-Python copied to clipboard
Simulated GBM using MC simulation, estimated option' Greeks using numerical methods such as finite difference, pathwise derivative estimate and likelihood ratio methods. Lastly, implemented binomial t...
Implement Option Pricing Model using Python
This repository contains all my personal projects Option Pricing Model using Python.
1. Pricing of vanilla options in the Black-Scholes world and Monte Carlo Simulation.ipynb
This notebook is a simple Python's implemention of analytical formulas of vanilla options including European and America call and put options. It also contains formulas of binary put, call and forward contract.
We started with testing their consistencies to determine their correctness including put-call parity and relationship among all paramters in the Black-Scholes model.
Then we validated all formulas using the Monte Carlo method. The following is a plot of using Monte-Carlo method to price European put, call and binary put, call options.

We also implemented Euler-Maruyama method to simulate the dynamic of stock price under Geometric Brownian Motion Stochastic Differential Equation. The following is a plot its simulation.

2. Vanilla Greeks using finite difference, pathwise derivative estimate and likelihood ratio methods.ipynb
This notebook performs sensitivity analysis on options' value by applying finite difference and Monte Carlo methods. We also implemented numerical methods such as pathwise derivative estimate and likelihood ratio methods to approximate option's greeks.
For example, to calculate delta of an European call option, pathwise derivative estimate asserts that
On the other hand, the likelihood ratio method asserts that
4. Option_Pricing_using_CRR_and_Discrete_Geometric_Brownian_Motion_Binomial_Trees.ipynb
This notebook uses various binomial trees simulation including CRR and discretize GBM to price options. The following plots contain convergence of CRR and GBM simulations for European and Binary call and put options. Green line is the analytical pricing obtained by Black-Scholes.
The parameters are spot = 100, strike = 100, volatility = 0.1, risk-free interest rate = 0.05, dividend = 0 and time to maturity = 2.
For BS price at both American call and put options, the green line corresponds to the respective European call and put option. Since dividend is zero, both American and European call should worth the same, which is illustrated in the American call plot below.
