views:

889

answers:

4

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.

+3  A: 

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
+5  A: 

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
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. :)
EOL
+2  A: 

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
+2  A: 

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