龙听期货论坛's Archiver

C
+
+


 微信: QQ:

龙听 发表于 2022-11-2 11:13

【NormalSCDensity】

[code]Inputs: PriceValue(Numeric);
Variables: var0(0), var1(0), var2(0), var3(0);

var2 = 1 / (1 + .2316419 * AbsValue(PriceValue));      
var3 = .3989423 *  Power(2.71828183, -(PriceValue * PriceValue) / 2);       
var1 = 1 - var3 * ((1.33027443 * Power(var2, 5)) - (1.821256 * Power(var2, 4)) + (1.78147794 * Power(var2, 3)) - (.3565638 * Power(var2, 2)) + (.31938153 * var2));

If PriceValue > 0 Then
        var0 = var1
Else
        var0 = 1 - var1;

NormalSCDensity = var0;
[/code]

页: [1]