0

Here is the code I am trying to run:

for(i in 1:(nrow(data)-1))
{
  S = data$Underlying[i]
  Time = data$DaysToExpiry[i]/365
  r = b = 0.04

  price = 67.5
  X=860
  type="c"
  vol = GBSVolatility(price=price, TypeFlag=type, S=S, X=X, Time=Time, r=r, b=b, tol=0.0001, maxiter=1000)
  data$CE860Delta[i] = GBSGreeks(Selection="delta", TypeFlag=type, S=S, X=X, Time=Time, r=r, b=b,   sigma=vol)
}

I was expecting to get volatility

0 Answers0