Difference between VWAP and TWAP Algorithms

Open Free Demat Account

*T&C Apply
*T&C Apply

Algorithmic trading is the predominant trading method adopted by institutions like mutual funds and insurance companies. As algorithmic trading is performed by computer programmes and algorithms, it is free from the intervention of human emotions. At the same time, algorithms are capable of executing trades at high frequencies. Moreover, today, this technology-driven method is slowly but gradually becoming accessible to the retail investor. Like regular online share trading strategies, algo-trading strategies also implement technical indicators.

So, in this article, let us understand the difference between volume-weighted average price (VWAP) and time-weighted average price (TWAP), which are two widely used technical indicators in algo-trading. To understand the difference between VWAP and TWAP, let us comprehend the uniqueness of each indicator.

What Is VWAP?

The volume-weighted average price is a weighted average price indicator widely used for intraday algo-trading. This indicator is used by both institutional traders like mutual fund managers as well as retail traders with access to algo-trading infrastructure. The computation of the VWAP takes into account the trading volume of the asset and the price of the asset throughout the trading day. Based on those variables, it computes the average price of the stock.

So, if we had to define the VWAP, it is the ratio of the value traded to the total volume traded over a specific time period. To simplify it, let us represent it mathematically:

VWAP = Cumulative Typical Price*Volume/Cumulative Volume = Cumulative TP*V/CV

Here, the typical price is nothing but the average of the high, low, and closing price of the asset, and cumulative refers to the total since the session opened. To calculate this, you add the high, low, and closing prices and divide the sum by 3. On the other hand, the volume represents the value traded at a specific point, and the cumulative volume is the total volume traded during the trading session. The orders are executed within a defined time frame. This helps in executing large orders without affecting the market.

Working of the VWAP

The VWAP assesses the average trading volume over a well-defined period, like a day chart with a 5-minute interval. As the VWAP also computes volume, it helps pinpoint zones of interest on the price charts. Those zones of interest indicate a high level of buying or selling transactions. If you add the VWAP to your price chart, a VWAP line will form on the price chart. If the price of the asset is above that line, the price is going through an uptrend. On the other hand, if the price is under the VWAP line, the price is enduring a downtrend. So, traders may take long positions when the price crosses above the VWAP. And conversely, they may take short positions when the price cuts under the VWAP line.

What Is TWAP?

The time-weighted average price is also a weighted average indicator like the VWAP. However, unlike the VWAP, the TWAP calculates the weighted price while accounting for the criterion of time alone. This indicator, too, is used by algo-trading firms. However, since this indicator calculates the weighted average price on the criterion of time alone, it is much easier to understand.

So, to put it mathematically, the formula to calculate the TWAP is as follows:

TWAP of X days = (Average Price of Day 1 + Average Price of Day 2 + Average Price of Day 3 + …. + Average price of Day X)/X

Here, to calculate the average price of each day, you take the open, close, high, and low of the day and divide it by 4.

Working of the TWAP

Traders use the TWAP indicator to place market orders at specific time intervals and break a large order into multiple small orders. For example, using the TWAP, an algorithm can split an order size of 1,00,000 shares into multiple orders of 5,000 or 10,000 shares in each order. So, the algorithm can place 12 orders of 5,000 shares and four orders of 10,0000 shares in a specific time period. Similar to VWAP, TWAP also helps fund managers and other institutions transact a massive quantity of shares or assets without severely impacting the price of that share or asset.

TWAP vs. VWAP: The Difference

Now that you know what the volume-weighted average price and time-weighted average price are, let us look at the difference between VWAP and TWAP.

VWAPTWAP
The full form of VWAP is volume-weighted average price.The full form of TWAP is time-weighted average price.
The mathematical formula of VWAP is: VWAP = Cumulative Typical Price*Volume/Cumulative VolumeThe mathematical formula of TWAP is: TWAP of X days = (Average Price of Day 1 + Average Price of Day 2 + Average Price of Day 3 + …. + Average price of Day X)/X
In the case of VWAP, Typical Price = high price + low price + closing price/3In the case of TWAP, the Average Price of a Day = open price + close price + high price + low price/4
Both volume and time are key criteria to compute the VWAP.The TWAP only considers the criterion of time.
Since it relies on more than one variable, the VWAP trading strategy is more reliable and less predictable.As it relies on only one variable, the TWAP trading strategy is predictable.
Hence, the VWAP is considered to be the more advanced of the two.On the other hand, the TWAP is considered to be more primitive.

Conclusion

Both VWAP and TWAP strategies are widely used by algorithmic traders for trading in the capital markets. However, since strategies built around the VWAP are more reliable and less predictable by other traders, the VWAP is the preferred indicator out of the two. That said, the TWAP is relatively simpler, and strategies built around it can be made less predictable by adding an element of randomness to the order size while still keeping an upper limit. In addition to exploring VWAP and TWAP strategies, it’s important for traders to understand the distinction between block deals vs. bulk deals, which involve significant quantities of shares traded in a single transaction.

Frequently Asked Questions (FAQs)