Skip to content

BoringEuropeanDev/GPST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

104 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPST — Global Predictive Stock Terminal

AI-powered stock intelligence terminal built entirely on free and open data sources.

Python FastAPI React License Status

Live Demo · GitHub · Buy Me a Coffee


Disclaimer: GPST does not provide financial advice. All predictions are generated by automated models for educational and informational purposes only. Past performance does not guarantee future results. Always consult a licensed financial advisor before making investment decisions.


What it does

GPST tracks 90+ global tickers (US equities, international stocks, ETFs, sector and commodity proxies) and generates daily directional predictions using a combination of technical analysis, news sentiment, and macroeconomic signals.

Each ticker receives a prediction (UP / DOWN / NEUTRAL), a confidence score, and a signal explanation. Predictions are evaluated against the next market close and accuracy is tracked over time.

Data sources

All data comes from free and open APIs. GPST works even without API keys using Yahoo Finance and GDELT.

Source Provides Key required
Yahoo Finance Price data, OHLCV No
GDELT Global news sentiment No
FRED VIX, yield curve, Fed Funds Rate Optional
Alpha Vantage News sentiment, quotes Optional (~25/day)
NewsAPI Headlines Optional (100/day)

Prediction engine

GPST supports two prediction architectures.

v1 — Rules-based model

A deterministic weighted scorecard combining four signal categories:

Signal Weight
Technical indicators (RSI, MACD, SMA crossovers, Bollinger Bands, momentum, volume) 40%
News sentiment (GDELT + Alpha Vantage polarity) 30%
Macro regime (VIX, 10Y–2Y yield spread, Fed Funds Rate) 20%
Sector strength (relative performance vs sector ETFs) 10%

The weighted score is mapped through a threshold to produce a direction. Confidence increases when multiple signals align.

v2 — Machine learning pipeline (WIP)

A supervised learning model designed to augment or replace the rules system. Features are stored as Parquet, built with scikit-learn, using historical signals as inputs and actual price direction as labels.

Planned improvements: nightly retraining, ensemble models, feature importance analysis, hyperparameter optimization, and rolling backtests.

Relevant modules: backend/app/services/prediction_engine.py and backend/app/services/ml_pipeline.py.


Architecture

Frontend (React)
      │
      ▼
Backend API (FastAPI)
      │
      ├── Data ingestion
      │     ├ Yahoo Finance
      │     ├ GDELT
      │     ├ FRED
      │     └ Alpha Vantage
      │
      ├── Prediction engine
      │     ├ Rules model (v1)
      │     └ ML pipeline (v2)
      │
      └── PostgreSQL
            └ Predictions + history

Project structure

.
├── backend/
│   ├── main.py
│   ├── Dockerfile
│   ├── requirements.txt
│   └── app/
│       ├── database.py
│       ├── api/
│       │   └── endpoints/
│       └── services/
│           ├── data_ingestion.py
│           ├── prediction_engine.py
│           └── ml_pipeline.py
│
├── frontend/
│   ├── public/
│   │   ├── index.html
│   │   └── favicon.svg
│   ├── src/
│   │   ├── App.js
│   │   ├── pages/
│   │   │   ├── TickerList.js
│   │   │   └── StockDetail.js
│   │   ├── components/
│   │   │   ├── Header.js
│   │   │   └── Footer.js
│   │   ├── utils/
│   │   │   ├── api.js
│   │   │   └── format.js
│   │   └── styles/
│   │       └── global.css
│   ├── package.json
│   └── vercel.json
│
├── docker-compose.yml
└── README.md

Local development

Prerequisites

  • Python 3.11+
  • Node 18+
  • Git

Backend

cd backend
python -m venv venv
source venv/bin/activate    # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env        # Edit with your API keys (optional)
uvicorn main:app --reload --port 8000

API docs available at http://localhost:8000/docs.

Frontend

cd frontend
npm install
npm start

Open http://localhost:3000.

Docker (full stack)

cp backend/.env.example backend/.env
docker compose up --build

Deployment

Backend → Railway

  1. Deploy the /backend directory
  2. Add a PostgreSQL plugin from the Railway dashboard
  3. Set environment variables (ALPHA_VANTAGE_KEY, NEWS_API_KEY, FRED_API_KEY — all optional)

Frontend → Vercel

  1. Deploy the /frontend directory
  2. Set the environment variable:
REACT_APP_API_URL=https://your-railway-app.railway.app/api

Supported tickers

90+ instruments across multiple categories:

US Tech: AAPL, MSFT, NVDA, AMZN, META, TSLA, GOOGL, NFLX, AMD, INTC, QCOM, TXN, ORCL, CRM, ADBE, IBM

Financials: JPM, BAC, WFC, GS, MS, C, V, MA, BLK, PYPL

Healthcare: LLY, JNJ, UNH, PFE, MRNA, ABBV, MRK, TMO, GILD, REGN

Energy: XOM, CVX, SLB, HAL, MPC, PSX, VLO

ETFs: SPY, QQQ, IWM, DIA, VTI, GLD, SLV, TLT, HYG, XLK, XLV, XLF, XLE, XLY

International: TSM, BABA, TM, SONY, NVO, ASML, SAP, HSBC, BP, RIO, BHP, VALE

To add more tickers, edit GLOBAL_TICKERS in backend/app/services/data_ingestion.py.


Contributing

Pull requests are welcome. Areas where help is especially valuable: ML training improvements, backtesting, UI polish, alert systems, portfolio tracking, and additional ticker coverage.

git checkout -b feature/your-feature
git commit -m "Add your feature"
git push origin feature/your-feature

Acknowledgements

Built with FastAPI, React, Recharts, SQLAlchemy, yfinance, pandas, scikit-learn, APScheduler, GDELT, and FRED.


Support

If GPST helped you learn quant concepts or build trading ideas:

buymeacoffee.com/bedmakr


Built for the open-source and retail trading community. Not financial advice — use responsibly.

About

A full-stack, AI-powered stock intelligence terminal built entirely on free and open data sources. No paid APIs required. Features a dark trading-terminal UI, real-time market data, ML-based directional predictions, news sentiment analysis, macroeconomic context, and continuous model evaluation.

Topics

Resources

License

Stars

Watchers

Forks

Contributors