There are many resources for downloading stock market data for Apple. For our purposes, we will be using the Yahoo! Finance website.
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()
The following section walks through the steps for downloading historical stock market data for Apple.
- Visit the following website to track the daily historical adjusted closing stock value for Apple, which has a stock ticker value of AAPL: https://finance.yahoo.com/quote/AAPL/history
- Set and apply the following parameters to the
Historical Data
tab:Time Period...