Trading · BraivIQ AI Engineering Playbook
Building Execution Algorithms In Code: VWAP, TWAP, POV And Implementation Shortfall From The Ground Up
When an institution needs to buy a million shares, it does not send a single order - that would move the market against itself and pay a fortune in impact. Instead it hands the order to an execution algorithm that slices it into many small child orders released into the market over time according to a strategy. Nearly every institutional order today is routed through one of these, and building them well is a specialised, high-stakes corner of trading engineering that most developers never see. This playbook, from a team that specialises in trading systems, is a code-side tour of the core execution algorithms - VWAP, TWAP, POV (percent of volume) and implementation shortfall - what each one actually does, how the child-order scheduler at the heart of them works, and the engineering that separates an algorithm that quietly saves money on every order from one that leaks it. It is about the software of best execution: how you turn a big parent order into a stream of small ones, intelligently.
· 13 min read · By BraivIQ Engineering
Parent → children - An execution algorithm slices one large parent order into many small child orders released into the market over time · VWAP / TWAP / POV / IS - The core institutional execution algorithms, each with a different objective and scheduling logic · The scheduler - A child-order scheduler is the heart of every execution algorithm - deciding how much to trade, when, and how · Impact vs risk - Every algorithm trades off market impact (from trading fast) against timing risk (from trading slow)
Here is a problem most software engineers have never had to think about, and it is at the heart of institutional trading: if you need to buy a million shares of something, you cannot simply send an order for a million shares. Doing so would announce your demand to the entire market, push the price up against yourself as you bought, and cost you dearly in what traders call market impact. The solution, used for nearly every large institutional order today, is an execution algorithm: a piece of software that takes your large parent order and slices it into many small child orders, releasing them into the market gradually over time according to a strategy designed to get you a good average price without moving the market. Building these algorithms well is a specialised and genuinely high-stakes corner of trading engineering - a subtle bug does not crash a page, it executes worse and quietly loses real money on every order - and it is a domain BraivIQ specialises in. This playbook is a code-side tour of the core execution algorithms, what each actually does, and the engineering underneath them.
The Core Algorithms And What Each Optimises
The four workhorse execution algorithms each answer the same question - how do I release child orders over time? - with a different objective, and understanding those objectives is the key to implementing them. TWAP (time-weighted average price) is the simplest: it spreads the order evenly across a time window, trading roughly the same amount in each interval regardless of what the market is doing, aiming to track the average price over time. It is predictable and easy to reason about, which is exactly its appeal and its weakness - it ignores liquidity, so it trades just as hard in a thin, quiet period as in a busy one. VWAP (volume-weighted average price) is the most widely used benchmark: instead of trading evenly across time, it trades in proportion to expected market volume - more when the market is busy, less when it is quiet - so that its own trading blends into the natural flow and it tracks the volume-weighted average price. This requires a volume profile: a model, usually built from historical data, of how volume is typically distributed across the trading day, so the algorithm knows to expect heavy volume at the open and close and lighter volume midday. POV (percent of volume, also called participation) takes a different tack: rather than following a pre-planned schedule, it targets a fixed percentage of whatever volume is actually trading in real time - say 10% of market volume - so it speeds up and slows down dynamically with live conditions. And implementation shortfall (IS) is the most sophisticated: it explicitly optimises the trade-off between market impact (trade too fast and you move the price) and timing risk (trade too slow and the price may drift away from you before you are done), front-loading or back-loading the schedule based on that balance, aiming to minimise total cost relative to the price when the decision was made. Each is a different answer to the same scheduling question, and choosing among them is choosing which cost you most want to control.
- TWAP - trade evenly across a time window; simple and predictable, but ignores liquidity so it trades as hard in quiet periods as busy ones.
- VWAP - trade in proportion to expected volume (from a historical volume profile) so your flow blends into the market's; the standard benchmark.
- POV / participation - target a fixed percentage of live market volume, speeding up and slowing down dynamically with real conditions.
- Implementation shortfall (IS) - explicitly balance market impact against timing risk to minimise total cost versus the decision price.
- Same question, different objective - all four decide how to release child orders over time; each controls a different cost.
The Child-Order Scheduler At The Heart Of It
Underneath every one of these algorithms sits the same core component - a child-order scheduler - and building it well is most of the engineering. The scheduler's job is a loop over the life of the parent order: given the target (the total quantity, the time horizon, the strategy's objective), decide at each moment how much to trade now, at what price limit, and how to place it, then observe what actually filled and adjust. The differences between VWAP, TWAP, POV and IS are, in code terms, largely differences in how the scheduler computes the next slice: TWAP divides remaining quantity by remaining time; VWAP weights the next slice by the expected volume in the coming interval from its profile; POV looks at recently observed market volume and takes its target percentage; IS solves the impact-versus-risk optimisation to decide how aggressive to be right now. But all of them share the same hard engineering concerns beyond the slicing formula. They must track state precisely: how much of the parent is filled, how much remains, how the schedule is tracking against target, so the algorithm can catch up or ease off. They must handle partial and missed fills: a child order may fill fully, partially, or not at all, and the scheduler must react correctly rather than assuming its orders executed. They must be robust to the market moving and to their own orders being rejected or cancelled. And they must do all this continuously, in real time, correctly - because an error in fill tracking or scheduling does not look wrong, it just executes badly. The scheduler is where a good execution algorithm is actually built or broken.
The Bottom Line
Execution algorithms exist to solve a problem unique to trading at size: you cannot send one large order without moving the market against yourself, so you slice the parent order into many small child orders and release them over time intelligently. The four workhorses each optimise a different objective - TWAP spreads evenly across time, VWAP trades in proportion to expected volume to blend into the market, POV participates at a fixed percentage of live volume, and implementation shortfall explicitly balances market impact against timing risk to minimise total cost - so choosing among them is choosing which cost to control. Underneath all of them is a child-order scheduler whose real engineering is not the slicing formula but the surrounding discipline: precise fill tracking, correct handling of partial and missed fills, robustness to a moving market, and continuous real-time correctness. And the failure modes are quiet - mis-tracked fills, liquidity-blind schedules, drift from benchmark - which is why execution algorithms demand the correctness of a financial calculation and testing against realistic fills, because their entire value lives in the small basis-point numbers a careless implementation silently leaks. Turning a big parent order into a well-worked stream of small ones is a specialised craft where the software directly determines the cost of trading - and it is exactly the kind of correctness-critical trading engineering we specialise in.
References & Further Reading
- OpenAlgo - execution algorithms: VWAP, TWAP, POV and IS: https://openalgo.in/quant/execution-algorithms
- QuestDB - algorithmic execution strategies (glossary): https://questdb.com/glossary/algorithmic-execution-strategies/
- Quantt - VWAP explained: formula, uses and VWAP vs TWAP 2026: https://www.quantt.co.uk/resources/vwap-explained
- Medium (Simone Menaldo) - a deep dive into execution algorithms: https://medium.com/@simomenaldo/a-deep-dive-into-execution-algorithms-757d0f77c3d6
- Nurp - quant trading platform features: complete 2026 guide (execution algos, child-order schedulers): https://nurp.com/algorithmic-trading-blog/quant-trading-platform-features/