Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

BBCA Stock Price Forecasting: Comparative Time Series Analysis

A comprehensive time series forecasting project for PT Bank Central Asia Tbk (BBCA.JK). This analysis evaluates multiple forecasting methodologies to predict stock price movements from 2015 to 2026, with a strong emphasis on model reliability, stationarity testing, and out-of-sample validation.


Overview

This project presents a comprehensive time series analysis of BBCA stock prices. By applying proper train-test validation and stationarity diagnostics, it establishes a reliable scientific baseline for stock price forecasting. The study compares simple trend-based models with advanced exponential smoothing techniques to identify the most suitable forecasting approach for this financial asset.

Use Cases

  • Financial time series research
  • Forecasting model comparison
  • Educational purposes
  • Investment trend monitoring

Key Features

  • Robust 80:20 temporal train-test split to prevent data leakage.
  • Augmented Dickey-Fuller (ADF) Test for stationarity assessment.
  • Comparative evaluation of multiple forecasting methods:
    • Moving Average
    • Linear Regression
    • Holt-Winters Exponential Smoothing
  • 12-month future forecasting using the best-performing model.
  • Performance evaluation using standard forecasting metrics.

Tech Stack

Component Technology
Data Source Yahoo Finance (yfinance)
Data Processing pandas, numpy
Forecasting statsmodels (Holt-Winters)
Regression scikit-learn
Visualization matplotlib, seaborn

Analysis Methodology

Dataset

  • Source: Yahoo Finance
  • Ticker: BBCA.JK
  • Period: January 2015 – July 2026
  • Frequency: Monthly (resampled from daily data)
  • Target Variable: Open Price

Data Preprocessing

  • Download historical stock prices using yfinance
  • Monthly resampling using .last()
  • Missing value inspection
  • Train-test split (80% training, 20% testing)

Stationarity Test

The project applies the Augmented Dickey-Fuller (ADF) test to determine whether the time series satisfies the stationarity assumption before forecasting.

Forecasting Models

  • Moving Average
  • Linear Regression
  • Holt-Winters Exponential Smoothing

Evaluation Metrics

  • MAPE — Mean Absolute Percentage Error
  • RMSE — Root Mean Square Error
  • MAD — Mean Absolute Deviation

Note: All evaluation metrics are calculated exclusively on the test set to provide an unbiased estimate of model performance.


Installation

Requirements

  • Python 3.10 or later
  • Jupyter Notebook (or another compatible notebook environment)

Clone Repository

git clone https://github.com/YOUR_USERNAME/bbca-stock-forecasting.git
cd bbca-stock-forecasting

Install Dependencies

pip install yfinance pandas numpy matplotlib seaborn scikit-learn statsmodels

Usage

Open the notebook below using Jupyter Notebook or Visual Studio Code.

BBCA_Forecasting_Improved.ipynb

Run all notebook cells sequentially to reproduce the complete forecasting analysis.


Project Structure

bbca-stock-forecasting/
├── BBCA_Forecasting_Improved.ipynb
└── README.md

Model Limitations

  • The forecasting models are univariate, meaning they only use historical stock prices.
  • Macroeconomic variables such as inflation, exchange rates, and interest rates are not included.
  • Unexpected market events may significantly affect forecasting accuracy.
  • Prediction uncertainty increases as the forecasting horizon becomes longer.

Author

Ramadhan Adi Nugraha

Data Science Student — Electronic Engineering Polytechnic Institute of Surabaya (PENS)

Email: ramadhanadi408@gmail.com


Disclaimer

Historical stock performance does not guarantee future results. This project is intended solely for educational and research purposes and should not be considered financial or investment advice.

About

A comparative time series analysis forecasting BBCA stock prices using Holt-Winters, Linear Regression, and Moving Average models.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages