[R-SIG-Finance] GBSVolatility not working on vectors?

Shivam shivamsingh at gmail.com
Thu Sep 25 14:17:35 CEST 2014


Hi Joachim,

Somehow I am not able to replicate your data in my workspace. But I
would like to suggest you to try the below:

> dtemp$iva  <- Vectorize(GBSVolatility)(price = dtemp$ask, TypeFlag = dtemp$cp,
S = dtemp$c , X = dtemp$strike, Time = dtemp$ntd / 253.8,
r = pmax(dtemp$rb, 0), b = pmax(dtemp$rb, 0))

Hope it helps.

Regards,
Shivam

-- 
*Victoria Concordia Crescit*



More information about the R-SIG-Finance mailing list