VWAP Tutorial: Calculation, Uses, and Limitations

13 min read

By Rekhit Pachanekar

The Volume Weighted Average Price (VWAP) is simple to calculate and has a variety of uses. While a Hedge Fund or Mutual fund uses it to guide their decision while buying a substantial number of shares, a retail trader would use it to check if the price at which he traded was a good price or not. There are also intraday traders who will use it as an indicator and buy when the price is below the VWAP.

But exactly what is VWAP?

In this blog, we will understand the VWAP and also how to calculate it. Along the way, we will also compare it with another simple indicator, i.e. the moving average and understand its advantages and disadvantages, We will see if we can create an intraday trading strategy using VWAP. We will cover the following points in this blog

What is VWAP?

Let’s face it, at its fundamental level, if we had to compare two seemingly good securities, more often than not, we would check its price trend and the trading volume. Price is obvious, but why the volume?

Volume is important as we don’t want to get stuck with a stock which has few takers, even if you think it is priced attractively. Thus, the VWAP was created to take into account both volume as well as Price so that the potential investor would make the trading decision or not.

In simple terms, the Volume Weighted Average price is the cumulative average price with respect to the volume.

The formula for calculating VWAP is as following:

VWAP = (Cumulative (Price * Volume)) / (Cumulative Volume)

While we can go through the formula easily, we thought we would understand VWAP by going through an example itself.

Calculating the VWAP in Excel

To calculate VWAP, we take the daily minute-by-minute data of Tesla, which has the dubious distinction of being one of the most volatile stocks. You can get sample historical data from Alpha Vantage. We have used the daily data for the date of 18 October 2019. A sample of the data is as follows:

Date

Open

High

Low

Close

Volume

2019-10-10 9:31:00

245.2903

245.516

244.7652

244.8702

103033

2019-10-10 9:32:00

245.0807

245.0807

244.55

244.66

21168

2019-10-10 9:33:00

244.58

245.8

244.55

245.6

36544

2019-10-10 9:34:00

245.7097

246.09

245.57

245.92

30057

2019-10-10 9:35:00

245.62

245.62

245.62

245.62

26301

2019-10-10 9:36:00

245.7126

246.44

245.7126

246.188

31494

2019-10-10 9:37:00

246.46

246.46

246.45

246.45

24271

2019-10-10 9:38:00

246.755

246.755

246.25

246.25

37951

2019-10-10 9:39:00

246.2818

246.655

246.2818

246.655

15324

2019-10-10 9:40:00

246.78

246.78

246.56

246.762

23285

2019-10-10 9:41:00

246.75

246.75

246.38

246.5

23365

2019-10-10 9:42:00

246.17

246.17

246.17

246.17

16130

2019-10-10 9:43:00

246.135

246.135

245.82

245.82

27227

2019-10-10 9:44:00

245.9335

245.9335

245.91

245.91

14464

2019-10-10 9:45:00

246.41

246.41

246.41

246.41

17156

2019-10-10 9:46:00

246.44

246.46

246.1683

246.1683

23938

2019-10-10 9:47:00

246.2857

246.57

246.2857

246.57

70833

2019-10-10 9:48:00

246.6

247.47

246.6

247.47

59743

2019-10-10 9:49:00

247.49

247.65

247.49

247.65

71995

2019-10-10 9:50:00

247.685

247.801

247.65

247.69

46038

2019-10-10 9:51:00

247.95

248.74

247.95

248.74

103773

2019-10-10 9:52:00

248.56

248.56

247.95

247.95

73810

2019-10-10 9:53:00

247.93

247.93

247.6614

247.6614

29784

2019-10-10 9:54:00

247.74

247.76

247.65

247.76

37138

2019-10-10 9:55:00

247.93

248.03

247.93

248.03

53166

2019-10-10 9:56:00

247.91

248.44

247.91

248.44

40789

2019-10-10 9:57:00

248.52

248.52

248.3154

248.3154

51988

2019-10-10 9:58:00

248.4409

248.62

248.4409

248.62

53405

2019-10-10 9:59:00

248.9199

248.9199

248.9199

248.9199

