This project is a sophisticated stock price prediction tool that uses deep learning techniques to forecast future stock prices. It employs an LSTM (Long Short-Term Memory) neural network model and incorporates various technical indicators for enhanced prediction accuracy.
- Supports multiple stock markets and currencies worldwide
- Utilizes yfinance for real-time stock data retrieval
- Implements walk-forward analysis for robust model evaluation
- Incorporates multiple technical indicators (RSI, Bollinger Bands, ATR, OBV, ADX, Stochastic Oscillator)
- Provides data quality checks to ensure reliable input
- Generates visualizations for both historical analysis and future predictions
- Python 3.7+
- PyTorch
- pandas
- numpy
- scikit-learn
- matplotlib
- yfinance
- Clone this repository: https://github.com/ABurfoot/Deep-Learning-Quant-Researcher.git
- Install the required packages: pip install yfinance pip install pandas pip install numpy pip install torch pip install scikit-learn pip install matplotlib
You will be prompted to enter:
- The stock symbol (e.g., AAPL for Apple Inc.)
- The market (e.g., NASDAQ, LON, ASX)
- The number of days you want to predict
The program will then:
- Retrieve historical data
- Perform walk-forward analysis to train and evaluate the model
- Display graphs of the walk-forward analysis results
- Predict stock prices for the specified number of future days
- Display a graph of the future predictions
- Data Retrieval: Uses yfinance to download historical stock data.
- Data Preparation: Calculates technical indicators (RSI, Bollinger Bands, ATR, OBV, ADX, Stochastic Oscillator) and prepares sequences for the LSTM model.
- Model Training: Employs an LSTM neural network, trained using walk-forward analysis.
- Evaluation: Uses Mean Absolute Error (MAE) to assess model performance.
- Prediction: Forecasts future stock prices based on the trained model and recent data.
get_yfinance_symbol(): Converts stock symbols for different markets.prepare_data(): Prepares and engineers features from raw stock data.ImprovedStockPredictor: LSTM-based neural network model.walkforward_analysis(): Implements the walk-forward validation technique.predict_next_n_days(): Generates future stock price predictions.
- The stock market is inherently unpredictable and affected by many external factors. This tool should be used for educational purposes only and not for actual trading decisions.
- The accuracy of predictions can vary significantly depending on the stock and market conditions.
This software is for educational and research purposes only. Do not use it to make any type of investment decisions. Always consult with a qualified financial advisor before making investment decisions. The creator (ABurfoot) of this project is not responsible for any financial losses incurred from using this tool.