Python for Finance: Analyze Big Financial Data

(Elle) #1

Conclusions


Nowadays, the Python ecosystem provides a number of ways to improve the performance


of code:


Paradigms


Some Python paradigms might be more performant than others, given a specific


problem.


Libraries


There is a wealth of libraries available for different types of problems, which often


lead to much higher performance given a problem that fits into the scope of the


library (e.g., numexpr).


Compiling


A number of powerful compiling solutions are available, including static (e.g.,


Cython) and dynamic ones (e.g., Numba).


Parallelization


Some Python libraries have built-in parallelization capabilities (e.g., numexpr), while


others allow us to harness the full power of multiple-core CPUs, whole clusters (e.g.,


IPython.parallel), or GPUs (e.g., NumbaPro).


A major benefit of the Python ecosystem is that all these approaches generally are easily


implementable, meaning that the additional effort included is generally quite low (even for


nonexperts). In other words, performance improvements often are low-hanging fruits


given the performance libraries available as of today.

Free download pdf