Formulas hide their edges
A closed-form definition says nothing about missing prices, mid-window constituent changes, or sessions where a ratio is undefined. A lab has to answer all three, on screen.
An article can prove that a definition is correct. It cannot show you what the algorithm does on a Tuesday when two constituents are missing a price. These labs take the published implementations, point them at real market data, and let you inspect every input, output, and edge case the contract had to survive.
Why this page exists
Most financial engineering fails in the space between a correct formula and a running system. These labs exist to close that space in public: same definitions, same tested code, now under real data with the failure modes visible.
A closed-form definition says nothing about missing prices, mid-window constituent changes, or sessions where a ratio is undefined. A lab has to answer all three, on screen.
Every algorithm card names the exact import path from the published package, so the thing you are watching is the thing you would install — not a demo reimplementation.
Read the article for the contract, open the lab to see the contract hold, then lift the same call into your own service. The loop is the point.
Live now
One lab today, covering an entire published domain end to end. More follow as their domains complete.
D04 / Market Breadth and Internals
28 breadth algorithms · real S&P 500 data · point-in-time
Every published algorithm in Market Breadth and Internals runs here against the same point-in-time universe — the full family tree from raw advance/decline counts through the McClellan oscillators to index concentration.
What is inside
The lab is organised in the same family tree as the library. Each algorithm below has a canonical article here and a running implementation there.
Advance/decline breadth — the raw partition of a universe into winners and losers.
The 19/39 EMA family, ratio-adjusted variants, and their summation indices.
New highs versus new lows, and the share of members above their moving averages.
Volume-weighted pressure, thrust conditions, and the divergence detector.
How much of the index is really just a handful of names.
How to learn with it
The labs are not a showcase to admire — they are the practice half of the platform. Work the loop once per algorithm and you leave with something you can put in production.
import { calculateNetAdvances } from "fintech-algorithms/market-breadth-and-internals/advance-decline-breadth/net-advances";What comes next
A domain earns a lab once its algorithms are complete and tested. That is why there is one here and not forty-eight.
The labs are engineering demonstrations of algorithm behaviour on historical data. They are not investment advice, trading signals, or a forecast of future prices.