用于 Java 的定量金融/数学库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10711941/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 02:13:23  来源:igfitidea点击:

Quantitative finance/mathematical library for Java

javamathstatistics

提问by Bober02

I am currenlty working on a project which relies on a couple of mathematical/statistical/financial tools which I would ideally like to include in one (perhaps several) libraries. What I would like to have is:

我目前正在从事一个项目,该项目依赖于几个数学/统计/金融工具,我希望将这些工具包含在一个(可能是几个)库中。我想要的是:

  1. Statistical measures - modes, variance etc.
  2. probability distributions + sampling from them available
  3. financial models for e.g. option pricing
  1. 统计测量 - 模式、方差等。
  2. 概率分布 + 从中抽样
  3. 用于例如期权定价的财务模型

Does anyone have an idea which libraries might be useful?

有谁知道哪些库可能有用?

采纳答案by mikera

I do quite a bit of numerical work in Java and Clojure so hopefully my perspective can be useful.

我在 Java 和 Clojure 中做了相当多的数值工作,所以希望我的观点可以有用。

For 1. and 2. here are some options to explore:

对于 1. 和 2.,这里有一些可供探索的选项:

  • Parallel Colt- very comprehensive, high-performance mathematical library. Good for lots of vector processing which you get in finance apps.
  • Incanter- R-like statistical library for Clojure (very easy to embed in a Java app). Has pretty much all the statistical tools you could desire, plus is very easy to extend if you want to create your own DSLs
  • EJML- probably the fastest matrix library available in Java
  • Apache Commons Math- handy collection of maths and statistical tools
  • Parallel Colt- 非常全面、高性能的数学库。适用于您在金融应用程序中获得的大量矢量处理。
  • Incanter- Clojure 的类似 R 的统计库(很容易嵌入到 Java 应用程序中)。拥有您可能需要的几乎所有统计工具,如果您想创建自己的 DSL,还可以轻松扩展
  • EJML- 可能是 Java 中最快的矩阵库
  • Apache Commons Math- 方便的数学和统计工具集合

For 3. (financial models) these tend to be pretty bespoke to the problem you are trying to solve. I doubt you would want to use an off-the-shelf solution even if it existed. I'd suggest developing yourself using the toolkits mentioned above.

对于 3.(财务模型),这些往往是针对您要解决的问题量身定制的。我怀疑您是否会想要使用现成的解决方案,即使它存在。我建议使用上面提到的工具包开发自己。

回答by Marc

Strata from OpenGammacontains those items. It is a professional quantitative finance library written in Java and open source.

OpenGamma 的 Strata包含这些项目。它是一个用Java编写并开源的专业量化金融库。

The quantitative finance part contains interest rate, forex and equity models. It is developed by industry quants for bank and hedge funds. I don't which type of financial models you want to use; there is a large panel of models and asset classes and you should be able to find off-the-self a professional type implementation.

量化金融部分包含利率、外汇和股票模型。它由行业宽客为银行和对冲基金开发。我不知道你想使用哪种类型的财务模型;有大量模型和资产类别,您应该能够找到专业的类型实现。

回答by Charles Cooper

IdylFinmight be just what you are looking for -- inspired by quantmod, it contains some blazing fast, numerically stable statistical methods, an API to Yahoo Finance, as well as some portfolio optimization methods and it's being extended actively.

IdylFin可能正是您正在寻找的——受quantmod 的启发,它包含一些极快的、数值稳定的统计方法、雅虎财经的 API 以及一些投资组合优化方法,并且正在积极扩展。

Disclaimer: I am the author of the library, and it would knock my socks off if you used it ;).

免责声明:我是该库的作者,如果您使用它,它会让我感到震惊;)。

回答by Oliver Charlesworth

QuantLibapparently has Java bindings via SWIG.

QuantLib显然通过 SWIG 具有 Java 绑定。