Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in and Co-Creator of Algomojo (Algorithmic Trading Platform for DIY Traders)

Things You Need to Know About VWAP

4 min read

Institutional investors, such as mutual funds and hedge funds, often use VWAP (volume-weighted average price) as an execution algorithm to help them buy or sell large volumes of securities in the market in a way that minimizes the impact on the price of the security.

Here is an example of how an institutional investor might use VWAP as an execution algorithm in the Indian stock market:

  1. The institutional investor has a large order to buy a particular security, such as a large block of shares in a particular company listed on the Bombay Stock Exchange (BSE).
  2. The investor decides to use a VWAP execution algorithm to help them execute the order in a way that minimizes the impact on the price of the security.
  3. The investor specifies the time period over which the VWAP calculation should be made, such as a single trading day or a week.
  4. The execution algorithm begins executing the order, buying small amounts of the security at regular intervals throughout the specified time period.
  5. The algorithm uses the volume-weighted average price of the security during the specified time period as a benchmark, and adjusts the size and timing of the trades accordingly to try and match the benchmark as closely as possible.
  6. Once the order is completed, the institutional investor has successfully bought the large block of shares without significantly affecting the price of the security.

It’s important to note that using a VWAP execution algorithm does not guarantee that the institutional investor will be able to execute their order at the exact VWAP price, as market conditions and other factors may influence the price of the security. However, using a VWAP algorithm can help institutional investors buy or sell large volumes of securities in a more orderly and efficient manner, minimizing the impact on the market and potentially saving them money.

How VWAP can be used as a Technical Indicator

VWAP, or volume-weighted average price, is a technical indicator that is used by traders to measure the average price of a security over a specific time period, typically a day. VWAP is calculated by adding up the total value of all trades in a given period and dividing by the total number of shares traded.

vwap

In finance terms, volume-weighted average price (VWAP) is defined as the ratio of the value traded to the total volume traded over a particular time horizon (usually one day). It is a measure of the average price at which a stock is traded over the trading horizon.

How VWAP is calculated

  1. Average of high,low and close for intraday period is calculated as (High+Low+Close)/3
  2. Obtained price from step 1 is multiplied with period’s volume
  3. Cumulative total price is created
  4. Cumulative volume is created
  5. cumulative(price X volume) is divided by cumulative volume
Bank Nifty 1min – VWAP Indicator for Amibroker

In the above figure yellow colored line is the VWAP line. Chart is shown for BANKNIFTY FUTURES 1 min timeframe.

VWAP Strategies

Based on price movement and volume,VWAP moves accordingly. It start to move from the open price itself. Noise is completely eliminated in a stock as it relies on cumulative values.

Some of the strategies are

1.Downward Bias(downtrend)
Here price is below the VWAP values. Most of the institutions decide the buying zone when the price tends below VWAP, so that one can accumulate their positions at these points. In other sense short-term traders interpret the trend as bearish and look for short positions.

2.Upward Bias(uptrend)
Upward bias occurs when the price is above the VWAP. In this point institutional traders tries to short their positions. But Short term traders take this note as bullish and take long positions.

3.Strong Trend Days
Usually, in strong trend days the price will be consistently above or below the VWAP.

4.Ranging Day
Here VWAP will run in the middle of the price ,tends in sideways

VWAP – Amibroker AFL Code


_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

_SECTION_BEGIN("VWAP");

vwap=0;

function Lastthursday()
{
    Daysinmonth = IIf( Month() == 1 OR Month() == 3 OR Month() == 5 OR Month() == 7 OR Month() == 8 OR Month() == 10 OR Month() == 12, 31, 30 );
    Daysinmonthfeb = IIf( Year() % 4 == 0 AND Year() % 100 != 0, 29, 28 );
    Daysinmonthfinal = IIf( Month() == 2, Daysinmonthfeb, Daysinmonth );
    returnvalue = IIf( Daysinmonthfinal - Day() < 7 AND DayOfWeek() == 4, 1, IIf( Daysinmonthfinal - Day() < 8 AND DayOfWeek() == 3 AND Ref( DayOfWeek(), 1 ) != 4 AND Day() != Daysinmonthfinal , 1, 0 ) );
    return returnvalue;
}

Period = ParamList( "Base", "Daily|Weekly|Monthly|Lastthursday|Yearly", 1 );



if(Period=="Daily" )
{
Bars_so_far_today = 1 + BarsSince( Day() != Ref(Day(), -1));
StartBar = ValueWhen(TimeNum() == 091500, BarIndex());
TodayVolume = Sum(V,Bars_so_far_today);
average = (H+L+C)/3;
IIf (BarIndex() >= StartBar, VWAP = Sum (average * V, Bars_so_far_today  ) / TodayVolume,0);
}

