arXiv:2606.16059cs.LGcs.AI2026-06

Mojo让金融AI模型从研究到生产无需重写代码,实现高速且确定性计算。

Mojo: A Promising Tool for Scalable Financial AI Efficiency

论文配图:Mojo: A Promising Tool for Scalable Financial AI Efficiency
图 1 · 摘自论文原文
  • 用类似Python的语法编写,直接生成可确定性的底层代码
  • 在Apple Silicon上比纯Python快20到180倍,支持多设备部署
  • 适合需要可复现、高精度的量化金融研发与工程团队

三十年来,量化金融因研究用Python、生产用C++而付出高昂的双语言成本,常引入数值偏差。GPU加速的深度学习更放大问题,非确定性浮点运算导致长期回测结果漂移,违背监管可复现要求。本文调研Modular公司2026年推出的Mojo语言——一种类Python的系统级编程语言,作为资本市场的结构性解决方案。Mojo不仅填补了Python到C++的性能鸿沟,还原生支持与低层系统控制,可构建位级精确、确定性的计算内核。其基于MLIR的编译架构使同一代码库可运行于标量、SIMD、多核及GPU环境,减少研发与生产间的转换瓶颈。我们测试了四种核心金融AI任务:蒙特卡洛期权定价、大语言模型情绪推理、多资产回测和投资组合风险价值(VaR)。在Apple Silicon上,直接测量的内核性能相比纯Python提升20至180倍;大规模GPU任务结果为基于公开基准的投影数据。除透明性能指标外,我们发布开源库mojo-deterministic,提供可复现的归约内核,并坦诚说明Mojo当前仍无法解决的问题。

原文摘要 · Abstract (English)

For thirty years, quantitative finance has paid a costly two-language tax: models researched in Python are rewritten in C++ for production, often introducing numerical discrepancies. GPU-accelerated deep learning exacerbates this problem, as nondeterministic floating-point reductions can produce drift in long backtests, challenging regulatory reproducibility and auditability expectations. This article surveys Mojo, Modular's 2026 Python-like systems language, as a structural response for capital markets engineering. While closing the Python-to-C++ performance gap, Mojo uniquely combines native interoperability with the low-level systems control required to construct bit-exact deterministic kernels. Its MLIR compilation infrastructure further allows a single codebase to target scalar, SIMD, multicore, and GPU execution, reducing the translation bottleneck between research and production. We benchmark four core financial AI workloads: Monte Carlo option pricing, LLM sentiment inference, multi-asset backtesting, and portfolio Value at Risk. On Apple Silicon, Mojo demonstrates 20x to 180x speedups over pure Python on directly measured kernels; larger-scale GPU workload results are projections calibrated from published benchmarks. Alongside transparent performance data, we introduce mojo-deterministic, an open-source library of reproducible reduction kernels, and provide a candid assessment of the problems Mojo does and does not yet solve.

金融AIMojo语言确定性计算高性能

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。