R/BlackscholesCalls.R

Defines functions BlackscholesCalls

Documented in BlackscholesCalls

BlackscholesCalls <-
function(s0,k,t,r,vol){
  d1<-(log(s0/k)+(r+vol^2/2)*t)/(vol*t^(1/2))
  d2<-d1-vol*t^(1/2)
  callPrice<-s0*pnorm(d1)-k*exp(-r*t)*pnorm(d2)
  return(callPrice)
}

Try the pcalls package in your browser

Any scripts or data that you put into this service are public.

pcalls documentation built on May 2, 2020, 5:05 p.m.