The StockReader class

Since our data is coming from different sources, it makes sense to create a class that hides all these implementation details. For this purpose, we will build the StockReader class, which will make it easier to collect data for bitcoin, stocks, and indices on the stock market. We can simply create an instance of the StockReader class by providing the date range we want for our analysis, and then use the methods it provides to get whichever data we please.

We can use the UML diagram of the StockReader to get a high-level overview of its implementation:

This tells us that the StockReader will allow us to perform the following ...

Get Hands-On Data Analysis with Pandas 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.