TWAP vs. VWAP Price Algorithms | Share India
Right Arrow

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 VWAP and 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, generally abbreviated as VWAP, 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, and we get the following formula to calculate the VWAP.

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

Here, the typical price is nothing but the average of the high, low, and closing price of the asset. To calculate this you add the high, low, and closing price, and divide the sum by 3. On the other hand, 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 in a span of a decided 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, generally abbreviated as TWAP, is also a weighted average indicator like the VWAP. However, unlike the VWAP, the TWAP calculates the weighted price while accounting the criterion on time alone. This indicator, too, is used by algo trading firms like the VWAP. However, since these indicators calculated the weighted average price on the criterion of time alone, it is much easier to understand.

So, to put it mathematically, the for 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

The TWAP indicator is used by traders 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 each order. So the algorithm can place 12 orders of 5,000 shares and 4 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. The difference between VWAP and TWAP is laid out in the following table.

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 = Typical Price*Volume/Cumulative Volume The 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/3 In the case of TWAP, 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.


To conclude the article on the difference between VWAP and TWAP, both weighted average price 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 more 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.

Frequently Asked Questions (FAQs)

The VWAP, similar to a moving average indicator, is a lagging indicator, so, by the time the price cuts above the VWAP line, the price is already in the midst of an uptrend. Likewise, when the price cuts under the VWAP line, the price is already in the midst of a downtrend. Due to its lagging characteristics, the VWAP, and, for that case, even the TWAP, are more useful in confirming the trend than predicting it.

High-Frequency Trading or HFT strategies can be built around both the volume-weighted average price (VWAP) and the time-weighted average price (TWAP).

If you are familiar with basic to intermediate level mathematics, you can easily calculate the VWAP and TWAP. However, since the TWAP only accounts for time as opposed to the VWAP, which accounts for both volume and time, the TWAP is easier to calculate.
Hidden Footer Popup