Functional Programming in Financial Markets (Experience Report)
Atze Dijkstra, José Pedro Magalhães and Pierre Néron
Standard Chartered Bank has detailed the production use of their Haskell-derived language Mu to orchestrate pricing workflows for their Markets division, which reported $3 billion in operating income. Their Cortex ecosystem, comprising over 7 million lines of Mu code, supports everything from deal valuation APIs to end-user GUIs for thousands of users. The authors attribute the system's reliability to functional concepts like monads and datatype generics, which they credit for reducing bugs like segmentation faults absent in Mu-only code.
A core technical component is the type-driven QuickRisk API, which constructs minimal computation graphs for pricing and risk analysis using a Work API for separating workflow definition from execution. The bank also built an internal job scheduler, Shepherd, to manage these large-scale, dependent workflows. The team reports that this functional architecture allows a single API to price one trade locally or millions across cloud nodes, with dependent parts recomputing automatically.
Regarding practical outcomes, the authors state their team consistently delivers solutions faster and with fewer developers compared to internal teams using Java and Scala. They also report that hiring over 100 developers primarily focused on Haskell/Mu has not been a limiting factor, with qualified candidates consistently applying for open roles. The paper concludes that the functional approach has been a significant catalyst with no major downsides in their setting, challenging common myths about performance and interoperability in large-scale finance.