StrataSight is a stock price forecasting application with full CRUD functionality that uses machine learning models to predict future stock prices. Built with Streamlit for an intuitive interface, it leverages yfinance for real-time market data, TensorFlow/Keras LSTM and Facebook's Prophet for forecasting, and Plotly for interactive visualizations.
- Simple One-Click Predictions: Select a stock, choose forecast horizon, pick models, and generate predictions instantly
- Dual Model Approach:
- LSTM (Long Short-Term Memory): Deep learning neural network for capturing complex patterns and short-term fluctuations
- Prophet: Facebook's robust time series forecasting tool for stable trends and seasonal effects
- Interactive Visualizations: Plotly charts showing historical data and model predictions side-by-side
- Smart Model Caching: Models train once per stock and are cached for instant subsequent predictions
- Comparison Metrics: View predicted prices with percentage changes from current values
- Session State Persistence: Results remain visible across page interactions
- CREATE: Save prediction results with optional notes to JSON database
- READ: View all saved predictions in a searchable table format
- UPDATE: Edit notes on existing predictions with timestamp tracking
- DELETE: Remove individual predictions or clear entire database
- EXPORT: Download prediction history as JSON for backup/analysis
- Database: File-based JSON storage in
data/predictions_history.json
-
Create and activate a virtual environment
python -m venv .venv .\.venv\Scripts\Activate.ps1 -
Install dependencies
pip install -r requirements.txt -
Run the Streamlit app locally
streamlit run src\stratasight.py
Or, to use the virtual environment's Python explicitly:
& ".\.venv\Scripts\python.exe" -m streamlit run src\stratasight.py
The app will open in your browser at http://localhost:8501
- Select a Stock: Choose from TSLA, GME, AMD, or AAPL
- Set Forecast Horizon: Pick how many days ahead to predict (7-90 days)
- Choose Models: Select LSTM, Prophet, or both for comparison
- Generate Predictions: Click the button and view results with interactive charts
- Save Results (optional): Expand "Save This Prediction" to store results with notes
- View History: Browse all saved predictions with timestamps and details
- Update Notes: Select a prediction ID and edit its notes
- Delete Records: Remove individual predictions or clear all at once
- Export Data: Download prediction history as JSON backup
- Prophet Installation: Can be system-dependent. See Prophet documentation for OS-specific requirements
- Model Storage: Trained models are cached in
models/saved/directory- LSTM models:
.kerasformat - Prophet models:
.pklformat (joblib)
- LSTM models:
- Data Storage: Prediction history saved in
data/predictions_history.json- JSON format for human-readable storage
- Includes ID, timestamp, ticker, prices, predictions, and notes
- No external database required
- Data Normalization: LSTM uses MinMaxScaler for consistent training and prediction
- Session State: Streamlit session state preserves predictions across page interactions
- Architecture:
- LSTM: 2-layer stacked LSTM with dropout regularization
- Prophet: Handles trends, seasonality, and outliers automatically
For deployment to Streamlit Cloud:
- Push your repository to GitHub
- Connect to Streamlit Cloud
- Point the app to
src/stratasight.py - The included
requirements.txtwill handle dependencies
StrataSight/
βββ src/
β βββ stratasight.py # Main Streamlit app with CRUD
β βββ data_fetch.py # yfinance data fetching
β βββ models/
β βββ lstm_model.py # LSTM training and inference
β βββ prophet_model.py # Prophet training and inference
βββ models/
β βββ saved/ # Cached trained models (.keras, .pkl)
βββ data/
β βββ predictions_history.json # CRUD database (auto-created)
βββ requirements.txt # Python dependencies
βββ CRUD_DOCUMENTATION.md # Technical CRUD documentation
βββ CRUD_USER_GUIDE.md # User guide for CRUD features
βββ README.md