ABSTRACT

In this chapter we go beyond the basic concepts in Python and introduce some of Python's more advanced features that are commonly used by quants. A key part of this, is Python's robust support for object-oriented programming, and this is detailed at length in the chapter. Additionally, we provide a review of the numpy and pandas modules, and the most common data structures in Python, such as lists, tuples, arrays and DataFrames. We also cover how the mathematical techniques covered in chapters 2 and 3 can be implemented in Python seamlessly, including regression techniques, time series models, random number generation, and matrix decompositions. Finally, we provide the reader with an introduction to design patters and algorithms, highlighting many of the most common search and sort algorithms.