On Wed, 30 Sep 2015 10:14 Laura Creighton <l...@openend.se> wrote:

In a message of Wed, 30 Sep 2015 09:12:20 +0300, Michel Guirguis writes:
>Good afternoon,
>
>How to calculate the cumulative normal distribution function CND in order
to use this figure to calculate the call option based on the Black and
Scholes model.

The easy way is to install scipy



Michel, It sounds like you probably do want to install scipy for the work
that you're doing  and Laura's correct that anaconda is the easiest way to
do that.

However I want to point out that your specific problem is easily solved
with the stdlib. The CDF of the standard normal distribution is easily
expressed in terms of the error function erf which is available in the math
module:

fron math import erf

def phi(z):
    return 0.5 * (1 + erf(z))

--
Oscar
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to