File size: 1,915 Bytes
92ff39e
 
 
 
 
 
 
 
5733a28
 
 
 
 
 
 
 
 
92ff39e
 
5733a28
92ff39e
5733a28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3e74548
5733a28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
license: mit
---

# Apple Stock Price Forecasting

This repository contains models for forecasting Apple stock prices using ARIMA and LSTM.

## Overview

This project provides pre-trained models for predicting Apple (AAPL) stock prices:

- **ARIMA Model** – Classical time series forecasting using ARIMA with Box-Cox transformation.  
- **LSTM Model** – Deep learning based forecasting using a trained LSTM network with a scaler.

Both models use the last 3 months of stock data to generate a 7-day forecast.

## Inference Instructions

You can perform inference in one of two ways:

1. **Run the provided inference notebooks**  

   Each model folder contains a ready-to-run notebook along with the pre-trained model files:

   - **ARIMA Model**:  
     Folder: `Apple-Stock-Price-Forecasting-ARIMA-Model`  
     Notebook: `inference.ipynb` (includes loading the ARIMA model and Box-Cox transformer, downloading recent AAPL data, and generating a 7-day forecast)  

   - **LSTM Model**:  
     Folder: `Apple-Stock-Price-Forecasting-LSTM-Model`  
     Notebook: `inference.ipynb` (includes loading the LSTM model and scaler, preparing the last 60 days of data, and generating a 7-day forecast)

2. **Use the code from the notebooks directly in your Python environment**  

   Each notebook contains **fully commented code** showing how to:  
   - Download recent stock data (`yfinance`)  
   - Load the pre-trained model from Hugging Face Hub  
   - Preprocess data (Box-Cox for ARIMA, scaling for LSTM)  
   - Run 7-day predictions  
   - Generate a results table with forecasted prices  

> Note: If you want to directly run inference without notebooks, you can copy the code from the `inference.ipynb` files in each model folder. The notebooks also include instructions for installing required packages and setting your Hugging Face token.

## License

This project is licensed under the MIT License.