[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Problem with "Standard Normal Distribution Function"



PureBytes Links

Trading Reference Links

Normdist can be approximated by the following :

N(d) = 1 - (exp(-(d^2) / 2) / sqrt(2 * pi) * [0.31938153 / (1 +
0.2316419 * d) - 0.356563782 / (1 + 0.2316419 *d)^2 + 1.781477937 / (1 +
0.2316419 * d)^3 - 1.821255978 / (0.2316419 * d)^4 + 1.330274429 / (1 +
0.2316419 * d)^5]

If d is negative, replace d with (1 - abs(d)).

This approximation is from pp261-262 "Options Markets" by Cox, J.C. and
Rubinstein, M.

sincerely,

On Tue, 04 Dec 2001 05:24:39 -0000
artast@xxxx wrote:

artast> Anthony,
artast> 
artast> Thank you for your answer. I checked your attachment. I also checked 
artast> this formula in Excel earlier. Unfortunately with a help of NORMSDIST 
artast> function I calculated as same values for both dd1 (1.17) and CallFV 
artast> (15.29) as are in example from the source. The calculation follows:
artast> A B C Rows
artast> strike E 90 1
artast> time time 0.5 2
artast> stock p S 100 3
artast> inter r 0.1 4 
artast> volat QQ 0.2 5
artast> 6
artast> Variab dd1 1.16927542 7
artast> Call FV 15.28832295 8
artast> 
artast> The Variable(dd1) is =(LN(C3/C1)+(C4+C5*C5/2)*C2)/(C5*SQRT(C2))
artast> The Call FV is =C3*NORMSDIST(C7)-C1*EXP(-C4*C2)*NORMSDIST(C7-C5*SQRT
artast> (C2))
artast> 
artast> Variable (dd1) and CallFV seem to be right in my opinion. Also you 
artast> can check the data of this example in 
artast> www.geocities.com/WallStreet/2529/bsopm.htm.
artast> I believe, the problem is with NORMSDIST function only. But I do not 
artast> know how to translate this function into AB. Please can you help me 
artast> with this translation?
artast> Thank you in advance.
artast> 
artast> Regards,
artast> artast
artast> 
artast> --- In amibroker@xxxx, Anthony Faragasso <ajf1111@xxxx> wrote:
artast> > Hi Artast;
artast> > 
artast> > I am working on the formulas, check out the attached image file, the
artast> > problem is in the Norms dist function as you can see, in Excel the
artast> > formulas are correct, but using the formulas that you supplied 
artast> return a
artast> > ( - 1.647 ) . Will send when fixed.
artast> > 
artast> > Anthony
artast> > 
artast> > artast@xxxx wrote:
artast> > 
artast> > > Anthony,
artast> > >
artast> > > Thank you for a quick reply. Please is it possible to check and
artast> > > correct Standard Normal Distribution Function (N) and Call formula
artast> > > (Call = S*dd1 -E*exp(-r*time)*dd2) by you? dd1 formula is correct
artast> > > (1.17) and Call FV should be 15.28 in this example.
artast> > > Thanks in advance.
artast> > >
artast> > > Regards,
artast> > > artast
artast> > >
artast> > > --- In amibroker@xxxx, Anthony Faragasso <ajf1111@xxxx> wrote:
artast> > > > Hello Artast;
artast> > > >
artast> > > > I tried your formula in Automatic analysis, and hit explore , 
artast> it
artast> > > seems
artast> > > > to be using the( apply to and range ) options in the Automatic
artast> > > > analysis window.
artast> > > >
artast> > > > Anthony
artast> > > >
artast> > > > artast@xxxx wrote:
artast> > > >
artast> > > > > Hello Everybody,
artast> > > > >
artast> > > > > I'd like to use Black_Schole Option Formula for my research 
artast> in AB.
artast> > >
artast> > > > > But I have a problem to define the "Standard Normal 
artast> Distribution
artast> > > > > Function". It is really a long time I am out of school.
artast> > > > > Please can anybody help me?
artast> > > > > Thanks in advance.
artast> > > > >
artast> > > > > Regards,
artast> > > > > artast
artast> > > > >
artast> > > > > /*The Formula: I entered exact values from the example to 
artast> check
artast> > > Call
artast> > > > > Fair Value. It should be 15.28. Source
artast> > > > > www.geocities.com/WallStreet/2529/bsopm.htm */
artast> > > > >
artast> > > > > S = 100; //Stock Price for testing
artast> > > > > time = 0.5; //Time to expiry (days to expir/253 or days to 
artast> exp/365
artast> > >
artast> > > > > E = 90; //Strike
artast> > > > > r = 0.1; //prevailing interest rate
artast> > > > > Q = 0.2; //Volatility
artast> > > > > dd1 = (ln(S/E) + (r + Q*Q/2)*time)/(Q*sqrt(time));
artast> > > > > dd2 = dd1 - Q*sqrt(time);
artast> > > > > A = 0.33267; //koeficient
artast> > > > > bb1 = 0.4361836; //koef
artast> > > > > bb2 = -0.1201676; //koef
artast> > > > > bb3 = 0.937298; //koef
artast> > > > > k = 1/(1+ A*dd1);
artast> > > > > pi = 3.141592654;
artast> > > > >
artast> > > > > N = IIf(dd1>0, 1-(1/sqrt(2*pi))*exp((-dd1*dd1)/2) * ((bb1*k)+
artast> > > > > (bb2*k*k) + (bb3*k*k*k)), IIf(dd1<0, dd2, 0.5)); //Standard 
artast> Normal
artast> > >
artast> > > > > Distribution Function
artast> > > > >
artast> > > > > Call = S*dd1 -E*exp(-r*time)*dd2; // B&S Formula for Call 
artast> Option
artast> > > FV
artast> > > > >
artast> > > > > Filter = 1;
artast> > > > > AddColumn(C,"C",1.2);
artast> > > > > AddColumn(Call,"CallFV",1.2);
artast> > > > > AddColumn(N,"N",1.2);
artast> > > > > AddColumn(dd1,"dd1",1.2);
artast> > > > > AddColumn(dd2,"dd2",1.2);
artast> > > > >
artast> > > > >
artast> > > > > Yahoo! Groups Sponsor
artast> > > > ADVERTISEMENT
artast> > > >
artast> > > >
artast> > > > >
artast> > > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
artast> > > Service.
artast> > >
artast> > >
artast> > > Yahoo! Groups Sponsor
artast> > ADVERTISEMENT
artast> > 
artast> > 
artast> > >
artast> > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
artast> Service.
artast> 
artast> 
artast> 
artast> 
artast> 
artast> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
artast> 
artast> 

-- 
Kato, Yoshiaki <yskato@xxxx>