[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Re: stdev and average



PureBytes Links

Trading Reference Links

Good stuff.  Thanks for the feedback - this formula is called the
calculation formula and differs slightly from the typical one you'd
find in a textbook, but is a lot easier to implement on a computer and
gives the same answer.  As you can see, the standard deviation or
standard error is the root of the difference between the expectation
of the square and the square of the expectation.  Write it as

    E^2(X) - E(X).E(X)

for a single observation and then add this for the sample.

There sometimes are slight discrepancies between this formula, devised
for a finite sample, and some spreadsheet formulae.  They sometimes
calculate not a sample, but a population standard error, which is

    Sqrt( ( R3 - R2 * R2 / NN ) / Max( NN, 1 ) );

Note that we no longer subtract 1 from the NN when we divide.  There
is a reason behind this, related to degrees of freedom, and the
difference is very small, but often to blame if the results differ
slightly

Regards
MG Ferreira
TsaTsa EOD Programmer and trading model builder
http://www.ferra4models.com
http://fun.ferra4models.com 

--- In equismetastock@xxxxxxxxxxxxxxx, "robcpettit" <robcpettit@xxxx>
wrote:
> Thankyou very much for this. Went with
> R1:=ROC(C,13,%);
> R2:=Cum(R1);
> R3:=Cum(R1*R1);
> nn:=Cum(R3>0);
> Sqrt( ( R3 - R2 * R2 / NN ) / Max( NN - 1, 1 ) );
> The final line got rid of the error as you though. checked out the
> calculations in excel and there the same. Enjoyed this, worked through
> the formula and can see how and were its doint calculations. Also
> learnt alot about calculating stdev. Thankyou again
> regards Robert




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hrpnr66/M=362343.6886682.7839641.1493532/D=groups/S=1705375617:TM/Y=YAHOO/EXP=1124264655/A=2894354/R=0/SIG=11qvf79s7/*http://http://www.globalgiving.com/cb/cidi/c_darfur.html";>Help Sudanese refugees rebuild their lives through GlobalGiving</a>.</font>
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/