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