Sensitivity Analysis q = 0.999 p = 0.001 e = 1.0 number_samples = 10000000 def capital_analytic(p, e, q=0.999): return e * (np.heaviside(p + q -1 , 1) - p) def capital_MC(p, e, number_samples, q=0.999): rng = np.random.default_rng() loss_indicator = np.heaviside(p-rng.
Loss Model Gaussian Loss Model Project.toml name = "GaussianFactorModel" version = "0.1.0" uuid = "b4865c2b-8080-47c0-a052-c54cf23146cd" authors = ["Patrick Haener <contact@haenerconsulting.com>"] [deps] Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Optim = "429524aa-4258-5aef-a3af-852621145aeb" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"