Defining the experiment
Using the machine learning problem framing methodology, we will now define the main components of our stock price prediction problem as defined for the chapter:
The F-score metric in machine learning is a measure of accuracy for binary classifiers and provides a good balance and trade-off between misclassifications (false positives or false negatives). Further details can be found on the Wikipedia page: https://en.wikipedia.org/wiki/F-score.
Exploring the dataset
As specified in our machine learning problem framing, we will use as input data the market observations for the period January-December 2020, as provided by the Yahoo data API.
The following code excerpt, which uses the pandas_datareader
module available in our workbench, allows us to easily retrieve the data that we want. The complete working notebook is available at https://github.com...