85348

2019-10-10 10:00:00

248.91

249.08

248.42

248.72

58270

Step 1: Find the average or Typical price

To get a reliable estimate of the price at which a security was traded for a given period, we take the average of the values, in this case, the average of the high, low, and close price.

Thus, for 9:31, the average price = (245.516 + 244.7652 + 244.8702)/3 = 245.0504667.

Similarly, for 9:32, the average price = (245.0807+ 244.55+ 244.66) / 3 = 244.7635667

Step 2: Multiply the Typical price with the volume for that period and add the cumulative total of the previous period

Since we are looking for a period of 9:31, the volume traded was 103033.

Thus, (Price * Volume) = 245.0504667 * 103033 = 25248284.73

Since it was the first period of the day, it was a simple multiplication. From the second column onwards, we take the cumulative total, ie adding the previous period’s value to the current value.

Thus, for 9:32, with volume at 21168, the cumulative average price = ((Average price at 9:32) * volume at 9:32) + cumulative total at 9:31

= [244.7635667 * 21168] + 25248284.73 = 30429439.91

Step 2.5: Find the cumulative total volume

Since we found the cumulative average price * volume, we have to keep a running total of the volume of the security traded.

Hence, for 9:31, it will just be 103033 as it is the first period of the day.

For 9:32, it will be (Volume at 9:32) + cumulative volume of the previous period, ie (21168 + 103033) = 124201.

Step 3: Find VWAP

We simply divide the cumulative price * volume by the cumulative volume.

Thus, for 9:31, VWAP = 25248284.73 / 103033 = 245.0504667

For 9:32, VWAP = 30429439.91 / 124201 = 245.0015693

Thus, the excel sheet would look something like this:

Date

Open

High

Low

Close

Volume

Average Price

Average price*Volume

Cumulative Volume

VWAP

2019-10-10 9:31:00

245.2903

245.516

244.7652

244.8702

103033

245.0504667

25248284.73

103033

245.0504667

2019-10-10 9:32:00

245.0807

245.0807

244.55

244.66

21168

244.7635667

30429439.91

124201

245.0015693

2019-10-10 9:33:00

244.58

245.8

244.55

245.6

36544

245.3166667

39394292.18

160745

245.073204

2019-10-10 9:34:00

245.7097

246.09

245.57

245.92

30057

245.86

46784106.2

190802

245.1971478

2019-10-10 9:35:00

245.62

245.62

245.62

245.62

26301

245.62

53244157.82

217103

245.2483744

2019-10-10 9:36:00

245.7126

246.44

245.7126

246.188

31494

246.1135333

60995257.44

248597

245.3579787

2019-10-10 9:37:00

246.46

246.46

246.45

246.45

24271

246.4533333

66976926.29

272868

245.4554081

2019-10-10 9:38:00

246.755

246.755

246.25

246.25

37951

246.4183333

76328748.46

310819

245.5729812

2019-10-10 9:39:00

246.2818

246.655

246.2818

246.655

15324

246.5306

80106583.37

326143

245.6179755

2019-10-10 9:40:00

246.78

246.78

246.56

246.762

23285

246.7006667

85851008.4

349428

245.6901233

2019-10-10 9:41:00

246.75

246.75

246.38

246.5

23365

246.5433333

91611493.38

372793

245.7435987

2019-10-10 9:42:00

246.17

246.17

246.17

246.17

16130

246.17

95582215.48

388923

245.761283

2019-10-10 9:43:00

246.135

246.135

245.82

245.82

27227

245.925

102278015.5

416150

245.7719944

2019-10-10 9:44:00

245.9335

245.9335

245.91

245.91

14464

245.9178333

105834971

430614

245.776893

2019-10-10 9:45:00

246.41

246.41

246.41

246.41

17156

246.41

110062381

447770

245.80115

2019-10-10 9:46:00

246.44

246.46

246.1683

246.1683

23938

246.2655333

115957485.3

471708

245.8247163

2019-10-10 9:47:00

246.2857

246.57

246.2857

246.57

70833

246.4752333

133416065.5

542541

245.9096465

2019-10-10 9:48:00

