Your question is Black-Scholes European Call Pricing. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Implement a function to calculate the Black-Scholes price of a European call option.
Use continuous compounding and the standard normal cumulative distribution function. Return the option price as a floating-point number.
Signature: def black_scholes_call(S, K, T, r, sigma):
Inputs are spot price S, strike price K, time to expiration T in years, continuously compounded risk-free rate r, and volatility sigma. Define the price at T = 0 as max(S - K, 0), and handle sigma = 0 using its deterministic limit.
def black_scholes_call(S, K, T, r, sigma):