Exploring our financial dataset

Before we start applying machine learning techniques to build predictive models, we need to perform some exploratory data wrangling on our dataset with the help of the steps listed here. This is often a large and an underestimated prerequisite when it comes to applying advanced methods to financial datasets.

  1. Getting the data: We'll continue to use Google stock data that we've used in our previous chapter:
import pandas as pdfrom pandas_datareader import datadef load_financial_data(start_date, end_date, output_file):    try:        df = pd.read_pickle(output_file)        print('File data found...reading GOOG data')    except FileNotFoundError:        print('File not found...downloading the GOOG data') df = data.DataReader('GOOG', 'yahoo', ...

Get Learn Algorithmic Trading 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.