Alvin Murithi@cypher-30
← All work

2026 · Scoring engine built

M.A.R.S

Scores the health of Kenya's banking sector and generates buy/hold/sell signals for the Nairobi Securities Exchange from quarterly report data.

M.A.R.S running in the browser

A daily risk reading for the WSA Banking ETF on the Nairobi Securities Exchange: MARS pulls Kenyan macro data and constituent-bank results, scores the banking sector from 1–100, and alerts when the signal changes, replacing ad-hoc monitoring with a rule you can inspect and argue with.

How it works

  • Ingests Central Bank Rate, CPI inflation, treasury yields, and daily NSE closes into Postgres, then has an LLM read quarterly bank PDFs to extract NPL ratio, profit after tax, and loan book. Every extracted figure is held with needs_review until confirmed against the source text.
  • Each input becomes a 0–100 sub-score, combined into one Sector Health Score by weights that live in a single file rather than scattered through the scoring engine, so every number a person might disagree with is inspectable in one place.
  • A signal change (BUY / HOLD / SELL) only fires an alert once the expected move clears the round-trip cost of actually exiting a position, so noise below the transaction-cost floor stays quiet.
  • A FastAPI backend and Next.js dashboard show today's reading, which input moved it, and the alert history; a seed command fills 180 days of synthetic data through the real scoring path so the whole system can be exercised with no API keys.

Where it stands

The scheduler starts paused by default until real data connectors are turned on, and the project's own docs are explicit that the score is a written-down opinion based on starting-guess weights, not a prediction or investment advice.

Built with

  • Python
  • FastAPI
  • PostgreSQL
  • Next.js
  • LLM APIs