Monte Carlo Pip Setup
pip install using:
pip install mc-option-simulator-yale
import the module using:
from montecarlo.MonteCarloSimulation import MonteCarloSimulation
classes:
class MonteCarloSimulation:
Methods belong to MonteCarloSimulation
def __init__(self, stock_value, strike, volatility):
self.stock_value = stock_value
self.risk_free_interest = RISK_FREE_INTEREST
self.strike = strike
self.sigma = volatility
self.delta_time = DELTA_TIME
self.T = TIME
self.steps = steps
self.simulations = simulations
self.payoffs = []
def Geometric_Brownian_Motion(self, option_type="call"):
def Black_Scholes(self, option_type="call".lower())
Full class and method details omitted, refer to the code to see full implementation.