There are many resources for downloading stock market data for Apple. For our purposes, we will be using the Yahoo! Finance website.
Downloading stock market data for Apple
Getting ready
This section will require initializing a Spark cluster that will be used for all recipes in this chapter. A Spark notebook can be initialized in the terminal using sparknotebook, as seen in the following screenshot:
A SparkSession can be initialized in a Jupyter notebook using the following script:
spark = SparkSession.builder \
.master("local") \
.appName("StockMarket") \
.config("spark.executor.memory", "6gb") \
.getOrCreate()