Successful Algorithmic Trading Updated for Python 2.7.x and Python 3.4.x

Successful Algorithmic Trading Updated for Python 2.7.x and Python 3.4.x

This is a short update to inform current and prospective readers of Successful Algorithmic Trading that the Python code in the book has been updated to be fully compatible with both Python 2.7.x and Python 3.4.x.

In addition I've created a requirements.txt file that allows you to easily install, via pip, the necessary Python packages. I've also checked every file within the code to make sure it runs under both 2.7.6 and 3.4.0 specifically, which are the two branches that ship with Ubuntu 14.04.

Unfortunately, the Python-MySQL library used previously is not compatible with Python 3 and as such has been "replaced" by a fork of the project called mysqlclient. I've now made use of this package instead of Python-MySQL.

I've also updated some of the code to use other more modern libraries. For instance, instead of using urllib2 (which has been split over other libraries in Python 3) and LXML to parse the Wikipedia list of S&P500 companies, I've used requests and BeautifulSoup4. This streamlines and future-proofs the code.

I've also taken on board a lot of suggestions and comments that I've received over the last six months to improve the event-driven backtester that accompanies the book. It now uses a mix of Yahoo Finance and DTN IQFeed data in order to run the trading strategies.

If you are a current reader of the book you can simply download the latest version by visiting the address provided in the email link sent to you when purchasing. If you have lost your email then simply contact our team at and I will send you the new download link.

Finally, if you encounter any bugs or issues with the new code then please email us at