246.6

247.47

246.6

247.47

59743

247.18

148183340.2

602284

246.035658

2019-10-10 9:49:00

247.49

247.65

247.49

247.65

71995

247.5966667

166009062.3

674279

246.202332

2019-10-10 9:50:00

247.685

247.801

247.65

247.69

46038

247.7136667

177413304

720317

246.2989268

2019-10-10 9:51:00

247.95

248.74

247.95

248.74

103773

248.4766667

203198473.2

824090

246.5731573

2019-10-10 9:52:00

248.56

248.56

247.95

247.95

73810

248.1533333

221514670.7

897900

246.7030523

2019-10-10 9:53:00

247.93

247.93

247.6614

247.6614

29784

247.7509333

228893684.5

927684

246.7366954

2019-10-10 9:54:00

247.74

247.76

247.65

247.76

37138

247.7233333

238093633.7

964822

246.7746731

2019-10-10 9:55:00

247.93

248.03

247.93

248.03

53166

247.9966667

251278624.4

1017988

246.8384936

2019-10-10 9:56:00

247.91

248.44

247.91

248.44

40789

248.2633333

261405037.5

1058777

246.893385

2019-10-10 9:57:00

248.52

248.52

248.3154

248.3154

51988

248.3836

274318004.1

1110765

246.9631327

2019-10-10 9:58:00

248.4409

248.62

248.4409

248.62

53405

248.5603

287592367

1164170

247.036401

2019-10-10 9:59:00

248.9199

248.9199

248.9199

248.9199

85348

248.9199

308837182.6

1249518

247.1650529

2019-10-10 10:00:00

248.91

249.08

248.42

248.72

58270

248.74

323331262.4

1307788

247.2352265

Great! We have just understood how to find the VWAP for a security. If we plot the VWAP with the closing price for the whole day, we will get the graph as seen below:

Now you must be wondering why we have used 1-minute data for calculating the VWAP. The truth is, we can calculate the VWAP on different time periods, be it a 5 minute, 10 minute time period etc.

However, a point to note is that VWAP is only calculated for the day and thus cannot be used for periods ranging to multiple days. We will understand why this is so in the next section of the VWAP Tutorial.

How to use VWAP

VWAP as trend confirmation

We have mentioned before how VWAP gives us information related to both volume as well as price. It also helps us confirm the presence of any trend which might be emerging in the day.

Let’s understand this with the VWAP of the Tesla share we calculated previously.

If you see the graph for VWAP, despite the frequent swings in the closing price, we can clearly see that the VWAP is rising. The rising VWAP indicates that there are more buyers than sellers.

Similarly, a rising VWAP can indicate a bullish phase whereas a decreasing VWAP will indicate a bearish phase.

VWAP as a trade execution strategy

VWAP is also used by institutional buyers who need to buy or sell a large number of shares but do not want to cause a spike in the volume as it attracts attention and affects the price.

To explain this further, let’s say an institution is interested in buying 10000 shares of Tesla. If it puts an order of 10,000, the immediate action would be a spike in the price as the exchange fills the order. Now, if other traders know that there is a big demand for the share, they would try to buy the share at a higher price than the bid price of the institution and sell it back at a higher price, effectively increasing the ask price of the share.

To avoid this scenario, these institutions develop an automated trading strategy to divide the number of shares into smaller amounts and bid for the shares in such a way that their trades do not let the closing prices go far from the VWAP. Since VWAP acts as a guideline on which certain traders base their trading decisions on, it helps to keep the closing price as close to the VWAP as possible.

VWAP as an Indicator

Among intraday traders, the VWAP indicator can be used in a trading strategy too. There are conflicting theories on how exactly you should use the VWAP as an indicator, and thus we will try to understand this aspect in greater detail. We usually consider scenarios when the closing price crosses the VWAP as a signal, and thus, a VWAP cross can be used to enter or exit the trade depending on your risk profile.

Before we look at the different scenarios, let’s step back and understand that VWAP can actually be self-fulfilling when it comes to traders. As seen previously, certain institutional traders would try to execute trades in such a way that the closing price doesn’t go farther than the VWAP. This can influence other traders who would look at the closing price and take a trading decision thinking that the closing price is bound to get close to the VWAP eventually.

