Data acquisition and feature generation

For easier reference, we implement the codes for generating features herein rather than in later sections. We start with obtaining the dataset we need for our project.

Throughout the entire project, we acquire stock index price and performance data via the Quandl Python API (https://www.quandl.com/tools/python). Quandl (www.quandl.com) provides some free of charge financial, economic, and stock market data. The Python package is free and can be downloaded and installed via the command line pip install quandl in a terminal or shell, and it can be imported as follows:

>>> import quandl

We can load a particular stock's price and performance via the get method with the stock/index symbol (also called ...

Get Python Machine Learning By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.