Case study · 2026
In developmentPhantom AI
A market-intelligence platform for traders: deterministic technical analysis, a 0–100 confluence score, backtesting and paper trading — with an AI analyst that explains the calculated data and never invents it.
- Role
- Design & full-stack development
- Year
- 2026
- Stack
- Next.js 16, TypeScript, FastAPI · Python 3.12, Supabase + RLS, OpenAI API, Lightweight Charts

01
Project Overview
Phantom AI is a research, risk-management and decision-support platform for traders. A Python engine calculates indicators, market structure and a 0–100 Confluence Score from closed price bars; an AI analyst then explains those results in plain language. It is not a trading bot: it doesn't place real-money trades, promise profit or predict prices.
02
Problem
Trading tools tend to do one of two things: show raw charts and leave the interpretation to you, or hand out confident signals with no evidence behind them. AI makes the second problem worse, because a language model will happily invent numbers. I wanted a tool where every statement can be traced back to data.
03
Solution
A strict order: data, then deterministic calculations, market structure and risk, then AI interpretation, then your decision. The model only sees a compact, hashed summary of results computed in Python, and its reply is checked before it's shown — every number must exist in that summary, and certainty, probability and trade-instruction language is rejected. Every market component is labelled LIVE, DELAYED, DEMO or STALE with its timestamp.
04
My Role
Design & full-stack development
- Next.js 16 web app: charts, analysis panels, scanner, backtesting, paper trading and journal
- FastAPI service with a market-data layer for Coinbase, Twelve Data and a labelled demo generator
- Analysis engine in Python: indicators, swing structure, zones, regimes and the Confluence Score
- AI pipeline with schema validation, number checking and an audit record for every analysis
- Supabase auth and Postgres with row-level security on every table
- Risk engine, bar-by-bar backtester and server-filled paper trading with exact decimal maths
- Automated tests across the API, engine, database policies, web app and end-to-end flows
05
Tech Stack
06
Key Features
01
Confluence Score
A 0–100 agreement score for each side from seven documented components, each with its evidence — labelled everywhere as not a probability.
02
Market structure
Swings, breaks of structure, changes of character, support and resistance zones, fair value gaps, liquidity sweeps and order blocks, all calculated on closed bars.
03
Grounded AI analyst
Explains the calculated analysis. Every number in its text must exist in the data it was given, otherwise the reply is withheld.
04
Scanner, alerts and risk
Markets ranked by score, alerts evaluated on the server, and position sizes rounded down so the risk never exceeds the target.
05
Backtesting
Strategies stored as validated rules, simulated bar by bar with trading costs, and reported in-sample, validation and out-of-sample.
06
Paper trading and journal
Simulated accounts where the server, never the browser, decides the fill price — plus a journal with statistics and confidence intervals.
07
Screenshots






08
Challenges
- 01
Keeping the AI honest
The reply is validated against a schema, every number is checked against the calculated data, and banned wording triggers one corrective retry. If it still fails, nothing is shown.
- 02
No peeking at the future
Calculations never use the bar that is still forming. Backtests decide on closed bars and fill at the next open, and tests prove that adding later data never changes earlier results.
- 03
Never inventing data
When a provider fails, the interface says the data is unavailable instead of substituting sample values. Demo data is watermarked on the chart itself, so a screenshot can't pass as real.
09
What I Learned
- A language model is most useful when it explains numbers, not when it produces them.
- Exact decimal arithmetic and the direction of rounding matter as soon as money is involved.
- Access rules belong in the database, not only in application code.
- Showing “unavailable” is better than showing a guess.
10
Result
Seven phases built so far — from market data and the analysis engine to backtesting, paper trading, a machine-learning lab and chart-image reading — covered by more than 630 automated tests.
- Phases built
- 7
- Automated tests
- 630+
- Instruments
- 8
Next mission
Avelon Crypto
A crypto portfolio tracker with one Spring Boot 3 backend and two front ends — a server-rendered Thymeleaf app and a Vue 3 single-page app — secured with sessions and JWT.
Read case study