Hence, when the closing price starts moving up and farther from the VWAP, there is pressure among the traders to sell, due to the logic that the other would sell at any time. This creates a situation where the general belief might be that the stock is overvalued. Similarly, when the closing price starts moving down and further from the VWAP, there is a belief that the stock is undervalued and there is a pressure among traders to buy the stock.

In this way, we can call VWAP as self-fulfilling. Of course, depending on the mindset of the community, there can be different scenarios and thus, one cannot depend on VWAP alone to make a trading decision.

Let us now look at a few other scenarios.

Some traders prefer the VWAP cross as an indicator and buy the stock when the closing price crosses the VWAP and climbs higher, indicating a bullish trend. One will then either wait for the closing price to reach the high of the day at which point they sell and exit the trade. Other traders will exit as soon as the closing price shows signs of reversing. 

At the other end, some traders would short the stock when the closing price crosses the VWAP and keeps going down. Once the closing price reaches the low of the day, they would then close the trade.

Now, some traders would prefer a price below VWAP as a good price to buy and a price above VWAP could indicate that it is a good time to sell. Taking the previous VWAP chart for Tesla, you can see as the price goes above the VWAP there is a small period where the price keeps increasing and then the price decreases.

It is however seen that for the trading strategy, traders consider the crossover of the closing price with the VWAP as a signal. However, one should note that the VWAP lags behind the closing price and thus should not be the sole indicator in a trading strategy.

VWAP as a check of Profitability

Once traders ave closed their trade, they look at the VWAP to check if their trade was profitable or not. For example, if a trader had bought a share of Tesla at $248 and the VWAP at the end of the day was $250, then the trader actually bought the stock at a good price and can make a profit on this trade.

We have so far seen some of the uses of VWAP. However, while going through the article, did you feel some sort of deja vu or realized you have read about something similar with a different name? Do you think VWAP is just another variation of a moving average?

VWAP versus Moving Average

If you remember Moving averages, at its basic level, it is simply an average of 10 (or 20 depending upon your choice of the period) recent average prices. In fact, after 500 minutes, you can say that the VWAP is comparable to the 499 period moving average.

However, to say that the VWAP is similar to the moving average will not be right due to the simple fact that VWAP starts fresh at the open whereas the moving average contains past data as well.

Thus, while the moving average would be similar to VWAP at the end of the day, it will not be the same throughout the day.

Great! Not only do we know how to calculate the VWAP, but we also saw its uses and compared it with another popular indicator. But are there any limitations to VWAP? Let’s find out.

Limitations of VWAP

As we have mentioned earlier. VWAP is a lagging indicator and thus, if you try to use it for more than a day, it will not be able to portray the correct trend.

Thus, it should be used only for intraday.

Furthermore, there are cases where certain stocks (or the market itself) are in a strong bullish phase and thus there will be no crossovers for the entire day, which in turn portrays very little information to the traders as well as institutions. In a way, the major drawback of VWAP is it cannot be used for more than a day, and thus, not able to provide much information from a historical point of view.

Conclusion

We have understood that the VWAP is a combination of both price and volume, and thus provides valuable information, compared to the moving averages. We also learned how to calculate the VWAP in Excel and how to interpret it when used alongside the closing price. In the end, we also understood its limitation as a tool only for intraday traders and not for a long term investor.

You can learn more about technical indicators and build your own trading strategies by enrolling in the Quantitative Trading Strategies and Models course on Quantra.

If you want to learn various aspects of Algorithmic trading then check out our Executive Programme in Algorithmic Trading (EPAT®). The course covers training modules like Statistics & Econometrics, Financial Computing & Technology, and Algorithmic & Quantitative Trading. EPAT® is designed to equip you with the right skill sets to be a successful trader. Enroll now!

Disclaimer: All data and information provided in this article are for informational purposes only. QuantInsti® makes no representations as to accuracy, completeness, currentness, suitability, or validity of any information in this article and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use. All information is provided on an as-is basis.