paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Functional Programming in Financial Markets (Experience Report)

金融市场中的函数式编程(经验报告)
ICFP 8(ICFP)2024匹配度 2/10 · 该论文是函数式编程在金融行业的经验报告,属于 PL 工业落地与类型驱动工作流,与用户核心关注的静态分析、LLM/Agent、浮点程序分析和贝叶斯程序分析均无直接交集。虽然工业案例和大型系统经验有一定参考价值,但不涉及用户正在追的研究问题。引用 2 inbox
Atze Dijkstra, José Pedro Magalhães, Pierre Néron
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:报告渣打银行以 Haskell 构建类型驱动的大规模定价工作流,证明函数式编程可支撑工业级核心业务。

这是一篇来自渣打银行的经验报告,讲述函数式编程在超大规模真实场景中的应用。Haskell 被用于支撑整个 Markets 业务线(2023 年运营收入 30 亿美元)的核心软件库,覆盖从交易估值与风险分析的基础 API 与 CLI,到长时批处理与亚秒级 RESTful 服务,再到终端用户 GUI 的完整技术栈;数千名用户使用这些软件,百余人直接编写函数式代码。作者重点介绍如何借助类型驱动的方式编排大规模定价工作流:同一套 API 既可在本地为单笔交易定价,也可在数千个云节点上为百万笔交易定价;计算的各个部分可独立运行与检查,重算某一部分只会触发依赖部分的重算。实现建立在 monad、lens、数据类型泛型(datatype generics)与闭包序列化等社区数十年研究成果之上。作者认为函数式编程是本项目成功的主要驱动因素之一,且未发现明显弊端。

问题
在大型金融机构中,需要一套能同时支持单笔交易本地定价、百万笔交易跨数千云节点定价,并可增量重算与独立检查各计算环节的核心软件基础设施。
方法
以 Haskell 构建全栈核心库,采用类型驱动的编排方式,复用 monad、lens、数据类型泛型与闭包序列化等函数式编程技术来实现定价工作流的组合与依赖追踪。
评估
以工业界多年实践为背景的经验性评估:报告该系统在渣打银行 Markets 部门的部署范围、用户规模与业务影响,并总结收益与代价。
原文摘要(Abstract)

We present a case-study of using functional programming in the real world at a very large scale. At Standard Chartered Bank, Haskell is used in a core software library supporting the entire Markets division – a business line with 3 billion USD operating income in 2023. Typed functional programming is used across the entire tech stack, including foundational APIs and CLIs for deal valuation and risk analysis, server-side components for long-running batches or sub-second RESTful services, and end-user GUIs. Thousands of users across Markets interact with software built using functional programming, and over one hundred write functional code. In this experience report we focus on how we leverage functional programming to orchestrate type-driven large-scale pricing workflows. The same API can be used to price one trade locally, or millions of trades across thousands of cloud nodes. Different parts of the computation can be run and inspected individually, and recomputing one part triggers recalculation of the dependent parts only. We build upon decades of research and experience in the functional programming community, relying on concepts such as monads, lenses, datatype generics, and closure serialisation. We conclude that the use of functional programming is one of the main drivers of the success of our project, and we see no significant downsides from it.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{DijkstraMN24,
  title = {Functional Programming in Financial Markets (Experience Report)},
  author = {Atze Dijkstra and José Pedro Magalhães and Pierre Néron},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {ICFP},
  year = {2024},
  doi = {10.1145/3674633}
}