Open-Source Statistical Learning Libraries for Quantitative Finance
Summary
The document surveys free statistical and machine learning libraries that could support quantitative finance work, especially for developers using C++, C#, or Java. It names Shark for C++, AForge.NET and Accord.NET for C#, and scikits.learn and Apache Mahout for Python and Java. It also points readers toward a directory of open-source machine learning projects.
The accepted response argues that R has a broader selection of statistical learning methods and documentation than the languages initially requested, and notes that it can be called from Java or C++. It specifically connects R to the methods and examples in The Elements of Statistical Learning. These are recommendations rather than a comparative benchmark: the document reports no tests of accuracy, speed, maintenance, or suitability for trading systems. Library names and ecosystem status may have changed since the discussion, so current availability should be checked before choosing a dependency.
Key ideas
- The discussion identifies Shark as a C++ option for statistical learning.
- AForge.NET and Accord.NET are suggested for C# users.
- Scikits.learn and Apache Mahout are mentioned for Python and Java workflows.
- The response recommends R for breadth and documentation, with interfaces available for Java and C++.
- The listed tools are suggestions rather than experimentally compared trading solutions.
Tags
Full text
# Statistical learning libraries # Statistical learning libraries Is there a general (or specialised) FREE library to solve learning problems such that found in the book "The Elements of statistical Learning". As it is often time consuming to write all the algorithms for statistical learning, I would like to know what (free) libraries are used in quantitative finance. I'm thinking about libraries for languages that are not intended for numerical calculus. So R or Matlab libraries would not fit in the scope of this question. C/C++/C# or Java libraries are welcome. ## Answer by Shane (score 10, accepted) https://quant.stackexchange.com/a/439 If you're looking for Java or C/C++/C#, then you will have a much harder time with this than if you looked at R, Matlab, or Python (with Scipy). For those other languages, I recommend: - C++: In my experience, the most complete, well-documented library for this is Shark. Just one note there: it currently going through a pretty major revision as they start to use Boost to replace their existing Array library. In general, I don't know why you wouldn't use R for this. It's freely available, very complete, has lots of documentation, and can be easily interfaced from Java (RJava) and C++ (Rcpp). Plus, if you're using "The Elements of Statistical Learning": that textbook used S-Plus/R to do all their analysis. And R is the only langauge that I know which includes all of the algorithms from the book (including things like lars, which was created by one of the book's authors). And I am starting to slowly reproduce most of the key examples from that book in R on my blog. ## Answer by Dennis (score 8) https://quant.stackexchange.com/a/469 If you are programming in C#, you may have a look at AForge.NET and Accord.NET too ## Answer by johanherman (score 7) https://quant.stackexchange.com/a/467 An interesting pick if you'd like to use Python within the Numpy/Scipy environment is scikits.learn. And an other viable Java package is Apache's Mahout. ## Answer by Dirk Eddelbuettel (score 7) https://quant.stackexchange.com/a/470 A good resource for open-source statistical learning / machine learning libraries is mloss.org.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.