The financial industry has adopted Python at a tremendous rate recently, with some of the largest investment banks and hedge funds using it to build core trading and risk management systems. This hands-on guide helps both developers and quantitative analysts get started with Python, and guides you through the most important aspects of using Python for quantitative finance.
Using practical examples through the book, author Yves Hilpisch also shows you how to develop a full-fledged framework for Monte Carlo simulation-based derivatives and risk analytics, based on a large, realistic case study. Much of the book uses interactive IPython Notebooks, with topics that include:
Fundamentals: Python data structures, NumPy array handling, time series analysis with pandas, visualization with matplotlib, high performance I/O operations with PyTables, date/time information handling, and selected best practices
Financial topics: mathematical techniques with NumPy, SciPy and SymPy such as regression and optimization; stochastics for Monte Carlo simulation, Value-at-Risk, and Credit-Value-at-Risk calculations; statistics for normality tests, mean-variance portfolio optimization, principal component analysis (PCA), and Bayesian regression
Special topics: performance Python for financial algorithms, such as vectorization and parallelization, integrating Python with Excel, and building financial applications based on Web technologies
Python and Finance
Chapter 1Why Python for Finance?
What Is Python?
Technology in Finance
Python for Finance
Chapter 2Infrastructure and Tools
Chapter 3Introductory Examples
Monte Carlo Simulation
Financial Analytics and Development
Chapter 4Data Types and Structures
Basic Data Types
Basic Data Structures
NumPy Data Structures
Vectorization of Code
Chapter 5Data Visualization
Chapter 6Financial Time Series
Chapter 7Input/Output Operations
Basic I/O with Python
I/O with pandas
Fast I/O with PyTables
Chapter 8Performance Python
Python Paradigms and Performance
Memory Layout and Performance
Static Compiling with Cython
Generation of Random Numbers on GPUs
Chapter 9Mathematical Tools
Principal Component Analysis
Chapter 12Excel Integration
Basic Spreadsheet Interaction
Scripting Excel with Python
Chapter 13Object Orientation and Graphical User Interfaces
Yves Hilpisch is the founder and managing partner of The Python Quants, an analytics software provider and financial engineering group. The Python Quants offer, among others, the Python Quant Platform (http://quant-platform.com) and DX Analytics (http://dx-analytics.com). Yves also lectures on mathematical finance and organizes meetups and conferences about Python for Quantitative Finance in New York and London.
The animal on the cover of Python for Finance is a Hispaniolan solenodon. The Hispaniolan solenodon (Solenodon paradoxus) is an endangered mammal that lives on the Caribbean island of Hispaniola, which comprises Haiti and the Dominican Republic. It’s particularly rare in Haiti and a bit more common in the Dominican Republic.
Solenodons are known to eat arthropods, worms, snails, and reptiles. They also consume roots, fruit, and leaves on occasion. A solenodon weighs a pound or two and has a foot-long head and body plus a ten-inch tail, give or take. This ancient mammal looks somewhat like a big shrew. It’s quite furry, with reddish-brown coloring on top and lighter fur on its undersides, while its tail, legs, and prominent snout lack hair.
It has a rather sedentary lifestyle and often stays out of sight. When it does come out, its movements tend to be awkward, and it sometimes trips when running. However, being a night creature, it has developed an acute sense of hearing, smell, and touch. Its own distinctive scent is said to be "goatlike."
It gets toxic saliva from a groove in the second lower incisor and uses it to paralyze and attack its invertebrate prey. As such, it is one of few venomous mammals. Sometimes the venom is released when fighting among each other, and can be fatal to the solenodon itself. Often, after initial conflict, they establish a dominance relationship and get along in the same living quarters. Families tend to live together for a long time. Apparently, it only drinks while bathing.
Many of the animals on O'Reilly covers are endangered; all of them are important to the world. To learn more about how you can help, go to animals.oreilly.com.
The cover image is from Wood's Illustrated Natural History. The cover fonts are URW Typewriter and Guardian Sans. The text font is Adobe Minion Pro; the heading font is Adobe Myriad Condensed; and the code font is Dalton Maag's Ubuntu Mono.
As someone working in finance it is tough to find a book that truly illustrates the application of python for finance. I understand the above review about it being indecisive if advanced or beginner text but I would consider myself very basic as my only other experience with python was basic code academy and I found the examples good to learn from and experiment with changing code. I would definitely recommend if you want to use Python for finance.
Bottom Line Yes, I would recommend this to a friend
The author provides many interesting examples, but does not provide sufficient background or support to, say, modify the code for custom purposes. At other times the author gives overviews of very basic Python topics, such as data types and structures. In this respect the book suffers from an indecision on whether it is an introductory or advanced text. Most of the concepts considered herein are covered more in depth in Python for Data Analysis. This has been a nice refresher text, but I do not recommend it for the beginner or for anyone hoping to learn the pandas library for the first time.
(Disclaimer: I'm writing this having only gone through the first early release.)