Anyone know how to calculate SD of VWAP?

Discussion in 'Technical Analysis' started by IronFist, Jul 23, 2008.

  1. Normal SD calculations applied to a range of VWAP values yield results like .04 which are pointless.

    I've seen pics posted where the VWAP has SDs graphed along with it and they are a meaningful distance away on both sides, like a few points or whatever. HOwever these charts never explained how they were doing it.

    I've seen a lot of discussions on forums about calculating the standard deviation of the VWAP and it seems a lot of people are having this same issue.

    So do any ETers know the secret? What am I doing wrong?
     
  2. I'd have to see some data to try to apply it.

    But from what I can see, it looks similar to how bollinger bands are calculated.

    1st find the VWAP for all your price series points and put it in a separate column.
    Then for each price, subtract the corresponding VWAP at that point.

    Once you have all the differences (in a separate column), take the standard deviation of the difference set.

    Once you do that, you can simply make six columns for price +/- 1-3*stdev of your vwap set by adding +/-3stdev to each price point.

    http://ensign.editme.com/vwap

    They show the vwap calc, but not the stdev calc. If it doesn't work, post a time series and I'll try to see if I can emulate it.

    edit... hmmm.. there's quite a few discussions on this (vwap calcs aren't as simple as the other site showed), but you have to have access to look at the darn graphs.:mad:

    http://www.traderslaboratory.com/forums/f6/trading-with-market-statistics-ii-the-1990.html

    hmm.. slightly different than my 1st thought.
    Seems like they plot a volume distribution that is updated throughout the day (binned by prices) ,then multiply the corresponding price at any point in the day times it's binned volume weight. Looks like the stdev are caclulated relative to this volume distributions mean (or point of control). So you'd have to add +/- the price of corresponding to the volume bins at +/- 3stdev of the volume distribution. They also say to start out by using yesterday's distribution as a starting point.

    here's a graph i found of what the volume vs price distribution should look like.

    [​IMG]
     
  3. Xuanxue

    Xuanxue

    It seems to me more efficient and reasonable to plot a standard deviation of closing prices or an ATR using mutipliers and an semi-interquartile range, along side VWAP.

    A cumulative average for VWAP makes more sense, to me, anyway.

    What do you guys think?
     
  4. nkhoi

    nkhoi

    [​IMG]
    ps. just need to chop off .zip
     
  5. ok, took a crack at it. Didn't need distribution after all (if I'm interpreting correctly). Here's 20 period VWAP with +/-3sigma bands.


    Look correct? If it does, you can just change the input data to intraday.:)

    [​IMG]
     
  6. Xuanxue

    Xuanxue

    Nice confirmed undervalued buy signal. lol
     
  7. oops... forgot to pull the price back into alignment with the moving avg. (VWAP) data.

    Updated.
    [​IMG]
     
  8. Xuanxue

    Xuanxue

    dtrader98,

    How did you align the average and deviation sets together to be plotted?
     
  9. Xuanxue

    Xuanxue

    BAH! That was the primary question of the entire thread!
     
  10. It was a simple mistake the 1st time.
    Since there is a 20 period delay on the price-vol averaged data, I somehow forgot to grab equal amounts of data from all the columns. I.e. I didn't include the non-delayed bars in the price column (causing it to compress on the graph). Simple fluke.

    Funny thing is I like the crossing indicators on the 1st (fluke) one better. Maybe I stumbled onto a magic indicator.:D

    Still not certain if it's correct, however. Need to try it on some intra day data, and if I get a chance look over the definition a bit more on some of those sites I mentioned.
     
    #10     Jul 24, 2008