A Streamlit app that fetches stock/crypto data from Alpha Vantage, trains an LSTM model, and predicts future prices.
- Real-time and historical data for stocks (e.g., TSLA) and crypto (e.g., BTC).
- LSTM-based price predictions.
- Interactive UI with plots and forecasts.
- Python 3.7+
- Streamlit, Pandas, Numpy, Scikit-learn, TensorFlow, Matplotlib, Alpha Vantage API
- Get an Alpha Vantage API key here.
- Replace
"API"inapp.pywith your key. - Install dependencies:
pip install streamlit pandas numpy scikit-learn tensorflow matplotlib alpha-vantage - Run:
streamlit run app.py
- Enter a ticker (e.g.,
AAPL,BTC). - Set historical days (100–1000) and prediction days (1–10).
- Click Predict to see current price, historical fit, and future forecasts.
- Real-time data is approximated.
- Free API has rate limits (5 requests/min).
Fetches data → Preprocesses → Trains LSTM → Predicts → Visualizes.