Im using R to calculate the risk neutral probability implicit in option prices. Im using function 'extract.shimko.density' ("RND" package), but getting the following error when I execute the function:
Error in uniroot(f, lower = lower, upper = upper, maxiter = 5000) :
f() values at end points not of opposite sign
In addition:
Warning messages: 1: In if (is.na(f.lower)) stop("f.lower = f(lower) is NA") :
the condition has length > 1 and only the first element will be used 2:
In if (is.na(f.upper)) stop("f.upper = f(upper) is NA") :
the condition has length > 1 and only the first element will be used.
Can someone please help?