The Streamlit Stock Forecast App is a web-based application built using Streamlit, yfinance, and Facebook's Prophet library in Python. This application enables users to forecast stock prices for selected companies by leveraging historical stock data.
- Users can choose from a selection of well-known stocks such as Google (GOOG), Apple (AAPL), Microsoft (MSFT), and Meta Platforms Inc. (META) using a dropdown menu.
- The app displays the raw historical stock data for the selected stock, presenting the 'Open' and 'Close' values over time.
- Utilizing the Prophet library, the app trains a forecasting model on the historical stock data and generates future predictions for the selected stock's closing prices.
- Users can view the forecasted stock prices for the chosen number of years, presented in an interactive Plotly chart, displaying the predicted trend.
- The application showcases the individual components contributing to the forecast, enabling users to analyze the trend and seasonal patterns.
- Stock Selection: Choose a stock from the available options in the dropdown menu.
- Years of Prediction: Adjust the slider to select the number of years for forecasting.
- Data Visualization: View the raw historical stock data and observe the trends in 'Open' and 'Close' values over time.
- Forecast: Analyze the generated forecast plot depicting the predicted stock prices for the selected period.
- Forecast Components: Explore the various components contributing to the forecasted stock prices.
The app utilizes yfinance for data retrieval, Prophet for time-series forecasting, and Streamlit for web application development.
- Install the required libraries:
streamlit
,yfinance
,prophet
,plotly
. You can use!pip install streamlit finance prophet plotly
- Execute the code in a Python environment supporting Streamlit.
- Run the Streamlit app using
streamlit run app_name.py
command in the terminal.
The predictions made by this application are based on historical data and do not guarantee future stock prices. It is intended for educational and demonstrational purposes only.