Downloads
Scenario-generation codes
There are three scenario-generating codes available from my web-page, sorted from the oldest to the newest:
- The original moment-matching code.
- from A Heuristic for Moment-matching Scenario Generation, Computational Optimization and Applications, 24 (2-3), pp. 169–185, 2003.
- + tried and tested code
- - works best for normal-like distributions, does not work for distributions with limited support or multimodal distributions
- - limited to moments and correlations
- - needs more branches than variables
- A variant of the above, using cumulative distribution functions instead of moments.
- from Scenario generation with distribution functions and correlations, Kybernetika, 50 (6), pp. 1049-1064, 2014.
- + using cdf means a better control of the marginal distributions
- + should work for a broader class of distributions
- - not so well tested; higher chance of not getting convergence
- - needs more branches than variables
- The new copula-based code.
- from A copula-based heuristic for scenario generation, Computational Management Science, 11 (4), pp. 503-516, 2014.
- + copulas provide a better control of co-distribution than correlations
- + uses cdfs to control margins (though moments are also possible)
- + not iterative, so no convergence issues
- + testing indicates that it produces better scenarios than the above methods
- - no direct control of correlations
- - needs more testing
- - slow compared to the above methods, esp. for many (thousands) scenarios
So which one should you choose? Unless you need exact correlations, I would recommend the copula-based one. And even then, I would start with the copula-based code and only used one of the above as a post-process, to fix the correlations.
If you find a missing feature, such as a new copula type or distribution, just let me know and I can either add it myself, or at least help you with adding it.
License
All the codes are licensed under the Mozilla Public License Version 2.0.
Notes:
- The license allows including an unchanged version code into any program, without affecting its license.
- If you distribute a program that includes a modified version of this code, you must make the modified version available under the MPL 2.0.
- The license is GPL-compatible.
For more information, see official FAQ or the Wikipedia article about the license.
Download links
- Copula-based code
-
The code now available at GitHub.
- The cdf-based code
-
The code is not being maintained, but there is an old Windows (64-bit) binary for download.
- The moment-matching code
-
The code is now availabe at GitHub.