A premium, high-performance time-series forecasting and automated market analysis system. This repository integrates Google's TimesFM 2.5 (Time Series Foundation Model) for advanced predictive analysis with Ollama (gemma4:e2b) for generating comprehensive, automated market reports.
- Time-Series forecasting:
TimesFM 2.5(google/timesfm-2.5-200m-pytorch) - Automated Market Reporting:
Ollama(gemma4:e2b) - Dashboard Interface:
Streamlitwith a customized glassmorphic dark-theme UI - Data Acquisition:
yfinance(Yahoo Finance API) - Visualizations:
Plotly(Interactive charts with confidence bands) - Scientific Computing:
PyTorch,NumPy,Pandas
- 💾
app.py— The interactive Streamlit dashboard combining data loading, TimesFM forecasting, and Ollama reporting in under 75 lines of code. - 📊
report_snapshot.md— Pre-generated analysis output matching the dashboard output layout for zero-latency initial view. - 📋
requirements.txt— Project dependencies list.
Open your Windows PowerShell terminal and run the following commands sequentially:
# 1. Create a virtual environment
python -m venv .venv
# 2. Activate the virtual environment
.venv\Scripts\Activate.ps1
# 3. Install core dependencies
pip install -r requirements.txtNote
This repository contains the application and dashboard code. If you would like to explore or contribute to the core TimesFM model itself, please clone the official Google Research repository:
git clone https://github.com/google-research/timesfm.gitTo start the interactive Streamlit dashboard, run this command in your active PowerShell window:
streamlit run app.py- Long-Term Asset Allocation: Forecast asset price ranges over 30 to 90 days to determine risk-adjusted weighting.
- Support & Resistance Discovery: Use TimesFM quantile boundaries (10th/90th percentile) to identify statistical support and resistance bands.
- Portfolio Stress-Testing: Generate downside scenario estimates from the 10th percentile quantile path.
- Automated Investment Memorandums: Produce markdown-formatted analyst notes combining quantitative TimesFM predictions with LLM synthesis.
- Earnings Announcement Risk Assessment: Forecast pre-earnings volatility paths to plan options and hedging strategies.
- Exogenous Covariates (XReg): Integrate macroeconomic indices and sector-specific indicators.
- Multi-Asset Portfolio Optimization: Allow simultaneous forecasting across multiple correlated tickers.
- Real-time News Sentiment Bias: Adjust forecast paths based on live financial sentiment scores.
- Custom LoRA Fine-Tuning: Enable users to fine-tune TimesFM checkpoints on custom proprietary transactional data.
- Backtesting Framework: Include automated backtesting metrics (MAPE, MSE) over historical validation windows.
TimesFM 2.5 Google AI Time-Series Forecasting Stock Market Prediction Ollama Gemma 2 Streamlit yfinance Quantitative Finance Machine Learning Financial Analysis AI Stock Forecasting