Black-Scholes Call Vega in VBA

Here is a VBA function that easily allows you to calculate the Black-Scholes vega on any call option.



Function CallVega(StockPrice As Double, StrikePrice As Double, TimeToExpiration As Double, Volatility As Double, RiskFreeRate As Double, DividendYield As Double)
    
    Dim d(1) As Double

    d(1) = (Log(StockPrice / StrikePrice) + (RiskFreeRate - DividendYield + (Volatility ^ 2) / 2) * TimeToExpiration) / (Volatility * Sqr(TimeToExpiration))

    CallVega = StockPrice * Exp(-DividendYield * TimeToExpiration) * (1 / (Sqr(2 * Application.Pi())) * Exp(-(d(1) ^ 2) / 2)) * Sqr(TimeToExpiration)

End Function