龙听期货论坛's Archiver

C
+
+


 微信: QQ:

龙听 发表于 2022-11-2 14:52

【NormalStandardCumDen】

[code][LegacyColorValue = TRUE];

Inputs: Price(numericsimple);

Variables: MyT(0), MyZ(0), Density(0), TwoPiRoot(2.506628275), p(.2316419), b1(.319381530),
                   b2(.356563782), b3(1.781477937), b4(1.821255978), b5(1.330274429);

MyT = 1/ (1 + p * AbsValue(Price));
MyZ = ExpValue(-Square( Price ) * .5)/ TwoPiRoot;
Density = 1 - MyZ * ((((( b5 * MyT - b4) * MyT + b3) * MyT - b2) * MyT + b1) * MyT ) ;
if Price < 0 then
  Density = 1- Density;
  NormalStandardCumDen = Density;
[/code]

页: [1]