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