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

[amibroker] Kurtosis and Skewness



PureBytes Links

Trading Reference Links


How do convert Kurtosis, and Skewness to AFL?

Also Does anyone have all the desciptive statistics translated to AFL?

Thanks,
Mr Valley


range = 20;
n = range;
x_i = raw  Z-Score; // ??
meanx = Mean Z-Score over the Range; // ??
kurtosis = { [n(n+1) / (n -1)(n - 2)(n-3)] sum[(x_i - meanx)^4] / std^4 } -
[3(n-1)^2 / (n-2)(n-3)]



I would like to plot the Normal distribution and overlay the Kurtosis plot
I can't seem to get it right.


/********************************************************/
/*Kurtosis v3 */

ZLen = Param( "ZLen", 6, 2, 100 );

ZScore = (C-MA(C,ZLen))/StDev(C,ZLen);
mean = MA(ZScore ,ZLen );

Plot(ZScore,"ZScore",colorBlue,styleThick |
styleOwnScale|styleNoLabel,-3,3);
x_i =ZScore; // Raw Zscore
n = ZLen;
kurtosis = (( n * (n+1) / (n -1) * (n - 2) * (n-3)) * Sum(((x_i -
mean)^4),ZLen) / StDev(x_i,n)^4 ) - ((3 * (n-1)^2 / (n-2) * (n-3)) );
//Plot(Mean,"Mean ZScore",colorRed,styleThick |
styleOwnScale|styleNoLabel,-3,3);

Plot(kurtosis,"Kurtosis",5,4);

/**********************************************************/





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

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

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