Scenario fan-out is the splitting of the scenarios into batches so that one trade batch’s revaluation runs as several tasks in parallel. Task granularity is the size of the resulting tasks — here the number of scenarios in a batch, the trades being grouped into batches of about half a second of pricing per scenario — which trades scheduling freedom against the fixed cost of each task.
fig_riskgrid.py, with costs from bench_riskgrid.py.