The first is a simple tool to generate a Z random generator from a given correlation matrix
The second is more specific to generate correlated random numbers from underlying risk factors example: `price= N( Q25$, Q75$, 'demand', 0.4, 'inflation', 0.4))`
It works for discrete distribution if the number of samples is under the target resolution and generates a pdf and cdf that maintains the average of samples received.
As samples are received, it tries to spread the retained points to cover the range of probabilities, handling skewed distributions quite well.
Regarding *6-correlation* maybe [https://www.npmjs.com/package/correl-z] or [https://www.npmjs.com/package/@hugov/correl-range] can be relevant.
The first is a simple tool to generate a Z random generator from a given correlation matrix
The second is more specific to generate correlated random numbers from underlying risk factors example: `price= N( Q25$, Q75$, 'demand', 0.4, 'inflation', 0.4))`
I was dabbling in something related to squiggle since 2014... schem.ist: [https://schem.ist/montecode2/#en/1wCX!-FSg45'SghgncJgx8/'/u9+NqYVx:kYYf14AlrAG+lw/@&ljlzatb(dB1.KS9KOn~$LHDuu..8,H,@qt8;*'Z?i3C?w!$n;flmrK=PB(,.uh3-4aYo.5#jAn1cy1;TA6=I&OI/)~MCC(#=qCrUkfG_&_GLC2VsP#z&f.#;*ffKI7TwJm_jvsW4:BfoD,WS]
Regarding #1-density and #2-quantiles, maybe [https://www.npmjs.com/package/sample-distribution] can be of use.
It works for discrete distribution if the number of samples is under the target resolution and generates a pdf and cdf that maintains the average of samples received.
As samples are received, it tries to spread the retained points to cover the range of probabilities, handling skewed distributions quite well.