Top Numerical Libraries For C#

AlgLib (

ALGLIB is a numerical analysis and data processing library. Is supports many languages but has been entirely rewritten in naitive C#, and functions across many operating systems. It is open source for noncommercial purposes and has commercial licensing options available for enterprise clients. So in all a portable, intuitive and versatile library that is a perfect for a segment of coders. QuantConnect is happy to support using AlgoLib in our platform! To access this library, simply call:

using AlgLib;

Math.NET Numerics (

Math.NET Numerics is a linear algebra, open source library written in C#. It has a robust contributor community ensuring stable releases and healthy feature support. Math.NET is used broadly in fields from science to engineering and notably finance. Popular in financial sectors, Math.NET has a wide library of mathematical functions from linear algebra to integral transforms and probability models. You can access this library from inside your algorithms by calling it in at the top of your code!

using MathNet.Numerics;

NLinear (

NLinear is a basic linear algebra toolkit in C# compatible with Silverlight. While not open source it is much more open than the commercial numerical libraries but offers a narrow range of features.

ILNumerics.Net (http://ILNumerics.Net)

ILNumerics.Net has been around since 2006 and has remained among the top numerical libraries since. The ILNumerics.Net tagline is a “high performance math library for programmers and scientists” and they certainly manage to achieve that goal. They advertise their high performance, typesafe numerical array classes and functions for general math, FFT and linear algebra. They aim for cross platform support with .NET/mono, 32&64 bit, and script-like syntax in C#, with 2D & 3D plot controls. They have fairly efficient memory management.

NMath (

NMath has not differentiated in any major way and has positioned itself between the consumer and commercial spaces, but its is worth a look to see if the UI fits your style. It is certainly well designed for intuitive use for many applications. There is no free license but they have student licenses available and several code samples.

IMSL Numerical Libraries (

IMSL Numerical Libraries is largely targeted at an enterprise audience of users. The C# numerics library encompasses a wide range of functions from financial, correlation related, statistics, data mining and charting. IMSL claims they have the single largest commercial library. Their clients include finance, telecommunications and the oil and gas industry. IMSL may be useful for use in predicting stockmarket behavior with its data mining capabilities, and risk management features.

Measurement Studio (

Measurement Studio (by National Instruments) is also a commercially library for acquiring, and processing signal data and displaying in beautiful charts. It provides a class library for signal processing and management as well as a broad range of general mathematical functions. Measurement Studio has carved out a niche in the signal space and FFT where it can provide signal generation, calling, relaying and other signal related functions to users working with numerical algorithms.

Suanshu (

SuanShu is written to conform to modern programming paradigms allowing for variable naming, code structuring and re-usability, as well as software engineering procedure. The list of features is long and extensive, Suanshu has put together a great product with immense possibilities for algorithmic model creators. It was originally intended as a supporting algorithmic trading library. We decided not to support Shanshu in QuantConnect for security reasons as it is based in Java. If you’d like to use this in your algorithm, let us know and we’ll organize a private cloud package.


Simon Burns

By: Simon Burns

Quant Development Intern