|
Quote: |
|
 |
|
|
here is how I wrote Std Dev:
first taking the squared difference of 'price' and VWAP_H and summing them:
value1=
square(c-vwap_h)+
square(c[2]-vwap_h[2])+...
then taking square root of value1 gives you std dev, written in EL as:
value2=squareroot(value1/n);
where n is the number of periods...
|
|
|
|
|
Dogpile, you left out an important term in your variance computation. Remember that the
VWAP is volume weighted. so you need to weight each one of your square terms by the normalized volume:
value1= Pi*square(c-vwap_h) +..... where Pi= vi/V, vi=volume traded at price c, V=total volume for the distribution.
Also each of the terms in the sum should be the same
VWAP :
value1= P1*square(C-VWAP) + P2*square(c[2]-VWAP) + .....