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 dual-licensed under the GNU Lesser General Public License (LGPL) version 2.1 and the Eclipse Public License (EPL). As a recipient of the code, you may choose which license to receive it under.
Note that the EPL is not GPL-compatible. On the other hand, it is the license used in most Coin-OR projects.
One important aspect of both licenses (so called "weak copyleft") is that if you make any modification or addition to the code itself, you must put your modification under the same license, the LGPL or EPL.
Note that it is explicitly not needed to put any application under the LGPL or EPL, if that application is just using the code, without making any changes to it.
Download links
- Copula-based code
-
The code is hosted at Bitbucket, as a Mercurial repository.
-
Snapshot from 2016-07-28:
- The cdf-based code
-
At the moment, there is only a binary for Windows 64-bit.
- The moment-matching code
-
Source code as tar.gz or zip archive; binaries for
Linux 64-bit or 32-bit,
and Windows 32-bit.