Hi Ramon --

Try computing the standard deviation of each series separately, squaring
each (those squared values are the variances), adding the variances, and
taking the square root of the sum of the variances.  Is that the number that
agrees with what you are looking for?

If not, look up the formula for computing the standard deviation of a series
of number.  The program a for loop 20 days long.  Within the loop you will
be processing three days points (HLC) every day instead of just one (C).

Thanks,
Howard


On Tue, Sep 8, 2009 at 7:01 AM, ramoncummins <[email protected]>wrote:

>
>
> Hi There
>
> I am trying to calculate the standard deviation of the high,low and close
> prices for the last twenty days. In effect I wait the stdev of 60 pieces of
> data (20days * 3 data points). For reference, I am trying to replicate
> highlighting 60 cells in excel and calculating stdev on them.
>
> I've thought about combing the h,l,c arrays but don't know how to do this.
>
> Please note that neither of the following are correct:
>
> stdev(H+L+C, 20);
> (stdev(h,20)+stdev(l,20)+stdev(c,20) / 3); //this produces similar result
> but not *exactly* the correct result
>
> Any help much appreciated.
>
> Cheers
>
> Ramon
>
>  
>

Reply via email to