A Python script using Black-Scholes model to calculate total option premiums for given stock options. Customize with your data and parameters.
Components: Black-Scholes Formula: The calculate_option_premium function implements the Black-Scholes formula, taking into account the current stock price (S), option strike price (K), time to expiration (T), risk-free interest rate (r), and volatility of the underlying asset (sigma). It supports both call and put options.
The Black-Scholes formula is a mathematical model used for calculating the theoretical price of European-style options. The formula for the call option is given by: