StockGPT
An AI trader that actually reads the market
An automated day-trading system. Each evening it turns news, analyst and fund-manager sentiment into a shortlist; each morning it buys at the open and squares off before the close.
The source code is private.
- Python
- scikit-learn
- LightGBM
- FastAPI
- React
- Supabase
Overview
What it does
StockGPT aggregates sentiment from as many sources as it can, picks a short list of stocks likely to rise the next day, buys at the open and sells before the close. No overnight holds and no manual work.
A React dashboard shows the day’s picks, live positions, profit and loss, and which sources contributed to each pick, so the weights can be tuned against what is actually working.
How it works
A daily cycle in three stages
01
Evening: collect
After the close, scrapers read financial news, analyst columns, fund-manager picks and advisory portals. Each source is parsed into bullish, bearish or neutral signals per stock, weighted by that source’s track record.
02
Night: score
The scoring engine cross-references signals, looks for consensus across independent sources, and filters by market cap, volume and sector so no single bet dominates.
03
Day: trade
Buy orders go in at the open through the broker API. Positions are watched through the day, everything is squared off before the close, and every trade is logged to Supabase.
Features
What is in it
- Live trading through the Shoonya (Finvasia) broker API, behind a unified order layer so brokers can be swapped
- Backtesting engine that replays historical sentiment against real outcomes
- Risk limits: position sizing, a daily loss limit and an automatic halt
- End-of-day reports with win rate and per-source performance
- Telegram alerts for entries, exits, picks and risk breaches
The hard parts
Problems worth solving
Sources that are unreliable in different ways
Every source has its own format, schedule and quirks, and some change their markup without warning. A source health monitor tracks each scraper’s success rate and automatically downgrades or pauses the ones that misbehave.
Broker APIs that report success and do nothing
Orders sometimes returned success and never reached the book, and connections dropped during volatile opens. A reconciliation loop checks the order book after every placement, retries or falls back to market orders, and circuit breakers stop one bad call from cascading.
Weights that drift with the market
A source that works in a bull market can be useless in a sideways one. A rolling backtester tracks per-source accuracy over several windows and keeps adjusting the weights toward what is working now.