if(Period=="Weekly" OR Interval()==24 * 3600 )
{ 
Bars_so_far_today = 1 + BarsSince(DayOfWeek() < Ref( DayOfWeek(), -1 ));
StartBar = ValueWhen(TimeNum() == 091500, BarIndex());
Vol = TimeFrameGetPrice("V", inWeekly, 0);
TodayVolume = Sum(Vol,Bars_so_far_today);
average = (H+L+C)/3;
IIf (BarIndex() >= StartBar, VWAP = Sum (average * Vol, Bars_so_far_today  ) / TodayVolume,0);
}

if(Period=="Monthly"  )
{
Bars_so_far_today = 1 + BarsSince(Month() != Ref(Month(), -1));
Vol = TimeFrameGetPrice("V", inMonthly, 0);
StartBar = ValueWhen(TimeNum() == 091500, BarIndex());
TodayVolume = Sum(Vol,Bars_so_far_today);
average = (H+L+C)/3;
IIf (BarIndex() >= StartBar, VWAP = Sum (average * Vol, Bars_so_far_today  ) / TodayVolume,0);
}

Plot (VWAP, "Vwap",colorYellow,styleThick);
_SECTION_END();

Applications of VWAP

1.Liquidity
VWAP is used by the institutions to identify the liquid and illiquid price points for a specific security in a short span of time.

2.Trading Efficiency
After holding a security irrespective of buying or selling , generally institutions and individuals compare the price with VWAP values .An executed order is said to be a good one if a order is buyed below the VWAP or a order is sold above the VWAP. This trading efficiency has impact in the trading costs and execution in turn.

3.Algorithmic Trading
Algorithmic trading,is one of the trading method for Online traders to enter trading orders which is a pre programmed instructions taking time,price and volume into account.Algorithmic trading is otherwise called as program or system trading. Algorithmic trading are developed using advanced mathematical models .VWAP is the mostly used parameter in algorithmic trading especially in volume related algorithms( VWAP target execution algos). In general to reduce transaction costs,market risk algorithmic trading is used by investment banks, pension funds, mutual funds, institutional traders.

4.Timing Tool
One can be able to set a benchmark in the trades within a certain time interval over the volume distribution. Some of the professional brokerage firms gives a Guaranteed VWAP for institutional traders, which executes the trade at VWAP price. Also they are providing VWAP target execution mostly based on volume participation algorithms

5.Tool for Retail traders
To obtain a constant returns or to be profitable, discretionary traders looks for large money flows. So discretionary traders use VWAP for determination.For instance if the price crosses the VWAP in upside it opts for a long position. Current and past VWAPS acts as a support and resistance levels.

Limitations of VWAP

1.VWAP is more an analysis tool
2.At the end of the day ,VWAP will be flattened out and limit its use to retail traders
3.VWAP is more reliable for intraday stronger average volume trading days and it is less for normal average volume days
4.VWAP does not provide entry or exit signals, stop loss or target levels

Conclusion

VWAP is best suited for intraday analysis.Helps in determining the intraday trend.As VWAP ois a cumulative indicator, the number of price points increases throughout the day. VWAP lags price which increases as the day extends. Therefore retails traders enjoy the benefits early in the trading session and institutional traders finds it benefitted at the end of the day.

Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in and Co-Creator of Algomojo (Algorithmic Trading Platform for DIY Traders)

Realtime Option Greeks Indicator and Exploration Module for Amibroker

Option Greeks are a set of mathematical models used to analyze the behavior of options. Real-time Option Greeks refer to the calculation of these...
Rajandran R
5 min read

Sending Smart Futures/Spot – Signals to Two-Legged Options Execution…

Thought of making an open source AFL code demanded by most of the option traders to control the cost, to control the risk, and...
Rajandran R
12 min read

Send Smart Options Execution Orders from Futures or Spot…

This tutorial provides instructions on how to utilize simple buy and sell trading signals in Spot/Future charts to place option orders (including ATM, ITM,...
Rajandran R
19 min read

5 Replies to “Things You Need to Know About VWAP”

  1. Thanks great thing about institutional order provided can this can be use as daily basis?

  2. Resp sir, I have query regarding real time data software is that which is the best software for Indian stock market including f&o stocks with live trade data rates. Also tell us the charges of those software. Its my kindly request to u. Hope u will guide me properly.

  3. Hi Rajendran

    When I choose ‘Last Thursday’ to find vwap for a series, a messsage comes that ‘vwap’ is not defined. However, I could plot for daily,weekly and monthly options. Please help me on this.

    Shankar

  4. Would be great if you can add the 1SD, 2SD so that it gives a good view of support and resistance level.

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More