Network Health Algorithms
R0 contagion index, network temperature, algebraic connectivity, Shannon entropy, and Gini coefficient for FX network resilience monitoring
Network Health Algorithms
Network health metrics give institutional participants and governance actors a real-time view of the FX network's systemic risk, economic activity, and structural resilience. These metrics are live on the dashboard and feed directly into investor-facing risk reporting.
Implementation: packages/neo4j/src/services/network-metrics.ts, graph-analysis.ts
GraphQL query: networkMetrics, algebraicConnectivity
Paper references: B9, E1, E3, A1
R0 Contagion Index
Overview
R0 (the basic reproduction number) is borrowed from epidemiology, where it measures how many secondary infections each primary infection causes. Applied to the FX network, it measures how many circles (or counterparties) are affected on average when one circle experiences a financial shock.
- R0 > 1: The network is in a contagious regime — shocks amplify and spread
- R0 = 1: The network is at the epidemic threshold — shocks neither grow nor shrink
- R0 < 1: The network is resilient — shocks dissipate
Formula
R_0 = (avg_degree * avg_vulnerability) / recovery_rate
Where:
avg_degree = mean number of financial connections per circle
avg_vulnerability = mean susceptibility to shock propagation
recovery_rate = rate at which circles recover from shocksThe vulnerability and recovery parameters are derived from:
- Transaction volume concentration (high concentration → higher vulnerability)
- Circle reserves and liquidity buffers (larger buffers → higher recovery rate)
- Cross-circle exposure (more exposure → higher effective degree)
Interpretation
The SIR epidemiological model maps onto the FX network as follows:
- Susceptible (S): Circles not yet affected by a stress event
- Infected (I): Circles currently experiencing stress (liquidity shortfall, counterparty failure)
- Recovered (R): Circles that have absorbed or resolved the stress
The threshold R0 = 1 corresponds to a phase transition in the financial system — below it, shocks are localized; above it, they cascade.
Why This Matters
During the 2008 crisis, the global interbank network had an effective R0 >> 1. The Lehman failure infected AIG, money market funds, commercial paper markets, and then global trade finance in a cascade that took months to resolve. Monitoring R0 in real-time enables early intervention before crossing the epidemic threshold.
Implementation
// network-metrics.ts:224
getSystemicHealth(): {
r0: number;
regime: "resilient" | "threshold" | "contagious";
riskFactors: string[];
}
// Exposed via:
query GetNetworkMetrics {
networkMetrics {
r0ContagionIndex
systemicHealthRegime
}
}Status: LIVE — R0 is computed and displayed on the dashboard as part of networkMetrics.
Model limitations: The R0 model uses simplified SIR dynamics. It does not capture non-linear cascade effects (fire sales, margin spirals) or feedback between liquidity and solvency crises. Advanced models (DebtRank, Paper B6; DCC-GARCH, Paper B11) are planned extensions.
Network Temperature
Overview
Circle Temperature is a thermodynamic analogy for economic activity intensity. Just as thermodynamic temperature measures the kinetic energy per particle, network temperature measures the economic throughput per member.
Formula
T = M / N
Where:
M = total transaction volume (mass) flowing through the circle
in the measurement period (e.g. rolling 30 days)
N = number of active members in the circle
Units: currency units per member per periodHigh-temperature circles have high economic throughput per member. This indicates:
- Active trading and settlement activity
- Dense token flows
- Potentially: high volatility or a liquidity crisis (rapid flow through with low retention)
Thermodynamic Analogy
The analogy to statistical physics is deliberately imprecise but illuminating:
| Physics | fXYZ Network |
|---|---|
| Temperature T = KE / N | Circle temp T = M / N |
| Particles | Members |
| Kinetic energy | Transaction volume |
| Heat flow | Capital flow between circles |
| Phase transition | Regime change (quiescent → active trading) |
| Boltzmann distribution | Score distribution (entropy measure) |
Interpretation
T << median: Circle is economically dormant — low activity relative to members
T ≈ median: Normal operating temperature
T >> median: Circle is highly active — monitor for stress indicators alongside R0Network-Level Temperature
The network temperature is the harmonic mean of all circle temperatures — this gives appropriate weight to low-temperature circles that might be experiencing a freeze-up.
Implementation
// network-metrics.ts:283
getCircleTemperatures(): CircleTemperature[]
interface CircleTemperature {
circleId: string;
circleName: string;
temperature: number;
memberCount: number;
transactionVolume: number;
}
// Exposed via networkMetrics query (LIVE on dashboard)Status: LIVE — Circle temperatures are computed and displayed on the dashboard.
Algebraic Connectivity
The algebraic connectivity lambda_2 is documented in detail on the Correlation Algorithms page. Summary:
lambda_2 = second-smallest eigenvalue of graph Laplacian L = D - AFor network health, lambda_2 tracks structural resilience:
| lambda_2 | Network state |
|---|---|
| lambda_2 → 0 | Graph is close to disconnected; bottleneck exists |
| lambda_2 moderate | Normal connected graph |
| lambda_2 high | Dense, highly redundant connections; resilient |
A sudden drop in lambda_2 can signal that a key currency or counterparty is being removed from the active market — a leading indicator for network fragmentation.
Status: LIVE — Displayed on dashboard via algebraicConnectivity query.
Shannon Entropy
Shannon entropy H is documented in detail on the Scoring Algorithms page. In the network health context, it measures decentralization of the contribution score distribution:
H = -sum_i [p_i * log2(p_i)]Health interpretation:
- H near maximum (log2 n): Well-distributed network activity, no dominant actors
- H low: Concentration — a small number of members account for most activity
A declining H trend, combined with rising Gini, is an early warning for plutocratic capture of network governance.
Status: LIVE — Displayed on dashboard via networkMetrics query.
Gini Coefficient
Gini G is documented in detail on the Scoring Algorithms page. In the health context, it tracks contribution inequality over time:
G = (2 * sum_i [i * y_i]) / (n * sum_i y_i) - (n + 1) / nHealth interpretation:
- G < 0.3: Relatively equitable distribution
- G 0.3-0.5: Moderate inequality (typical for early-stage networks)
- G > 0.5: High concentration — governance risk, reduced network resilience
Status: LIVE — Displayed on dashboard via networkMetrics query.
Planned Health Metrics
DebtRank (Paper B6, B8)
DebtRank measures the fraction of the total network economic value that is lost if a given node defaults, accounting for second-order effects through the counterparty network. It is the financial network equivalent of centrality under stress conditions.
DebtRank(v) = sum_{u reachable from v} (impact of v's failure on u)Planned implementation: debtrank.ts, extending graph-analysis.ts Laplacian infrastructure.
Navier-Stokes Kappa (Paper B12)
A contagion distance metric derived from the Navier-Stokes fluid dynamics equations. Measures how quickly a financial shock flows through the network, using algebraic connectivity (lambda_2) as the key parameter:
kappa ~ 1 / lambda_2Higher lambda_2 (better-connected network) → lower kappa → faster shock absorption. Planned as an extension of the existing algebraic connectivity infrastructure.
Ising Model Phase Detection (Paper E6)
The Ising model from statistical mechanics can detect phase transitions in market microstructure — the switch between trending (ferromagnetic) and mean-reverting (paramagnetic) regimes. Planned implementation: ising-model.ts.
Dashboard Integration
All live health metrics are surfaced on the main dashboard in the Systemic Health card:
// GET_NETWORK_METRICS query returns:
{
r0ContagionIndex: number;
networkTemperature: number;
algebraicConnectivity: number;
shannonEntropy: number;
giniCoefficient: number;
circleTemperatures: CircleTemperature[];
}Paper References
| Paper | Title | Relevance |
|---|---|---|
| B9 | Financial Contagion R0 | Epidemiological network vulnerability |
| E1 | Thermodynamic Money Flow | Circle temperature T = M/N |
| E3 | Network Thermodynamics | Temperature analogy for economic activity |
| A1 | Spectral Graph Theory | Algebraic connectivity lambda_2 |
| B6 | DebtRank | Stress-conditional centrality (planned) |
| B8 | lambda_max Stability | Stability from dominant eigenvalue (planned) |
| B12 | Navier-Stokes Kappa | Contagion distance metric (planned) |
| E6 | Ising Model Phase Detection | Market regime transitions (planned) |