A new Julia software package can calculate the Economic Systemic Risk Index, or ESRI, up to 300 times faster than a legacy C++ and R implementation while producing matching results within the model’s convergence tolerance. The open-source package, ESRIcascade.jl, was designed for researchers who repeatedly test how the temporary closure of individual firms might spread through a national production network. In its largest reported test, covering a synthetic economy of 100,000 firms, the four-threaded Julia implementation completed the analysis in about seven minutes, compared with slightly more than 16 hours for the legacy code.
The speed gain comes from changing how the calculation is organized rather than altering the underlying economic model. ESRI estimates the share of national output that could be lost or disrupted when a selected firm stops operating. The software still evaluates each shock through the same upstream and downstream channels as previous implementations, but it traverses sparse links between firms directly instead of repeatedly applying broad matrix operations. This approach is especially useful for large, irregular production networks in which many firm-to-firm links are inactive and most elements of a dense intermediate matrix contain zeros.
Systemic risk in this framework arises because economic networks are interdependent. A firm may depend on suppliers for essential inputs, while its own output may be needed by customers whose production could subsequently be curtailed. ESRI models the temporary failure of one target firm by removing its demand from suppliers and its deliveries to customers, then propagating those changes through the network. The resulting score represents the fraction of total national output expected to be affected by that closure. Earlier empirical applications described in the study found a small core of highly connected firms whose failure could threaten a substantial portion of an economy, even when some members of that core were relatively small.
ESRIcascade.jl separates the model into two main data structures. IndustryInfo records each firm’s industry assignment and the classification used for its production inputs. ESRIEconomy combines those details with a sparse firm-to-firm transaction matrix, caching normalized upstream and downstream operators, row and column sums, total output and the number of firms. Two public interfaces expose the calculations: one evaluates the closure of a single selected firm, while the other accepts an arbitrary capacity vector. A capacity of one represents normal operation, zero represents closure, and intermediate values allow researchers to examine partial disruptions or simultaneous shocks affecting multiple firms.
The downstream calculation is the computationally demanding part because it uses a generalized Leontief production function rather than assuming that lost production falls proportionally across all inputs. The package distinguishes essential inputs, which a customer cannot produce without; non-essential inputs, which contribute through a linear part of the production function; and inputs with no short-run impact, whose links are omitted from downstream propagation. To determine the remaining availability of each input industry, the legacy fastcascade implementation constructs a dense matrix with one row per firm and one column per industry, then scales and multiplies sparse matrices before extracting and scanning relevant columns.
ESRIcascade.jl instead evaluates the same calculation in the opposite direction. For each supplier, it visits the observed supplier-to-customer links and adds lost supply directly to the appropriate customer accumulator. Once all affected links have been processed, the customer’s essential constraint is determined from its largest industry-specific loss, while its non-essential constraint comes from its total non-essential loss. Linear production contributions are accumulated at the same time. The developers say this avoids creating and repeatedly scanning dense firm-by-industry intermediates, reducing arithmetic and memory traffic while visiting each active network link only once.
The package also stores propagation operators in sparse formats aligned with their direction of traversal, improving memory access and avoiding unnecessary work on zero entries. It supports the calculation of upstream and downstream losses separately as well as their usual combination, allowing researchers to distinguish disruption transmitted through suppliers from disruption transmitted through customers. Alternative weighting schemes can replace output as the quantity of interest, so scores may be expressed in terms of emissions, workers or another specified measure rather than only economic output. The developers also bundle a 616-by-616 input classification derived from processed industry-survey data for use with the package’s corresponding industry-code order.
Validation was performed by running ESRIcascade.jl and the C++/R implementations on the same economy; the resulting values matched within the convergence tolerance in all tests. Performance was then assessed on synthetic power-law networks designed to resemble real production networks. The benchmarks distributed firms evenly across 616 industries and computed an ESRI score for every firm under linear, mixed and industry-specific production functions, using both one and four threads. For networks of 10,000 firms, reported speedups ranged from 190 to 303 times, depending on the production function and thread count. The largest reported gain occurred in the linear configuration with four threads, where the Julia package required 0.293 milliseconds per firm compared with 86.772 milliseconds for fastcascade.
Memory results also differed between the implementations. A single-threaded ESRIcascade.jl calculation on 100,000 firms used 1.1 gigabytes of random-access memory, rising to 2.5 gigabytes with four threads. The corresponding fastcascade figures were 2.1 and 7.6 gigabytes. The authors attribute part of this difference to the legacy code duplicating economic data across workers, whereas the Julia implementation keeps most of that information within a single structure. These benchmarks concern synthetic power-law networks and specific software configurations, so they do not establish that every real-world network will receive the same speedup or memory reduction. Nevertheless, the reported results indicate that direct traversal of sparse production links can substantially lower the cost of repeated firm-level ESRI calculations.
For economic-network researchers, the practical significance is that larger collections of hypothetical failures can be evaluated within much shorter sessions, supporting sensitivity studies, scenario analysis and the validation of production networks reconstructed from incomplete or aggregated data. The software does not itself establish that any particular real company would cause systemic harm, and the study does not report new empirical estimates of risk for a national economy. Instead, it presents a computational tool that preserves the ESRI framework while making its calculation faster and less memory-intensive. ESRIcascade.jl version 1.1.0 requires Julia 1.12 or later, is distributed under an MIT license and includes developer documentation alongside its source code.
Subject of Research: Faster computation of economic systemic risk in firm-level production networks using the Julia package ESRIcascade.jl.
Article Title: ESRIcascade.jl: A Julia package for fast computation of the economic systemic risk index
Article References: Devetak, M., & Klimek, P. (2026). ESRIcascade.jl: A Julia package for fast computation of the economic systemic risk index. SoftwareX, 36, Article 103154. https://doi.org/10.1016/j.softx.2026.103154
Image Credits: AI Generated
DOI: 10.1016/j.softx.2026.103154
Keywords: ESRIcascade.jl, Julia programming, economic systemic risk, production networks, supply-chain resilience, sparse matrices, network cascades, software benchmarks, firm closures, ESRIcascade, Julia, package
Cite Scienmag News
Denise Maddox. (October 22, 2026). Julia package speeds systemic-risk calculations by up to 300-fold. Scienmag. https://scienmag.com/julia-package-speeds-systemic-risk-calculations-by-up-to-300-fold/
Denise Maddox. "Julia package speeds systemic-risk calculations by up to 300-fold." Scienmag, 22 October 2026, https://scienmag.com/julia-package-speeds-systemic-risk-calculations-by-up-to-300-fold/. Accessed 22 October 2026.
Denise Maddox. "Julia package speeds systemic-risk calculations by up to 300-fold." Scienmag. October 22, 2026. https://scienmag.com/julia-package-speeds-systemic-risk-calculations-by-up-to-300-fold/

