Partner Center Find a Broker

Time-Weighted Average Price (TWAP) is a trading algorithm based on the weighted average price used for the execution of bigger orders without excessive impact on the market price.

It may be easy to guess the trading pattern of the running strategy if its orders are not modified in a special way, so parameters can be adjusted to make strategy harder to track.

The most common solutions are randomizing orders’ size and/or delay time between them.

It is possible to limit the quantity to not exceed a defined percent of volume, to minimize strategies’ impact on the market.

Time-Weighted Average Price (TWAP) is another trading algorithm based on a weighted average price.

Compared to Volume Weighted Average Price, its calculations are simpler. I

t’s one of the first execution algorithms and unlike most algo trading strategies, it’s a passive execution algorithm that waits for the proper market price to come, rather than chase it.

How to Use TWAP

The most common use of TWAP is for distributing big orders throughout the trading day.

For example, you want to buy 100,000 shares of Apple.

Putting one big order would probably impact the market causing the price to rise. To prevent this, you can define a time period over which you want to buy shares.

The TWAP algo will slice the big order evenly into smaller ones and execute them over a defined time period.

TWAP can be used as an alternative to VWAP, but because of its simplicity, there are some pitfalls.

Even if you slice big orders, since you do it evenly, there is still the possibility of trading during a low liquidity period where your sliced-up orders would still impact the market.

This is why using TWAP is recommended over short periods or on assets that don’t have any volume profile available.

Randomized Orders

Trading in such a predictable way can lead to a situation where other traders or predatory algorithms would detect your strategy and start to “game” you.

You can add randomness by focusing on percentage completion over time rather than fixed quantities.

In practice, it means that when we have run 1-hour TWAP, you don’t slice the order into even parts. Instead, you target percentage completion.

For example, you can target to have 25% of the strategy completed by the first 15 minutes, 50% by the second, and 75% by the third.

This gives more freedom into that size of orders and allows your orders to look more random and less predictable.

TWAP vs VWAP

Despite VWAP being more complex since it includes volume in its calculation, on instruments with low turnover, TWAP and VWAP values can be close.

On the other hand, when a session starts to become volatile, both indicators will diverge.

In the table below, TWAP and VWAP calculated for the entire trading day.

As we can see at the beginning of the trading day, the difference is less than a cent, but at the end of the day, the difference raised up to 2 cents.

This happens because, during the day, there were some small volume trades for lower prices that affected TWAP but didn’t affect VWAP.

Time Close High Low Open TWAP VWAP
09:44:00 100.81 100.85 100.80 100.85 100.900 100.904
09:45:00 100.69 100.80 100.67 100.80 100.890 100.887
15:57:00 100.70 100.70 100.68 100.69 100.666 100.686
15:58:00 100.71 100.72 100.68 100.70 100.666 100.686