/Stock_Neural-Network

Implements Deep-Learning models in a new approach using post-prediction statistical analysis to adjust results to predict future price movements.

Primary LanguagePython

Stock Prediction Neural Network

Table of Contents

  1. Introduction
  2. Concept
  3. Directory Structure
  4. Usage
  5. Disclaimer
  6. Contact

Introduction

Welcome to the Stock Prediction Neural Network project. This program utilizes a neural network trained on historical stock data, incorporating various technical indicators to predict future stock prices. By identifying market euphoria and fear instances, it offers an innovative approach to predict stock market movements.

Concept

While past stock patterns can't guarantee future stock movements, psychological factors can trigger certain volatile market movements. This program identifies these situations of market euphoria and fear using various technical indicators, derivatives of more common indicators mainly, and predicts future stock prices based on these. This project also addresses an often overlooked problem in traditional stock models - overfitting on past data, by incorporating random data shuffles to ensure the model's adaptability and non-biased nature.

AMZN 2 21 2023

Directory Structure

The project directory structure:

.
├── createModel.py
├── createImages.py
├── smaModel.py
├── utils.py
├── stocklist.txt
├── updateModels
└── runimages
  • createModel.py: Defines the neural network architecture and trains it on preprocessed data.
  • createImages.py: Generates output images based on the neural network's predictions.
  • smaModel.py: Defines an SMA-based prediction model for performance comparison.
  • utils.py: Contains utility functions used by other files, such as stock data retrieval and preprocessing.
  • stocklist.txt: A user-adjustable list of stock symbols serving as the neural network's training input.
  • updateModels: A shell script for updating stock data and re-training the neural network.
  • runimages: A shell script for pre-processing historical stock data and creating output images.

Usage

To use the program:

  1. Clone the repository.
git clone https://github.com/masonJamesWheeler/Stock_Neural-Network
  1. Install the dependencies.
pip install -r requirements.txt
  1. Update stocklist.txt with your preferred stock symbols.
  2. Run the updateModels shell script.
./updateModels
  1. Run the runimages shell script.
./runimages
  1. Run createModel.py.
python createModel.py learn <symbol>
  1. (Optional) Run smaModel.py for SMA-based model performance comparison.
python smaModel.py sma <symbol>

Disclaimer

This program is for educational purposes only. It shouldn't be used for actual trading. The predictions may not be accurate and shouldn't be relied upon for financial decisions.