Skip to Content
Python for Algorithmic Trading
book

Python for Algorithmic Trading

by Yves Hilpisch
November 2020
Intermediate to advanced
378 pages
8h 47m
English
O'Reilly Media, Inc.
Book available
Content preview from Python for Algorithmic Trading

Chapter 2. Python Infrastructure

In building a house, there is the problem of the selection of wood.

It is essential that the carpenter’s aim be to carry equipment that will cut well and, when he has time, to sharpen that equipment.

Miyamoto Musashi (The Book of Five Rings)

For someone new to Python, Python deployment might seem all but straightforward. The same holds true for the wealth of libraries and packages that can be installed optionally. First of all, there is not only one Python. Python comes in many different flavors, like CPython, Jython, IronPython, or PyPy. Then there is still the divide between Python 2.7 and the 3.x world. This chapter focuses on CPython, the most popular version of the Python programming language, and on version 3.8.

Even when focusing on CPython 3.8 (henceforth just “Python”), deployment is made difficult due to a number of reasons:

  • The interpreter (a standard CPython installation) only comes with the so-called standard library (e.g. covering typical mathematical functions).

  • Optional Python packages need to be installed separately, and there are hundreds of them.

  • Compiling (“building”) such non-standard packages on your own can be tricky due to dependencies and operating system–specific requirements.

  • Taking care of such dependencies and of version consistency over time (maintenance) is often tedious and time consuming.

  • Updates and upgrades for certain packages might cause the need for recompiling a multitude of other packages.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Algorithmic Trading with Python

Hands-On Algorithmic Trading with Python

Deepak K. Kanungo

Publisher Resources

ISBN: 9781492053347Errata PageSupplemental Content