So far, in all the recipes in this chapter, you have used the broker connection to fetch historical data. In this recipe, you will fetch historical data using a third-party tool, Quandl (https://www.quandl.com/tools/python). It has a free to use Python version which can be easily installed using pip. This recipe demonstrates the use of quandl to fetch historical data of FAAMG stock prices (Facebook, Amazon, Apple, Microsoft, and Google).
Getting ready
Make sure you have installed the Python quandl package. If you haven't, you can install it using the following pip command:
$ pip install quandl
How to do it…
We execute the following steps for this recipe:
- Import the necessary modules:
>>> from pyalgotrading.utils.func import plot_candlestick_chart, PlotType
>>> import quandl
- Plot a chart for the historical data of Facebook with a 1-day candle interval:
>>> facebook = quandl.get('WIKI/FB',
...