Volume-Weighted Average Price (VWAP): Explained
Volume Weighted Average Price (VWAP) is the average trading price of a security throughout the day using both price and volume. It provides traders an insight into the price trend where volume is highest.
Key Takeaways
- Volume-weighted average price or VWAP is the cumulative share price ratio to the cumulative volume traded over a certain period.
- Institutions and traders use VWAP to identify buy and sell areas.
- VWAP helps gauge market sentiment and relative trend strength.
Table of Contents
- What Is VWAP?
- Why Use VWAP?
- VWAP Formula
- Calculating VWAP in Python
- Pros & Cons of VWAP
- VWAP Strategies
- VWAP FAQs
- The Bottom Line
What Is VWAP?
VWAP or the Volume Weighted Average Price shows the average price of all shares throughout the analysis period. More specifically, VWAP computes the average based on how many shares were bought and sold at various prices throughout the period divided by the total number of shares transacted. This can be for a single time frame or multiple frames depending on the situation.
Traders often use VWAP to plan their entry and exit. The VWAP is depicted on the chart as a moving average, as seen below.
VWAP, as shown as the purple line in the price chart above, demonstrates the equilibrium level of a stock’s intraday trading price. Hence it is often used as a support and resistance indicator. Traders closely observe the distance of the price action from VWAP.
Why Use VWAP?
Various kinds of traders use VWAP. Besides day traders, mutual fund portfolio managers also use VWAP as a benchmark when buying a large stock block for a particular scheme. Even large institutional investors or pension plans taking influential positions use the VWAP as a guideline to understand if their buy order is at the right price without causing significant market impact. In the same way, retail traders also use VWAP as an indicator to judge a stock’s prospects.
VWAP gives insight into how the price action is moving relative to volume and helps determine momentum and trade direction.
VWAP Formula
Traders typically calculate the price in “VWAP’’ as the average of the high, low, and close, which we’ll call the TP or typical price. Traders use TP instead of price alone to get a more accurate summation than just the close. The number of periods equal to one session when calculating VWAP.
$% TP = \frac{high + low + close}{3} $%
$% VWAP = \frac{TP_1 * V_1 + TP_2 * V_2 + TP_n * V_n}{n} $%
VWAP considers both the volume and price of a stock in its formula. The formula helps us understand where most shares traded, not just the most recent trade.
For instance, if a stock traders 1000 shares at $10 and then one-hundred shares trade at $11, the final traded price is $11; however, the VWAP would be much closer to ten:
$% \frac{1000 * 10 + 100 * 11}{(1000 + 100)} = 10.09 $%
When this is calculated over a specific period, it creates a VWAP for each data point. Instead of using the session average, some traders use an MVWAP, a moving average of the previous n VWAP calculations, where n can be any period the trader selects.
Traders these days use software to perform the VWAP calculation, which displays an overlay on the chart denoting the calculations – typically in the form of a line. Some traders add the standard deviation of VWAP to find mean reversion trades:
Calculating VWAP in Python
The following function calculates the volume weight average price for each session period and the group by groups the session into a single dataframe.
# Get imports
import datetime
import pandas as pd
# Create example dataframe
df = pd.DataFrame(
index=[datetime.datetime(2021,1,1,1),
datetime.datetime(2021,1,1,2),
datetime.datetime(2021,1,1,3),
datetime.datetime(2021,1,1,4)],
data={
'low':[9,10,11,12],
'close':[10,11,12,13],
'high':[11,12,13,14],
'volume':[1000,750,500,250]
}
)
df.index.rename(‘date’, inplace=True)
low close high volume
date
2021-01-01 01:00:00 9 10 11 1000
2021-01-01 02:00:00 10 11 12 750
2021-01-01 03:00:00 11 12 13 500
2021-01-01 04:00:00 12 13 14 250
# Create VWAP function
def vwap(df):
v = df['volume'].values
tp = (df['low'] + df['close'] + df['high']).div(3).values
return df.assign(vwap=(tp * v).cumsum() / v.cumsum())
vwap(df)
low close high volume vwap
date
2021-01-01 01:00:00 9 10 11 1000 10.000000
2021-01-01 02:00:00 10 11 12 750 10.428571
2021-01-01 03:00:00 11 12 13 500 10.777778
2021-01-01 04:00:00 12 13 14 250 11.000000
# Verify VWAP
## Can use close price as it’s the same as tp
(10*1000 + 11*750) / (1000+750)
10.427571 # correct, matches our dataframe!
Pros & Cons of VWAP
Benefits
Market Sentiment
Volume-weighted average price plays a significant role in helping traders to understand the market sentiment. When the security price trades above the VWAP line, it’s considered bullish, and when the price is below the VWAP line, it is a bearish trend. Remember, for VWAP to make a significant move, price movements need to come with volume.
Minimizes Risk
Traders can measure the variation of the price from the VWAP level using measures like the standard deviation. Being an average price, VWAP can help traders and chartists not purchase securities at overextended prices, as shown in the VWAP standard deviation envelopes on the price chart above.
Potential Support & Resistance
With the majority of intraday trading coming from institutions and their algos, VWAP often acts as support and resistance.
Drawbacks
VWAP has gained a lot of popularity because of its simplicity of usage and its widespread application. However, VWAP has several drawbacks that impact its use.
Lagging Indicator
Like other moving averages, VWAP is a lagging indicator which means it is based on previous price points. As the trading volume accumulates during the day and more periods are added to the session, the lag widens. Moreover, calculations near the end of the trading session affect the VWAP less than earlier data.
Trading Volume Fluctuates
The trading volume fluctuates throughout the day. The maximum bulk of the volume is visible just after the opening and just before the closing. Thus, if you use 30-minute or 60-minute charts, i.e., “relatively” long charts, the VWAP data would lag behind the 1-minute, 5-minute, or 10-minute charts. Thus, it is often better to use VWAP for shorter-term charts with high-volume securities, so the signal speed isn’t too slow.
Inaccurate for Large Orders
Institutional algorithms attempting to fill large orders often use VWAP as a guide, but it can be misleading for large orders filled over many days.
VWAP Strategies
We have clearly understood that large institutional buyers use VWAP to determine good entry and exit points. When a trader wants to offload a significant position, they aim to sell at the VWAP or higher. Professional traders use several VWAP intraday strategies regularly to determine three things:
- Gauge the market trend
- Determine who is influencing the price
- Confirming the support and resistance levels
Here is also a look at some of the most popular VWAP strategies:
Pullback
When the stock price extends past VWAP and the moving averages significantly during the day, they are likely to pull back. Some aggressive traders sell the stocks short when the stock price gets extended, and others wait to enter with the trend on a pullback.
Watch this video to understand the exact rules and setup of the VWAP pullback strategy.
You can also use the VWAP pullback momentum strategy to target profits. You may wait till the price moves below the pullback level, where it starts accumulating more volume and then begin to take profits.
Fade
The VWAP fade strategy makes it simpler for you to understand your risk-reward position through a contrarian angle. As part of this strategy, you may choose to either wait for the VWAP pullback post a bullish move with volume or be ready to act on the stock’s bearish trend. The VWAP might also act as a support at this stage. Based on whatever direction you choose for the trade, the store may go back to its high or low point of the day.
Here is a detailed explanation of the VWAP fade and bounces strategy:
The VWAP Fade strategy is also helpful in understanding if there is over-extension in a stock. For this, the trader must look at the gap up and typically consider over-extended stocks with an opening up of over 10% on the upside. These stocks have the momentum to fill in the gap several times while they go down and fade off the VWAP in the process. It is essential that there is a good trading volume for these stocks, or else it could get manipulated and fail to form a pattern. For the VWAP, fade is also crucial to establish the excellent risk to reward with the setup.
Afternoon High
Tim Bohen purports that this strategy is one of the best ones for day trading, and it also makes it easier to find and strike a favorable risk/reward. VWAP Hold high of the day is typically an afternoon set up, and for this, we need stock from a hot sector that has shown some significant movement in the recent past. These stocks must have a low float with an insanely high trading volume. The stocks with such a combination tend to spike several times in a day. The float for the stock in a VWAP Hold high-of-the-day pattern should ideally be below 10 million shares.
Traders must also watch out for stocks with big pre-market moves that can happen due to a press release, results, or any other macro development. These stocks get a strong opening but begin to consolidate above the VWAP as the afternoon nears. The support level may want to establish for this stock is a maximum of 2% below the VWAP. Usually, into the 2 pm ET window, the stock pushes to the high of the day. What’s great about this idea is that it gives you an understandable stop loss, typically the VWAP.
Check out Tim Bohen’s video that explains the afternoon VWAP Hold high of the day set up very clearly:
Parabolic Short
For extremely extended “parabolic” stocks, I use VWAP as a filter for potential short entries. See the chart below.
VWAP FAQs
VWAP vs. Simple Moving Average
Like the Volume Weighted Average Price VWAP, the Simple Moving Average offers traders a smoothened view of a security’s recent price trend. However, there are fundamental differences between the two.
Volume Weighted Average Price (VWAP) | Simple Moving Average (SMA) | |
---|---|---|
Meaning | VWAP is calculated as the dollar value of the trading security, divided by total volume. | SMA is calculated by adding closing prices over a period and dividing it by the number of periods. |
Components | Volume is an integral part of the calculation | SMA doesn’t take volume into account |
Objective | VWAP helps traders to determine the best price for trading or planning profitable entry and exit points. It is also used to compare trade executions. |
SMA is a technical indicator that effectively determines if the security is towards an uptrend or downtrend and its potential for a change in trend. |
Formula | VWAP = (Typical Price x Volume) / cumulative volume. | 3-Day SMA = (C1 + C2 + C3) / 3 |
VWAP vs. VWMA
Just like VWAP, the volume-weighted moving average also considers volume as a critical component. However, as it is a simple moving average, it only finds the day’s closing prices. Let’s take a look at some of the key differences:
Volume Weighted Average Price (VWAP) | Volume Weighted Moving Average (VWMA) | |
---|---|---|
Meaning | VWAP is cumulative of average prices throughout the day with respect to the volume. | VWMA stands for Volume Weight Moving Average. VWMA is the same as a moving average; however, the difference is that it assigns a different weight to each closing price. |
Components | It doesn’t leave out any data at any point in time. | VWAP has a fixed period where older data is excluded from the calculation. |
Objective | VWAP helps day traders to understand how to discover a reasonable price for purchasing and selling a security. | VWMA is instrumental in discovering emerging trends and confirming existing trends by studying the price and accompanying volume pattern. |
Formula | VWAP is the ratio of summation of price and volume and the cumulative volume. VWAP = (Typical Price x Volume) / cumulative volume. |
The indicator calculates the average of closing prices with respect to the volume. (C1*V1 + C2*V2 + C3*V3) / (V1+ V2+ V3) |
VWAP vs. TWAP
While VWAP is a trading indicator that considers both trading volume and price, the TWAP or Time-weighted average price considers the price and time. The significant differences between them are:
VWAP | TWAP | |
---|---|---|
Meaning | VWAP or Volume Weighted Average price computes the average based on how many shares were traded at different prices throughout the day divided by the total number of shares transacted. | TWAP or Time-weighted Average Price is a trading algorithm defining the weighted average price over a specified period. |
Components | VWAP is weighted based on time and volume. | TWAP is weighted based on time |
Objective | Traders use the VWAP strategy to determine an attractive price and profitable entry and exit points. | Traders use TWAP for the execution of large orders without excessively impacting the market price. |
Formula | The summation of the typical price and the volume is divided by the cumulative volume. VWAP = (Typical Price x Volume) / cumulative volume. |
The average of the opening, high, low, and close price, also known as the typical price, is divided by the number of trading days. |
The Bottom Line
Volume Weighted Average Price is an excellent technical indicator because it considers both price and volume. In sharp contrast to moving averages, VWAP associates more weightage to price points with larger volume. This enables traders to understand potential prime entry and exit points and estimate the relative strength.
With institutional algorithms executing the majority of trading volume, VWAP is something traders should watch. I use VWAP in conjunction with many of my short strategies, including the parabolic short mentioned above. I think understanding VWAP is a valuable addition to any algorithmic trader’s repertoire.
Subscribe to Analyzing Alpha
Exclusive email content that's full of value, void of hype, tailored to your interests whenever possible, never pushy, and always free.