[Tutor] Processing Financial Calculations using Python
James Reynolds
eire1130 at gmail.com
Wed Mar 16 15:26:41 CET 2011
For all of these, I wrote my own class with methods to create the correct
output. there is not built in python functionality that I know, although
there may be a package.
For IRR, the method expects a list and at least one negative value. I
believe the way I did NPV was a dictionary, where the key was the discount
rate and the value was a list of cash flows.
For NPV specifically, I wrote this as a C module, but I need to rewrite this
because I didn't know much about C at the time. It works and all, but I feel
it could be more efficient. For my purposes, NPV and IRR calculations are
fairly slow using native Python and you will may want to consider writing
some of this in C as a python extension if you can. My view is if you aren't
doing a large number of calculations, just use excel. If you are, speed
becomes an issue.
On Tue, Mar 15, 2011 at 8:00 PM, Carla Jenkins <carlarjenkins at yahoo.com>wrote:
> Are there specific Python commands to process present value, future value
> and net present value? Thanks.
>
> Sincerely,
> Carla Jenkins
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110316/58b30a05/attachment-0001.html>
More information about the Tutor
mailing list