This repository contains a Python-based stock prediction model with a user-friendly Streamlit interface. The model utilizes historical data obtained from the AlphaVantage API for training and prediction purposes. THE MAIN FILE IS TIMESERIES.py. The Linear Model is one that uses linear correlation after training an is therefore not nearly as reliable.
The stock prediction model employs machine learning algorithms to analyze historical stock data and make predictions about future stock prices. Users can interact with the model through a Streamlit interface, which provides a seamless experience for training the model and obtaining predictions.
- Streamlit Interface: User-friendly interface for training the model and obtaining predictions.
- AlphaVantage API Integration: Utilizes the AlphaVantage API to fetch historical stock data for training the model.
- Machine Learning Algorithms: Employs various machine learning algorithms to analyze historical data and make predictions.
- Customization: Users can customize the parameters and settings of the model to suit their preferences.
- API Rate Limit: The AlphaVantage API has a daily limit of 25 requests per day. Exceeding this limit may result in temporary unavailability of historical data.
- Impact of Stock Splits: Historical data may include instances of stock splits, leading to extreme dips or spikes in the data. This can affect the accuracy of predictions.
- Inability to Predict Future Events: The model cannot predict events that will occur in the future, and therefore, cannot guarantee 100% accuracy in predicting future stock prices.
- Clone the repository to your local machine.
- Install the required dependencies using
pip install -r requirements.txt. - Obtain an API key from AlphaVantage. You will enter it directly into the running app or script in the next steps, so no source files need to be edited.
- Run the Streamlit app using
streamlit run StockInterface.py, then enter your stock symbol and API key in the interface fields. - Alternatively, call
runModel(abb, api)fromTimeSeries.pydirectly, passing your stock abbreviation and API key as arguments. - Interact with the Streamlit interface to train the model and obtain predictions.
- *Optional - UnComment
plt.showonline 135to physically show prediction model, Validation Loss, RME Loss, and Training Loss
Contributions are welcome! If you have any suggestions, improvements, or bug fixes, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
This stock prediction model is for educational and informational purposes only. It should not be used as financial advice, and the developers do not guarantee any specific outcomes or results. Invest at your own risk.