Algorithm Reference
Mathematical algorithms powering fXYZ Network's FX routing, arbitrage detection, and network analysis
Algorithm Reference
fXYZ Network implements 18+ algorithms from network science, financial mathematics, and graph theory to power real-time FX currency routing and network intelligence. These are production infrastructure for the $7.5T/day OTC FX market — not academic exercises.
Implementation Status: Backend services contain ~4,100 lines of implemented algorithms across 5 Neo4j services. See Algorithm Integration Map for full wiring status.
Routing and Arbitrage
FX routing algorithms find the optimal multi-hop currency exchange path and detect arbitrage opportunities in real-time across the network's exchange graph.
Bellman-Ford Routing
Optimal multi-hop currency path finding with negative-cycle detection for arbitrage. Implemented in routing-engine.ts.
Line-Graph Routing
Edge-to-node graph transformation that accounts for spread penalties at currency hops. Delivers over 50% improvement on dense networks (Paper D6).
Cyclic Arbitrage Detection
Negative-cycle scanning across currency pairs using log-rate graph representation. Profit = exp(-sum(log(rates along cycle))) - 1.
FX Correlation and Topology
Algorithms that reveal the hierarchical structure of the FX market by computing correlation distances and filtering the resulting graph.
FX Distance Matrix
Ultrametric distance d_ij = sqrt(2(1-rho_ij)) on Pearson correlation of log-returns. Mantegna-Stanley (Papers C2-C5).
Minimum Spanning Tree
Kruskal MST on correlation distances reveals hierarchical FX market structure. Implemented in graph-analysis.ts.
PMFG
Planar Maximally Filtered Graph (Tumminello 2005). Retains 3(N-2) edges, capturing more correlation structure than MST alone.
Core-Periphery
Borgatti-Everett detection of systematically important currencies in the FX network core.
Community Detection
Scoring and Metrics
CES Production Function
Constant Elasticity of Substitution scoring: Y = A * [alphaF^rho + betaJ^rho + gamma*H^rho]^(1/rho) with HHI diversity bonus.
MeritRank
Personalized PageRank variant with Sybil-cluster discounting. Each member runs a unique walk from their own perspective (Paper G2).
Participation Coefficient
Cross-community engagement: P_i = 1 - sum_s[(k_is/k_i)^2]. High P_i identifies bridge nodes spanning multiple circles.
Network Health
R0 Contagion Index
Epidemiological model applied to FX network topology. R0 > 1 means shocks spread; R0 < 1 means the network is resilient.
Network Temperature
T = M/N — economic activity intensity (total transaction mass / member count). Thermodynamic analogy from Papers E1, E3.
Algebraic Connectivity
Second-smallest Laplacian eigenvalue (lambda_2). Measures network resilience to node removal and information propagation speed.
Revenue-Critical Dependency Chains
The algorithms are not independent — they compose into revenue pipelines:
FX Routing Pipeline:
Pearson correlation → FX distance matrix → MST → Louvain communities
→ Bellman-Ford routing → AMM pools → Arbitrage detection
Systemic Risk Pipeline:
R0 contagion → Algebraic connectivity → Network temperature + entropy
→ Investor-facing risk dashboard
Compliance Pipeline:
Community detection → AML anti-centrality scoring → FIBO ontology
→ Institutional client access