National Economics University logo Faculty of Data Science and Artificial Intelligence logo BAI Lab logo

Topic 1

Basic Stock Price Time Series (S&P 500)

Easy
Basic Stock Price Time Series (S&P 500)

Topic 1 โ€“ Basic Stock Price Time Series (S&P 500)

Level: Easy Goal: Univariate forecasting of daily stock prices (close price) for one S&P 500 company.

Dataset

Download Instructions

  1. Open https://www.kaggle.com/datasets/camnugent/sandp500
  2. Log in to Kaggle.
  3. Click "Download".
  4. Extract ZIP to data/.
  5. Use all_stocks_5yr.csv.

Data Loading

import pandas as pd
df = pd.read_csv("data/all_stocks_5yr.csv")
aapl = df[df["Name"] == "AAPL"].copy()
aapl["date"] = pd.to_datetime(aapl["date"])
aapl = aapl.set_index("date").sort_index()

Implementation Steps

1. Data Exploration

2. Exploratory Data Analysis (EDA)

3. Data Preprocessing

4. Model Building

5. Model Evaluation

6. Forecasting

Expected Deliverables

  1. EDA Report:
  1. Model Results:
  1. Code:

Tips

Starter Notebook

The starter notebook contains installation instructions and data loading code to help you get started with this topic.

๐Ÿ““ View Starter Notebook on GitHub

Note: You can view the notebook directly on GitHub or download it to run locally in Jupyter.

Getting Started

This topic includes:

Navigate to the Topic/1.SP_500/ directory to access all resources.

โ† Back to All Topics