FinancialToolbox unsupported keyword argument "FlagIsCall"

Trying to get the FinancialToolbox working as per documentation.

If I try to compute a Put Option value as follows I get an error:

blsprice(10,10-2.04,.01,1,.1,FlagIsCall=false)

results in errors the most relevant here is

unsupported keyword argument "FlagIsCall"

Or perhaps this package is deprecated?

Thanks for any help.

I don’t think the package is deprecated, given the last updates to it were made on GitHub 3 weeks ago. I think your issue is simply that you have misunderstood the fucntion signature:

help?> blsprice
search: blsprice

  Black & Scholes Price for European Options

        Price=blsprice(S0,K,r,T,σ,d=0.0,FlagIsCall=true)

Here FlagIsCall is not a keyword argument, but an optional argument. You can read about the difference between the two here:

https://docs.julialang.org/en/v1/manual/functions/#Optional-Arguments

(the link takes you to the optional arguments subsection, keyword arguments are discussed in the next section).

tl;dr is this:

julia> f(x, y = 1) = x + y
f (generic function with 2 methods)

julia> g(x; y = 1) = x + y
g (generic function with 1 method)

here f has two methods as the optional argument syntax means I’ve created a function which can be called as f(x) or f(x, y). g on the other hand only has one method, as y is a keyword argument, not an optional one.

Oh, OK, thanks. [It would be great if this (about FlagIsCall) could be clarified in the documentation? -For my hundreds of students]