Git Product home page Git Product logo

Comments (3)

cyrilchim avatar cyrilchim commented on May 6, 2024

Hi Alex,

Thanks for noticing that. This is indeed an oversight. Would you like to send a PR ensuring that dividend_rates is used across the library instead of continuous_dividends. This is more aligned with discount_rates. For discrete dividends we would use something like dividend_dates and dividends.

A gracious way to rename the parameter is to use a deprecation warning for continuous_dividends, e.g., see here

Here is a simple concrete example:

from tensorflow.python.util import deprecation 

@deprecation.deprecated_args(None, "z is deprecated. Use y instead", "z")
def fn(x, y=None, z=None):
  p = deprecation.deprecated_argument_lookup("y", y, "z", z)
  return x + p

User can either use y or z but a deprecation warning is thrown for z. In the future version we remove z

Please let me know if you would like to send a PR which would be very much appreciated.

Thanks!
Cyril

from tf-quant-finance.

alembcke avatar alembcke commented on May 6, 2024

Hi Cyril,

Sure, I will work on this PR. I agree with using dividend_rates across the option pricing models. I also agree that including a deprecation decorator is the right way to go about such a change, so will include that in my PR. I will let you know if I have any questions.

Regards,
Alex

from tf-quant-finance.

cyrilchim avatar cyrilchim commented on May 6, 2024

Thank you Alex! This is now merged.

from tf-quant-finance.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.