Book a call
Back to work

Labs

PSX Advisor

Self-improving AI trading signals for the Pakistan Stock Exchange.

AI-powered BUY / SELL / HOLD signals for the Pakistan Stock Exchange. The differentiator is a self-improving AI that tracks its own accuracy over 5, 10, and 20-day windows and rewrites its own prompt when accuracy drops below a 90% target. A paper-trading sandbox and historical backtester let it learn safely before real capital is trusted. Not financial advice.

Visit live

Why it matters

Most trading tools hand you a signal and never look back to see if it was right. There is no scorecard, so there is no reason to trust the next call more than the last one. Retail traders on the PSX end up guessing about the thing meant to remove their guesswork.

The difference here is accountability. The AI tracks its own accuracy over 5, 10, and 20-day windows and rewrites its own prompt when it slips below target. A paper-trading sandbox and a backtester let it learn on real data before real capital is at risk. You get explainable signals from a model that must prove it works.

PSX Advisor screenshot 1

The problem

Retail traders on the PSX lack a tool that generates disciplined, explainable signals and, crucially, holds itself accountable. Most tools never measure whether their own calls were right, so there is no feedback loop and no way for the model to get better over time.

What we built

  • 01Live signals: structured BUY / SELL / HOLD for portfolio and watchlist tickers, with a reason, confidence, price, and percent versus cost basis.
  • 02BUY-opportunity discovery across a curated 26-ticker universe using a momentum and technicals score.
  • 03Self-improving AI: evaluates its own accuracy per prompt version and auto-rewrites the prompt when 5-day accuracy falls below 90%.
  • 04Paper-trading sandbox with virtual money, evaluated at 5, 10, and 20-day windows for a real track record.
  • 05Historical backtester that replays the AI against a year of real PSX data and improves the prompt from known outcomes.
  • 06Portfolio intelligence: cost basis, realized and unrealized P&L, and daily worth snapshots, with a rule against selling at a loss without a strong reason.
  • 07News and PSX corporate announcements with keyword sentiment, plus an installable PWA.

Stack

FrontendNext.js 14 (App Router)React 18Tailwind CSSshadcn/uiRecharts
AIGroq SDK: llama-3.3-70b (analysis) + llama-3.1-8b (validator)
Data & AuthSupabase (Postgres, Auth, RLS)
Market DataYahoo Finance v8 chart APIFastAPI + psxdata sidecar (optional)

Outcome

  • Two-model consensus keeps inference cheap while catching overconfident calls.
  • Accuracy target of 90% with auto-improvement gated at or below that threshold.