Projects

VWAP execution research engine

Given a parent order to buy 50,000 shares of SPY, how should it be spread across the day, and how do you measure whether the schedule did well?

C++, multithreading, CMake, 2026. Code on GitHub

execution cost vs. market VWAP, baseline schedule
5.14 bps
extra cost on the 50,000-share order
≈ $3,371
SPY trade and quote messages processed
2 GB+

The question

This project is about the execution layer, not alpha. A parent order has already been decided upstream; the job is to split it across the session and judge the result against the market's own volume-weighted price. It started as a large-file processing assignment and is growing into a fuller execution research engine.

Approach

Results

My VWAP131.210
Market VWAP131.142
Difference0.0674 (5.14 bps)
Market volume on test date169,197,102 shares
Buy 50,000 SPY on 21 May 2012, 15-minute volume-profile schedule

For a buy order a higher VWAP means a higher cost, so the baseline paid about 5.14 bps over the benchmark, roughly $3,371 on the order. That number is a cost relative to a benchmark, not a trading profit or loss.

What I learned

Next

Tick-aware and regression-based execution prices, quote-aware simulation with bid/ask imbalance, partial fills with carry-over, and a rolling 20-day multi-day backtest with win rate and dispersion of results.