No results found

    We couldn’t find anything with that term. Please try again.

    Press Esc to close

    Fast mode

    Improved simulation performance with fast mode

    Fast mode is a new simulation mode in RiskAMP that can dramatically improve simulation speeds — most of the time.

    Fast mode was introduced in RiskAMP 7. It’s available in the Professional and Subscription editions.

    Background

    When RiskAMP runs a simulation in Excel, we tell Excel to calculate the spreadsheet over and over, changing our random distribution functions at each step. How fast the simulation runs is, for the most part, a function of how long it takes to calculate the spreadsheet once.

    Simulation time = (startup) + (one calculation) * (trials) + (cleanup)

    It’s slightly super-linear because there is some overhead, but for practical purposes the time ramps up as a straight line.

    For most models, simulation speed is acceptable, even if it’s not super fast. But if a single Excel calculation pass takes ~100 milliseconds, then running 1,000 trials can take a minute and a half — and running 10,000 can take more that 15 minutes.

    Enter fast mode

    Fast mode works in two ways. First, instead of using Excel to recalculate the spreadsheet, we use a lightweight calculation engine. For most models, that will already improve performance.

    Next, we run in parallel. Your desktop or laptop likely has 8, 16, 32 or more processor cores. Fast mode takes advantage of this by running multiple calculations at the same time and then combining results.

    Simulation time = (startup) + (calculation) * (trials) / (cores) + (cleanup)

    We don’t actually use all available cores. But just adding a divisor to that formula is a huge win.

    Fast mode actually adds a lot of overhead in the startup and cleanup phases. But because the calculation is so fast, and because we run in parallel, the overall effect is it’s faster.

    Running simulations in fast mode

    To run a simulation in fast mode, just change the option in the run simulation dialog box. Fast mode works for normal simulations as well as simulations run from the quick view dialog or the chart wizard.

    Limitations

    Fast mode does not support any third-party add-ins in the simulation path. That means Bloomberg, Morningstar, zCalc, or any other add-ins you might use.

    What is the simulation path? It means that the results of a simulation we are collecting come after a call to one of those add-ins.

    If you have add-ins in Excel, even if you use them in the spreadsheet, that’s fine, as long as those add-ins are not in the simulation path.

    Fast mode does not support VBA or user-defined functions (UDFs) if they are in the simulation path. Again it’s fine if your spreadsheet has VBA, as long as it’s not required to calculate simulation values.

    Some Excel functions might be missing from our calculation engine. This is usually something we can fix. If you run into an error, please contact us and we’ll see if we can address it.

    Finally, for now fast mode does not support showing screen updates during the calculation. Since screen updates will always cause the simulation to slow down, we did not focus on that as a priority for fast mode. Technically it’s possible, though, so we might add it in the future.

    Same seed, different values

    RiskAMP lets you set a fixed seed for a workbook. Every time you run a simulation it will generate the same random numbers. Although we generally recommend using variable seeds, using a fixed seed can be a helpful way to test changes to a model.

    A fixed seed will not return the same results in fast mode and standard mode. You’ll always get the same results in standard mode; and you’ll always get the same results in fast mode; but the two will be different.

    Errors and troubleshooting

    When you run a simulation in fast mode, it will pop up a warning when it sees simulation results returning errors. This is usually, but not always, the result of a missing add-in or VBA function.

    In this case, you have a few options. One is to run in standard mode; that will continue to work as always.

    Another option is to try and reorganize your model so that add-in functions are not in the simulation path. This might not be possible, but in some cases using clever data structuring can make it work.

    Finally if the culprit is a missing Excel function, let us know. Our calculation engine is comprehensive, but we focus mostly on “modern” Excel functions, like using NORM.S.DIST instead of NORMSDIST. In most cases if there’s a missing
    Excel function we’ll be able to resolve it.

    System requirements

    Fast mode requires Windows 10 or 11 and a recent version of Excel (Excel 365 or Excel 2021 or later).