CTV Ad Tech Lab: Programmatic Ads in a World Fueled by AI

An interactive simulator that shows how CTV impressions are forecasted, ranked, auctioned, and optimized using machine learning and agentic AI

YieldLab is an educational, full-stack simulator that opens the black box of programmatic Connected TV advertising. Structured as a guided three-act tour,...

100% Synthetic, Educational Simulator: This is a learning environment, not a live ad platform. Every impression, campaign, and market signal is generated synthetically in Python. The lab uses no real campaign data, no exchange feeds, no scraping, and no PII. Its only job is to make the mechanics of programmatic buying visible, interactive, and easy to reason about.

Why I Built It: Programmatic advertising powers a major share of digital media spend, but the underlying mechanics are hard to see from the outside. I wanted to move beyond platform-level knowledge and build the system myself to understand how media buying decisions are actually made, from supply forecasting to the final cleared bid.

The Problem: Programmatic Is Powerful but Opaque: Programmatic buying is usually described as automated media buying, but the real complexity sits in the decisioning layer before every bid: forecasting available supply, estimating impression value, applying priority and eligibility rules, clearing auctions, pacing budgets, and managing trade-offs across reach, cost, and delivery certainty. From the outside, all of that stays hidden behind a dashboard.

The Solution: YieldLab, an Interactive CTV Ad-Tech Simulator: YieldLab turns that black box into a product experience, structured as a guided three-act tour: Act I covers the ecosystem (who's who in a programmatic transaction), Act II walks through the machine learning pipeline that powers today's buying decisions, and Act III shows where agentic AI takes programmatic next. Users change campaign inputs, publisher floors, competition levels, auction types, and frequency caps, then see how the forecast, auction simulation, ad-serving logic, and agent recommendation update instantly. Every control recomputes the full pipeline, so the cause and effect of each buying decision becomes tangible.

What the Lab Simulates: End to end, the lab models the programmatic ecosystem: advertisers, DSPs, ad exchanges, SSPs, publishers, and the auctions between them. It covers the deal types buyers actually use, open real-time bidding (RTB), private marketplaces (PMP), and programmatic guaranteed, and simulates ad-server waterfall logic across eligibility, priority tiers, publisher floors, and yield ranking; inventory forecasting and campaign planning; expected eCPM ranking from click, view, and completion probability; first-price and second-price auction mechanics; and bid shading, pacing, frequency caps, and delivery trade-offs, culminating in agentic buying recommendations shaped by market conditions and campaign goals.

Machine Learning Layer: The lab includes a gradient boosting inventory forecaster with backtesting and prediction intervals, plus classifiers that estimate click, view, and completion probability. These predictions are combined to rank inventory by expected eCPM, showing how ML can support media buying decisions rather than replace the buyer's judgment.

From ML Models to Agentic Buying: The buying agent follows a perceive, reason, act, and recommend loop. It reads current market conditions, searches across bid and strategy combinations, compares simulated outcomes, evaluates delivery risk, and recommends a final media buying plan. The reasoning is transparent: you can follow how the agent weighs cost, reach, and delivery certainty before it commits to a plan.

Architecture & Tech Stack: Built end to end: a FastAPI backend, scikit-learn ML models, Polars for fast data processing, a Next.js frontend, and Recharts visualizations, all running on synthetic data generated in Python and shipped as a Dockerized deployment hosted on Railway. Reactive inputs tie it together, so changing any control recomputes the pipeline instantly.

What I Learned: The biggest takeaway was connecting the full stack of programmatic decision-making: supply forecasting, impression valuation, market simulation, auction mechanics, and autonomous strategy recommendation. The future of programmatic is not just smarter bidding models, but AI systems that can reason through campaign goals, delivery risk, budget constraints, reach, and cost trade-offs in real time.

Educational simulator built on 100% synthetic data. It does not use real campaign data, exchange feeds, scraping, or PII, and is not a production ad platform.

View live project

GitHub repository

All projects

Anushka Mathur | Marketing Analytics Portfolio