Options calculation

#1
I am trying to make an option price calculator.

Can anyone please guide me on what is N for the calculations for Nifty and how to calculate that.

Thank you.
//----------------------------------------------------------------

The options price for a Call, computed as per the following Black Scholes formula:
C = S * N (d1) - X * e- rt * N (d2)

and the price for a Put is : P = X * e- rt * N (-d2) - S * N (-d1)

where :
d1 = [ln (S / X) + (r + σ2 / 2) * t] / σ * sqrt(t)
d2 = [ln (S / X) + (r - σ2 / 2) * t] / σ * sqrt(t)
= d1 - σ * sqrt(t)

C = price of a call option
P = price of a put option
S = price of the underlying asset
X = Strike price of the option
r = rate of interest
t = time to expiration
σ = volatility of the underlying

N represents a standard normal distribution with mean = 0 and standard deviation = 1
ln represents the natural logarithm of a number. Natural logarithms are based on the constant e (2.71828182845904).
 

Similar threads