Blackscholes_formula <- function(spot,timetomat,strike,r,q=0,sigma,opt_type=1,greek_type=1) { d_1<-(log(spot/k) + (r+ (sigma^2)/2)(timetomat))/sigma*sqrt(T