Re: [Tutor] Which header to use in python

2015-10-01 Thread Alan Gauld
On 01/10/15 16:23, Michel Guirguis wrote: Good afternoon, Basically, I am trying to find a value of the cumulative distribution in Python. Thanks for your help. I have managed to find the cumulative value in scipy but not in the standard Python 3.4. I have solved my problem with scipy but n

Re: [Tutor] Which header to use in python

2015-10-01 Thread Laura Creighton
In a message of Thu, 01 Oct 2015 15:42:25 +0300, Michel Guirguis writes: >Good afternoon, > >What is the name of the header that I can use in Python 3.4 to convert the >cumulative distribution function number 0.10606601717798211 to >0.54223501331161406 > >from scipy.stats import norm > >norm.cdf(

Re: [Tutor] Which header to use in python

2015-10-01 Thread Alan Gauld
On 01/10/15 13:42, Michel Guirguis wrote: What is the name of the header that I can use in Python 3.4 Can you explain what you mean by "header"? That's not a Python concept, Python doesn't have header files like C/C++ to convert the cumulative distribution function number > 0.106066017177982

[Tutor] Which header to use in python

2015-10-01 Thread Michel Guirguis
Good afternoon, What is the name of the header that I can use in Python 3.4 to convert the cumulative distribution function number 0.10606601717798211 to 0.54223501331161406 from scipy.stats import norm norm.cdf(0.10606601717798211) 0.54223501331161406 Thanks, Michel ___

Re: [Tutor] Cumulative distribution function

2015-10-01 Thread Laura Creighton
In a message of Thu, 01 Oct 2015 10:57:18 +0200, Peter Otten writes: >$ python cumulative.py >d1 = 0.106066017178 >d2 = -0.0353553390593 >call = 2.9087784079 > >Not exactly 2.9081, but closer :) And sort of in the 'this is a float not a decimal' range I consider usual for such errors, not the hu

Re: [Tutor] Cumulative distribution function

2015-10-01 Thread Peter Otten
Michel Guirguis wrote: [Please don't start a new thread for an old problem] > I have a problem with the cumulative distribution function in calculating > derivatives. I am getting a call option figure of 2.5961 while it should > be 2.9081. Could you please help. > >>> S=50 > >>> K=50 > >>> r=0.0

Re: [Tutor] Cumulative distribution function

2015-10-01 Thread Laura Creighton
In a message of Thu, 01 Oct 2015 10:48:57 +0300, Michel Guirguis writes: >Good morning, > >I have a problem with the cumulative distribution function in calculating >derivatives. I am getting a call option figure of 2.5961 while it should be >2.9081. Could you please help. > > >>>S=50 K=50 >

[Tutor] Cumulative distribution function

2015-10-01 Thread Michel Guirguis
Good morning, I have a problem with the cumulative distribution function in calculating derivatives. I am getting a call option figure of 2.5961 while it should be 2.9081. Could you please help. >>>S=50 >>> K=50 >>> r=0.03 >>> q=0.02 >>> sig=0.20 >>> T=0.5 >>> from math import* >>> d1=(log(S/