【KurtosisOpt】
[code]inputs:PriceValue( numericseries ),
Len( numericsimple ),
Mean( numericsimple ),
SDev( numericsimple ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ) ;
KurtosisOpt = 0 ;
condition1 = Len > 3 and SDev > 0 ;
if condition1 then
begin
var1 = 0 ;
for Value1 = 0 to Len - 1
begin
var1 = var1 + Power( ( PriceValue[Value1] - Mean ) / SDev, 4 ) ;
end ;
var0 = Len * ( Len + 1 ) / ( ( Len - 1 ) * ( Len - 2 ) *
( Len - 3 ) ) ;
var2 = 3 * Square( Len - 1 ) / ( ( Len - 2 ) * ( Len - 3 ) ) ;
KurtosisOpt = var0 * var1 - var2 ;
end ;
[/code]
页:
[1]