
P1: JYS
c01 JWBK378-Fletcher April 24, 2009 8:7 Printer: Yet to come
1
Welcome to Python
In this introductory chapter, we welcome the reader to Python and make some arguments that
we hope will serve to motivate Python programming in finance.
1.1 WHY PYTHON?
We contend that the Python programming language is particularly suited to quantitative
analysts/programmers working in the field of financial engineering. This assertion centres
on two axes: the first, Python’s expressiveness and high-level nature; the second, Python’s
extensibility and interoperability with other programming languages. Other (arguably not so,)
minor arguments to be made for Python programming in general, are the benefits to be had
from the use of Python’s wealth of standard libraries (‘Python comes with batteries included’)
and Python’s support for functional programming idioms.
We certainly do not wish to assert that Python is ‘better’ in any way than other program-
ming languages (we rejoice in the diversity of programming languages!), but instead wish to
emphasise how Python can interoperate with and complement other languages to be found in
financial institutions.
1.1.1 Python is a General-Purpose High-Level Programming Language
Python’s high-level nature and its rich collection of built-in data types serve to allow the
analyst/programmer to focus more on the problems they are solving and less on low-level
mechanical constructs ...