Intro to Python for
Financial Data Analysis
General Assembly, 6/18/2012
about me
• MIT ’07
• AQR Capital: 2007 - 2010
• pandas: 2008 - Present
WES MCKINNEY • wes (at) lambdafoundry.com
• Twitter: @wesmckinn
Jun 18, 2012 2
Why Python?
• Easy to learn, but richly featured
• Readability
• Conciseness
• “Python gets out of my way” - Robert Kern
• Multi-paradigm: object-oriented, functional, procedural
• Easy integration with C / C++ / Fortran
• Mature scientific libraries and large community
Jun 18, 2012 3
Text
Source: “Python wraps its coils around the enterprise”
http://www.theregister.co.uk/2012/06/18/scripting_languages_in_the_enterprise/
Jun 18, 2012 4
Upcoming book
• To be ~400 pages
• NumPy + IPython
• pandas
• Case studies
• Python language
• Incomplete Early Release
available on oreilly.com, print
version in September or October
Jun 18, 2012 5
Lambda Foundry!
• RapidQuant: Python-based financial analytics libraries and research
environment
• Support and Training
• Consulting
• pandas, statsmodels, and related open source development
Jun 18, 2012 6
Core financial stack
• IPython: rich interactive environment
• NumPy: multidimensional arrays, linear algebra
• pandas: high level, intelligent data structures
• SciPy: like MATLAB toolboxes
• statsmodels: statistics and econometrics
• Visualization: matplotlib, Chaco, mayavi
Jun 18, 2012 7
pandas
• Richly featured data handling tool built on NumPy
• Mature, well-tested codebase
• Intuitive API, well-suited for REPL and system development
• Powerful time series capabilities
• Widely used in the quant finance industry
• Large cross-disciplinary user base
• Upcoming major 0.8.0 release (this week hopefully)
Jun 18, 2012 8