A comprehensive introduction to how ML can add value to the design and execution of algorithmic trading strategies
View the Project on GitHub stefan-jansen/machine-learning-for-trading
There are several options to access market data via API using Python.
The notebook 01_pandas_datareader_demo presents a few sources built into the pandas library.
pandas
library enables access to data displayed on websites using the read_html functionpandas-datareader
library provides access to the API endpoints of various data providers through a standard interfaceThe notebook yfinance_demo shows how to use yfinance to download a variety of data from Yahoo! Finance. The library works around the deprecation of the historical data API by scraping data from the website in a reliable, efficient way with a Pythonic API.
The notebook 03_lobster_itch_data demonstrates the use of order book data made available by LOBSTER (Limit Order Book System - The Efficient Reconstructor), an online limit order book data tool that aims to provide easy-to-use, high-quality limit order book data.
Since 2013 LOBSTER acts as a data provider for the academic community, giving access to reconstructed limit order book data for the entire universe of NASDAQ traded stocks. More recently, it started offering a commercial service.
The notebook 03_quandl_demo shows how Quandl uses a very straightforward API to make its free and premium data available. See documentation for more details.
The notebook [contains the notebook zipline_data briefly introduces the backtesting library zipline
that we will use throughout this book and show how to access stock price data while running a backtest. For installation please refer to the instructions here.