/src/main/java/net/finmath/montecarlo/assetderivativevaluation/models/MultiAssetBlackScholesModel.java
correlation = underlyingIndex1 == factorIndex ? 1.0 : 0.0;
correlation = underlyingIndex1 == underlyingIndex2 ? 1.0 : 0.0;
} double correlation; if(volatilities[underlyingIndex1] != 0 && volatilities[underlyingIndex2] != 0) { correlation = covariance / volatilities[underlyingIndex1] / volatilities[underlyingIndex2]; } else { <extra_id_0> } correlations[underlyingIndex1][underlyingIndex2] = correlation; } } return correlations; }