Giter VIP home page Giter VIP logo

thequantscientist / featureengineering-bilstm Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.84 MB

[MDAI 2024] The official repo for the paper: "Transforming Stock Price Forecasting: Deep Learning Architectures and Strategic Feature Engineering".

Home Page: https://doi.org/10.1007/978-3-031-68208-7_20

License: MIT License

Jupyter Notebook 94.90% R 5.10%
deep-neural-networks machine-learning stock-price-prediction feature-engineering

featureengineering-bilstm's Introduction

Publication

This project has been accepted for presentation and publication at the 21st International Conference on Modeling Decision for Artificial Intelligence (MDAI 2024), published on LNCS of SpringerLink as "Transforming Stock Price Forecasting: Deep Learning Architectures and Strategic Feature Engineering". MDAI is ranked: CORE B and QUALIS B1.

Project Overview

The unpredictable nature of stock prices makes accurate forecasting a significant challenge. This research delves into the comparative performance of various models, showcasing the superiority of Deep Learning architectures over traditional statistical and Machine Learning models. Enhanced datasets, incorporating technical and macroeconomic indicators, further improve the predictive capabilities of these models. Our BiLSTM model, trained on these enhanced datasets, demonstrates a substantial reduction in forecasting errors, achieving an average MSE reduction of 68.44% and MAE reduction of 47.78% compared to raw OHLCV data.

Features

  • Advanced Deep Learning Architectures: Focuses on BiLSTM, GRU, and ConvLSTM2D models for their superior handling of time-series data.
  • Multivariate Time Series Forecasting: Utilizes a comprehensive dataset that includes raw OHLCV data alongside technical indicators such as SMA, RSI, and macroeconomic indicators like the adjusted closing price of S&P 500.
  • Feature Engineering: Strategic incorporation of additional features to enhance model performance, improving forecasting accuracy.
  • Evaluation Metrics: Employs MSE and MAE for model evaluation, ensuring reliable and precise performance metrics.
  • Comprehensive Comparison: Benchmarks against traditional models (ARIMA, ETS, GARCH) and Machine Learning models (SVM, RFR, XGBoost), highlighting the advancements in DL models.

Technologies Used

  • Python: The primary programming language used for implementing the models and preprocessing data.
  • TensorFlow/Keras: Powerful libraries for building and training deep learning models.
  • Pandas: For efficient data manipulation and analysis, particularly useful for handling time series data.
  • Scikit-learn: Used for data preprocessing tasks, such as scaling and normalization, to prepare data for model training.
  • NumPy: Essential for handling numerical operations, array manipulations, and transformations.
  • Matplotlib/Seaborn: For visualizing forecasting results and model performance, enhancing interpretability and analysis.

Getting Started

Follow the instructions below to set up your environment, train the models with your dataset, and evaluate their performance on stock price forecasting tasks:

  1. Clone the Repository:

    git clone https://github.com/yourusername/stock-forecasting-dl.git
    cd stock-forecasting-dl
  2. Install Dependencies:

    pip install -r requirements.txt
  3. Prepare the Data:

    • Download the stock price data from Yahoo Finance for AAPL, AMZN, and MSFT.
    • Preprocess the data using the provided scripts to create enhanced datasets with technical indicators.
  4. Train the Model:

    python train_model.py --model BiLSTM --dataset enhanced --epochs 100
  5. Evaluate the Model:

    python evaluate_model.py --model BiLSTM --dataset enhanced

Results

The BiLSTM model, when applied to enhanced datasets, consistently outperforms traditional statistical and Machine Learning models, reducing MSE by an average of 68.44% and MAE by 47.78%. The enhanced datasets effectively capture market trends and external influences, leading to more accurate forecasts.

featureengineering-bilstm's People

Contributors

thequantscientist avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.