Nothing
AmericanDigitalCalls <-
function(s0,k,t,r,vol,call_type){
if (call_type=="C"){
d1<-(log(s0/k)+(r+vol^2/2)*t)/(vol*t^(1/2))
d2<-d1-vol*t^(1/2)
priceCallCash<-exp(-r*t)*pnorm(d2)
return(priceCallCash)
}
else if (call_type=="A") {
d1<-(log(s0/k)+(r+vol^2/2)*t)/(vol*t^(1/2))
d2<-d1-vol*t^(1/2)
priceCallAsset<-s0*exp(-r*t)*pnorm(d1)
return(priceCallAsset)
}
else {
stop("Select A or C as call type")
}
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.