mean that you can't create an option with mixed Ints and Floats like AmericanOption(10, 12, 0.05, 0.4, 1, 1). Also, I don't think you use the parameterization {T} when you dispatch on it later in evaluate(...), so I'd suggest modifying the definitions to:
It seems like your dispatching for derivatives is too strict. Terms like
mean that you can't create an option with mixed
Int
s andFloats
likeAmericanOption(10, 12, 0.05, 0.4, 1, 1)
. Also, I don't think you use the parameterization{T}
when you dispatch on it later inevaluate(...)
, so I'd suggest modifying the definitions to:I can make a PR and run tests to make sure when I get a chance. Let me know if I'm missing anything obvious though!