【SkewArray】
[code]inputs:PriceValueArray[MaxSize]( numericarray ),
Size( numericsimple ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 0 ) ;
SkewArray = 0 ;
if Size > 2 then
begin
var0 = AverageArray( PriceValueArray, Size ) ;
var1 = StandardDevArray( PriceValueArray, Size, 2 ) ;
if var1 > 0 then
begin
var2 = 0 ;
for Value1 = 1 to Size
begin
var2 = var2 + Power( ( PriceValueArray[Value1] - var0 ) / var1, 3 ) ;
end ;
var3 = Size / ( ( Size - 1 ) * ( Size - 2 ) ) ;
SkewArray = var3 * var2 ;
end ;
end ;
[/code]
页:
[1]