14

With the recent SEC proposal requiring that most Asset-Backed Securities issuers file a python computer program to document the flow of funds (or waterfall) provisions of the transaction, I thought it timely to ask what you thought the "Must-Have" Python Packages for Finance would be.

PS: apart from answering here, please also consider answering this survey.

Update: Survey results here.

Sridhar Ratnakumar
  • 81,433
  • 63
  • 146
  • 187
  • Do you know if the Python source code required in the SEC proposal is currently available? If so, I would greatly appreciate your pointing me to it if you know. Thanks very much! – user7186 Mar 14 '13 at 15:52

4 Answers4

7

http://code.google.com/p/pandas/ is also developed with a quantitative finance background.

I guess then the usual suspects:

  • numpy
  • scipy
  • rpy
  • matplotlib
  • ...

For my quant-development I usual start with pythonxy (http://www.pythonxy.com/) as a basis.

In the past I used also some python bindings for quantlib. (I don't know if they are still developed).

foobar
  • 507
  • 1
  • 8
  • 20
6

Stefano Taschini's "Interval Arithmetic: Python Implementation and Applications" presented at Scipy 2008 (see here) can be precious, as it can show the range of numerical uncertainty of your computations (so you avoid decisions based on too-fragile input data or equations).

Since Stefano works at Altis Investment Management AG in Zurich, I'm pretty certain he developed and uses his pyinterval package in a finance context, although of course it's just a general-purpose tool, perfectly usable in other fields as well.

Alex Martelli
  • 854,459
  • 170
  • 1,222
  • 1,395
  • And if "error bars" (standard deviations) are needed, they can be transparently calculated with the `uncertainties` package (http://packages.python.org/uncertainties/). Disclaimer: I'm the author of this error propagation package. :) – Eric O. Lebigot Aug 02 '10 at 20:52
3

While I deal with trading systems, sci-py/num-py have been extremely useful for me. The built-in CSV reader/writer package in Python is also something that I regularly use.

Uri
  • 88,451
  • 51
  • 221
  • 321
3

I will try to restrict for what's relevant to describing securities:

  • we have some packages that provides market conventions support (day count fractions, adjustment rules, expiration dates, schedule generations, etc.). It would be great to have them officially provided by the SEC? It's absolutely necessary to describe properly any security, and it would be cumbersome to reimplement them in every payoff description script.
  • some simple pricing-like functions, all very common, were redeveloped (for example: black scholes first order greeks and implied volatility computations) mainly for avoiding the overhead of calling the pricing librairies for such small things. This is used to describe vanilla options, for example, as the market quotes them in volatility points. Same for price-to-yield functions.

Of course, we use lot of other libraries for

  • communication for other systems
  • pricing
  • calibration
  • model assessment
  • statistics
  • production stuff
  • ...
LeMiz
  • 5,554
  • 5
  • 28
  • 23