I’m attempting to use the MultivariateNormalDistribution to create random state vector draws using a state vector and covariance in a Monte Carlo simulation. It fails thinking it is a singular matrix because during the configuration it tries to take a matrix inverse using the EIgenDecomposition solver. The solver checks first to make sure it isn’t singular using one of the checks of measuring the eigenvalue norms against the largest. Right now the threshold for it being “close enough to zero to be zero” is 1e-12. The covariance matrix is generating ratios of 1e-16. That’s not to be unexpected I don’t think. I was thinking perhaps we could make this epsilon value configurable with a default value of 1e-12. I’d make a similar threshold setting at the MultivariateNormalDistrubition class level too which again would be optional so default behavior doesn’t change. Thoughts?

+1 for this change and all similar ones that we could do.

There are indeed a lot of places where we assumed nominal values are of the order of magnitude of unity and then small thresholds are of the order of magnitude of 10^-10 to 10^-15. Nowadays, I think these assumptions are really too stringent and users should be able to configure all thresholds.

1 Like