Option Pricing, Numerical Methods, Monte Carlo, Monte Carlo Simulation.
stock price K = 90 # Strike price r = 0.05 # Risk-free interest rate sigma = 0.2 # Volatility T = 1 # Time to expiration (in years) # Run Monte Carlo simulation M = 10000 # Number of simulations payoffs = np.empty(M) for i in range(M): payoffs[i] = monte_carlo(S0, K, r, sigma, T, N) # Estimate