Volume-Weighted Average Price

Introduction

The Volume-Weighted Average Price (VWAP) is a trading indicator that represents the average price a security has traded throughout the day, weighted by volume. It is particularly useful for traders and investors looking to assess the average price at which a security is trading relative to its volume. VWAP is commonly used to measure the efficiency of executions against the benchmark price.

Calculation of VWAP

VWAP is calculated using the following formula:

Formula

mathematical expression or equation

Where:

  • mathematical expression or equation = Price of the asset at each interval.
  • mathematical expression or equation = Volume of the asset at each interval.
  • mathematical expression or equation = Total number of intervals.

Example Calculation

Let’s consider an example with the following data for a stock over a trading day:

TimePrice (P)Volume (V)
1$10100
2$10.50200
3$11150
4$10.80300
5$11.20250
  1. Calculate the Total Volume:
mathematical expression or equation
  1. Calculate the Cumulative Price-Volume Product:
    • For each time period, calculate mathematical expression or equation :
TimePrice (P)Volume (V)Price × Volume (P × V)
1$10.00100$1000
2$10.50200$2100
3$11.00150$1650
4$10.80300$3240
5$11.20250$2800
  • Total mathematical expression or equation :
mathematical expression or equation
  1. Calculate the VWAP:
    • Now plug values into the VWAP formula:
mathematical expression or equation

Results

  • VWAP: $10.79

Python Code

import pandas as pd

def calculate_vwap(data):
    """Calculate Volume-Weighted Average Price (VWAP)."""
    # Calculate the cumulative sum of price times volume
    data['Price x Volume'] = data['Close'] * data['Volume']
    data['Cumulative Price x Volume'] = data['Price x Volume'].cumsum()
    data['Cumulative Volume'] = data['Volume'].cumsum()
    
    # Calculate VWAP
    data['VWAP'] = data['Cumulative Price x Volume'] / data['Cumulative Volume']
    
    return data

Interpretation of VWAP

  1. Benchmark Price: VWAP acts as a trading benchmark. If the current price is above the VWAP, it indicates that traders are paying more than the average price throughout the day, suggesting strength. Conversely, if the price is below the VWAP, it indicates weaker conditions.

  2. Trend Confirmation:

    • Bullish Signal: When the price crosses above the VWAP, it can indicate the beginning of an uptrend.
    • Bearish Signal: When the price crosses below the VWAP, it can indicate the beginning of a downtrend.
  3. Volume Profile: VWAP helps in understanding price levels with significant trading volume, which can act as support and resistance levels.

Analogy

Think of VWAP as the average price of a product in a market. If you were shopping and noticed that most shoppers have been buying a product at $10.79 on average throughout the day, this price could be seen as the fair value of that product. If a seller is offering it for more than $10.79, buyers might hesitate, while if it’s available for less, it could create a rush to buy, showing demand. Just as you would use the average price to gauge whether you are getting a good deal in shopping, traders use VWAP to assess market pricing relative to volume.

Conclusion

The Volume-Weighted Average Price (VWAP) is a critical tool for traders to establish a benchmark for average price over a trading period, helping to make informed trading decisions. By utilizing VWAP, traders can understand market trends and potential entry and exit points effectively.


References