NASDAQ TradeView: Financial Fraud Detection Platform
Table of Contents
Stack: Python · Z-score anomaly detection · NIST CSF 2.0 · pytest
Code: github.com/Aditiicodes/Nasdaq-TradeView
What it is
A market surveillance tool that scores NASDAQ-100 equities for suspicious trading activity. Each ticker’s price movement and volume are compared against that same stock’s own trailing 90-day mean and standard deviation. The two resulting Z-scores feed four weighted fraud sub-scores (pump and dump, money laundering, insider trading, volume anomaly), which average into a 0 to 100 risk score.
Scores tier into three bands: Critical (≥60) blocks the transaction in the UI, High (35 to 59) requires confirmation, Low (<35) passes.
Why the logic lives in Python, not just the browser
The front end is a single static HTML file with no build step. But detection
logic inside a <script> tag can’t be unit-tested, cited, or reproduced
independently, which matters for a project whose premise is an auditable,
explainable method. So the same formulas exist as an authoritative Python
module:
- Testable: 11 unit tests covering the Z-score formula, threshold boundaries, liquidity and market-closed flags, the insider-bonus gate, and score bounding
- Reproducible: one script re-derives every number in the UI straight from the source CSV; nothing is hand-typed
- Citable: one module is the reference implementation
Honest limitations
The sub-score weights are heuristic. They aren’t fit to labeled data, because no fraud ground truth exists in this dataset; flagged events are statistically extreme trading days, not regulator-confirmed manipulation. Validating against SEC AAER or FINRA enforcement data is the obvious next step.
Client-side transaction blocking suits a research demo and would not survive production; a real deployment enforces that server-side.