Re: [Numpy-discussion] NEP 32: Remove the financial functions from NumPy
Dear all As a user of Numpy in finance, I'm absolutely in favour of removing these functions. They're too domain-specific, not flexible and general enough for widespread use, and probably not easy to maintain. Best regards Martin ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] NEP 32: Remove the financial functions from NumPy
+1 on removing them from NumPy. I think there are plenty of alternatives already so many that we might even consider deprecating them just like SciPy misc module by pointing to alternatives. On Tue, Sep 3, 2019 at 6:38 PM Sebastian Berg wrote: > On Tue, 2019-09-03 at 08:56 -0400, Warren Weckesser wrote: > > Github issue 2880 ("Get financial functions out of main namespace", > > Very briefly, I am absolutely in favor of this. > > Keeping the functions in numpy seems more of a liability than help > anyone. And this push is more likely to help users by spurring > development on a good replacement, than a practically unmaintained > corner of NumPy that may seem like it solves a problem, but probably > does so very poorly. > > Moving them into a separate pip installable package seems like the best > way forward until a better replacement, to which we can point users, > comes up. > > - Sebastian > > > > https://github.com/numpy/numpy/issues/2880) has been open since 2013. > > In a recent community meeting, it was suggested that we create a NEP > > to propose the removal of the financial functions from NumPy. I have > > submitted "NEP 32: Remove the financial functions from NumPy" in a > > pull request at https://github.com/numpy/numpy/pull/14399. A copy of > > the latest version of the NEP is below. > > > > According to the NEP process document, "Once the PR is in place, the > > NEP should be announced on the mailing list for discussion (comments > > on the PR itself should be restricted to minor editorial and > > technical fixes)." This email is the announcement for NEP 32. > > > > The NEP includes a brief summary of the history of the financial > > functions, and has links to several relevant mailing list threads, > > dating back to when the functions were added to NumPy in 2008. I > > recommend reviewing those threads before commenting here. > > > > Warren > > > > - > > > > == > > NEP 32 — Remove the financial functions from NumPy > > == > > > > :Author: Warren Weckesser > > :Status: Draft > > :Type: Standards Track > > :Created: 2019-08-30 > > > > > > Abstract > > > > > > We propose deprecating and ultimately removing the financial > > functions [1]_ > > from NumPy. The functions will be moved to an independent > > repository, > > and provided to the community as a separate package with the name > > ``numpy_financial``. > > > > > > Motivation and scope > > > > > > The NumPy financial functions [1]_ are the 10 functions ``fv``, > > ``ipmt``, > > ``irr``, ``mirr``, ``nper``, ``npv``, ``pmt``, ``ppmt``, ``pv`` and > > ``rate``. > > The functions provide elementary financial calculations such as > > future value, > > net present value, etc. These functions were added to NumPy in 2008 > > [2]_. > > > > In May, 2009, a request by Joe Harrington to add a function called > > ``xirr`` to > > the financial functions triggered a long thread about these functions > > [3]_. > > One important point that came up in that thread is that a "real" > > financial > > library must be able to handle real dates. The NumPy financial > > functions do > > not work with actual dates or calendars. The preference for a more > > capable > > library independent of NumPy was expressed several times in that > > thread. > > > > In June, 2009, D. L. Goldsmith expressed concerns about the > > correctness of the > > implementations of some of the financial functions [4]_. It was > > suggested then > > to move the financial functions out of NumPy to an independent > > package. > > > > In a GitHub issue in 2013 [5]_, Nathaniel Smith suggested moving the > > financial > > functions from the top-level namespace to ``numpy.financial``. He > > also > > suggested giving the functions better names. Responses at that time > > included > > the suggestion to deprecate them and move them from NumPy to a > > separate > > package. This issue is still open. > > > > Later in 2013 [6]_, it was suggested on the mailing list that these > > functions > > be removed from NumPy. > > > > The arguments for the removal of these functions from NumPy: > > > > * They are too specialized for NumPy. > > * They are not actually useful for "real world" financial > > calculations, because > > they do not handle real dates and calendars. > > * The definition of "correctness" for some of these functions seems > > to be a > > matter of convention, and the current NumPy developers do not have > > the > > background to judge their correctness. > > * There has been little interest among past and present NumPy > > developers > > in maintaining these functions. > > > > The main arguments for keeping the functions in NumPy are: > > > > * Removing these functions will be disruptive for some users. > > Current users > > will have to add the new ``numpy_financial`` package to their > > dependencies, > > and then modify their code to u
Re: [Numpy-discussion] NEP 32: Remove the financial functions from NumPy
Hi, Maybe worth asking over at the Pandas list? I bet there are more Python / finance people over there. Cheers, Matthew On Wed, Sep 4, 2019 at 7:11 PM Ilhan Polat wrote: > > +1 on removing them from NumPy. I think there are plenty of alternatives > already so many that we might even consider deprecating them just like SciPy > misc module by pointing to alternatives. > > On Tue, Sep 3, 2019 at 6:38 PM Sebastian Berg > wrote: >> >> On Tue, 2019-09-03 at 08:56 -0400, Warren Weckesser wrote: >> > Github issue 2880 ("Get financial functions out of main namespace", >> >> Very briefly, I am absolutely in favor of this. >> >> Keeping the functions in numpy seems more of a liability than help >> anyone. And this push is more likely to help users by spurring >> development on a good replacement, than a practically unmaintained >> corner of NumPy that may seem like it solves a problem, but probably >> does so very poorly. >> >> Moving them into a separate pip installable package seems like the best >> way forward until a better replacement, to which we can point users, >> comes up. >> >> - Sebastian >> >> >> > https://github.com/numpy/numpy/issues/2880) has been open since 2013. >> > In a recent community meeting, it was suggested that we create a NEP >> > to propose the removal of the financial functions from NumPy. I have >> > submitted "NEP 32: Remove the financial functions from NumPy" in a >> > pull request at https://github.com/numpy/numpy/pull/14399. A copy of >> > the latest version of the NEP is below. >> > >> > According to the NEP process document, "Once the PR is in place, the >> > NEP should be announced on the mailing list for discussion (comments >> > on the PR itself should be restricted to minor editorial and >> > technical fixes)." This email is the announcement for NEP 32. >> > >> > The NEP includes a brief summary of the history of the financial >> > functions, and has links to several relevant mailing list threads, >> > dating back to when the functions were added to NumPy in 2008. I >> > recommend reviewing those threads before commenting here. >> > >> > Warren >> > >> > - >> > >> > == >> > NEP 32 — Remove the financial functions from NumPy >> > == >> > >> > :Author: Warren Weckesser >> > :Status: Draft >> > :Type: Standards Track >> > :Created: 2019-08-30 >> > >> > >> > Abstract >> > >> > >> > We propose deprecating and ultimately removing the financial >> > functions [1]_ >> > from NumPy. The functions will be moved to an independent >> > repository, >> > and provided to the community as a separate package with the name >> > ``numpy_financial``. >> > >> > >> > Motivation and scope >> > >> > >> > The NumPy financial functions [1]_ are the 10 functions ``fv``, >> > ``ipmt``, >> > ``irr``, ``mirr``, ``nper``, ``npv``, ``pmt``, ``ppmt``, ``pv`` and >> > ``rate``. >> > The functions provide elementary financial calculations such as >> > future value, >> > net present value, etc. These functions were added to NumPy in 2008 >> > [2]_. >> > >> > In May, 2009, a request by Joe Harrington to add a function called >> > ``xirr`` to >> > the financial functions triggered a long thread about these functions >> > [3]_. >> > One important point that came up in that thread is that a "real" >> > financial >> > library must be able to handle real dates. The NumPy financial >> > functions do >> > not work with actual dates or calendars. The preference for a more >> > capable >> > library independent of NumPy was expressed several times in that >> > thread. >> > >> > In June, 2009, D. L. Goldsmith expressed concerns about the >> > correctness of the >> > implementations of some of the financial functions [4]_. It was >> > suggested then >> > to move the financial functions out of NumPy to an independent >> > package. >> > >> > In a GitHub issue in 2013 [5]_, Nathaniel Smith suggested moving the >> > financial >> > functions from the top-level namespace to ``numpy.financial``. He >> > also >> > suggested giving the functions better names. Responses at that time >> > included >> > the suggestion to deprecate them and move them from NumPy to a >> > separate >> > package. This issue is still open. >> > >> > Later in 2013 [6]_, it was suggested on the mailing list that these >> > functions >> > be removed from NumPy. >> > >> > The arguments for the removal of these functions from NumPy: >> > >> > * They are too specialized for NumPy. >> > * They are not actually useful for "real world" financial >> > calculations, because >> > they do not handle real dates and calendars. >> > * The definition of "correctness" for some of these functions seems >> > to be a >> > matter of convention, and the current NumPy developers do not have >> > the >> > background to judge their correctness. >> > * There has been little interest among past and present NumPy >> > developers >>