New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: implicit args in blackscholes #485
Comments
Note that the current best workaround for the universality problem is
|
Sounds great 👍 One way is to register default arguments as attributes of a module in init and pass them in function calls as: def __init__(self, ..., log_moneyness=None):
self.log_moneyness = log_moneyness
def price(self, log_moneyness=None, ...):
log_moneyness = self.log_moneyness or log_moneyness
... |
I know it is not high priority problem for you and me. So, I wrote this as just a note. |
I'll make a prototype |
I made a prototype for this: #516 |
Resolved by #516 |
Currently, BlackScholes modules work like:
However, the part,
seems a little bit redundant and not universal.
I think it comes from the following reasons:
Thus, I suggest that all args are not required, and if the args are missing, these required args are calculated automatically based on registered derivatives.
Of course, in the case of derivative using autogreeks, these implicit args cannot be applied, but, I think my suggestion is worth being considere.
This suggestion is not limited to BlackScholes.price, but also to all other methods in greeks methods.
The text was updated successfully, but these errors were encountered: