The function "mvndst" doesn't exist anymore in scipy.stats.
Hello ...
Unfortunately, the function "mvndst" doesn't exist anymore in scipy.stats. It seems, scipy relied on a Fortran module, and they had to remove it.
Do you think you could help me to find a replacement?
Thanks a lot.
# Cumulative Bivariate Normal Distribution
# Primarily called by Psi() function, part of the _Bjerksund_Stensland_2002 model
def _cbnd(a, b, rho):
# This distribution uses the Genz multi-variate normal distribution
# code found as part of the standard SciPy distribution
lower = np.array([0, 0])
upper = np.array([a, b])
infin = np.array([0, 0])
correl = rho
error, value, inform = mvn.mvndst(lower, upper, infin, correl)
return value
I will start looking into a replacement. Davis EdwardsOn May 12, 2025, at 12:16 PM, marcovth @.***> wrote: marcovth created an issue (dedwards25/Python_Option_Pricing#7) Hello ... Unfortunately, the function "mvndst" doesn't exist anymore in scipy.stats. It seems, scipy relied on a Fortran module, and they had to remove it. Do you think you could help me to find a replacement? Thanks a lot.
Cumulative Bivariate Normal Distribution
Primarily called by Psi() function, part of the _Bjerksund_Stensland_2002 model
def _cbnd(a, b, rho): # This distribution uses the Genz multi-variate normal distribution # code found as part of the standard SciPy distribution lower = np.array([0, 0]) upper = np.array([a, b]) infin = np.array([0, 0]) correl = rho error, value, inform = mvn.mvndst(lower, upper, infin, correl) return value
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
I found the solution already ...
import scipy.stats
# Cumulative Bivariate Normal Distribution
def cbnd(a, b, rho):
lower = np.array([0, 0])
upper = np.array([a, b])
infin = np.array([0, 0])
correl = rho
error, value, inform = scipy.stats._mvn.mvndst(lower, upper, infin, correl)
return value
I have created a python version of the FORTRAN function previously embedded in the mvn library. The new code is in the file name "2025".
Thank you very much. I will generate some curves tomorrow.