What are your "must-have" Python Packages for Finance?
Asked Answered
S

4

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.

Simba answered 20/5, 2010 at 2:29 Comment(1)
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!Echikson
F
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.

Fell answered 20/5, 2010 at 2:29 Comment(1)
And if "error bars" (standard deviations) are needed, they can be transparently calculated with the uncertainties package (packages.python.org/uncertainties). Disclaimer: I'm the author of this error propagation package. :)Independent
F
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).

Fefeal answered 20/5, 2010 at 2:29 Comment(0)
F
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.

Fell answered 20/5, 2010 at 2:29 Comment(1)
And if "error bars" (standard deviations) are needed, they can be transparently calculated with the uncertainties package (packages.python.org/uncertainties). Disclaimer: I'm the author of this error propagation package. :)Independent
T
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
  • ...
Ticino answered 20/5, 2010 at 2:29 Comment(0)
T
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.

Ticon answered 20/5, 2010 at 2:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.