Delta vs Stock Price import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.stats import norm # Black-Scholes model for calculating option price and delta def…
Generate a 3D plot import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from scipy.stats import norm def black_scholes_merton(S, K, T, r, sigma, option_type): d1 = (np.log(S…
Pricing European Put Option # Pricing European Put Option import numpy as np import matplotlib.pyplot as plt def binomial_option_pricing(S, K, T, r, sigma, n, option_type): delta_t = T / n…