Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

Top Quant C++ library for Quantitative Finance

4 min read

Ranging from Algorithmic trading to Financial Engineering problems, C++ libraries plays a key role in computationally intensive parts which essentially requires highly skilled expertise in Finance, Mathematics and statistics. One of the Primary advantage of C++ libraries are they are extremely fast and robust and most widely used in high performance computing applications. Most of the High Frequency Trading firms and even professional (non-HFT) algorithmic trading firms use C++/C for strategy back-testing and creation.

Lets looks into some of the most popular Quant C++ Libraries.

QuantLib – is a C++ library for financial quantitative analysts and developers. The QuantLib open-source project was started in the year 2000 at the Italian boutique risk-management firm RiskMap (now called StatPro Italia). The first QuantLib package was released in December, 2000 under a liberal BSD license. This has allowed the banks and software companies to extend and modify the code without having to release it back. The project today has more than 150 contributors, with some of them making substantial contributions. QuantLib requires Boost C++ libraries as a pre-requisite and needs to be separately installed for both Ubuntu and Windows

Vast varieties of modules are supported by Quantlib. Some of the major modules are Numeric types, Quantlib macros, utilities, Currencies and FX rates, Design Patterns, Date and Time Calculations, Math tools (Pseudo random number generators, root finding algorithms, and optimisation methods), Finite-differences framework, Lattice Methods, Monte-Carlo Framework, Cashflows, Term Structures, Indexes, quotes,Pricing Engines, Financial Instruments, Equity Models, Market Models,Short-rate modelling framework, Volatility Models, Stochastic processes.

Quantlib also comes as a Quantlib Excel Addin and exports the functionality of of the QuantLib C++ analytics library to Microsoft Excel. QuantLib is available as a C#, Guile, Java, MzScheme, Perl, Python, and Ruby module by means of SWIG. Experimental bindings to GNU R and Objective Caml are also available.

Armadillo – Armadillo is a high quality linear algebra library (matrix maths) for the C++ language, aiming towards a good balance between speed and ease of use. Its syntax are quite similar to Matlab/Octave. It Can be used for direct applications in machine learning, pattern recognition, computer vision, signal processing, bioinformatics, statistics, finance, etc. It provides Various matrix decompositions and efficient classes for vectors, matrices , cubes, integer, floating point and complex numbers operations.

Armadillo will work with compilers supporting the older C++98 and C++03 standards, as well as the newer C++11 and C++14 standards. Armadillo also provides bindings/interface to python(armanpy) and R (RcppArmadillo extension).

Eigen – Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. It is also considered as alternative to Armadillo library. Eigen supports all matrix sizes, from small fixed-size matrices to arbitrarily large dense matrices, and even sparse matrices. It supports various matrix decompositions , geometry features, standard numeric types, including complex, integers, and is easily extensible to custom numeric types. Eigen doesn’t have any dependencies other than the C++ standard library. Eigen is standard C++98 and so should theoretically be compatible with any compliant compiler.

Boost– is a large collection of peer-reviewed code covering a wide range of domains.It is a set of libraries for the C++ programming language that provide support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, and unit testing. It contains over eighty individual libraries. Boost Library has a vast applications in computational finance

GSL – The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. It is free software under the GNU General Public License. The library provides a wide range of mathematical routines like Random Number Generator, Linear Algebra, Differential Equations, Monte-Carlo Integration, Complex Numbers, Eigen Functions, Roots of Polynomials, Vectors and Matrices, BLAS Support and more. GSL is developed on the GNU/Linux with gcc, however it supports major platforms including Microsoft windows.

GLPK – (GNU Linear Programming Kit) package is intended for solving large-scale linear programming (LP), mixed integer programming (MIP), and other related problems. It is a set of routines written in ANSI C and organized in the form of a callable library.

BLAS – The BLAS (Basic Linear Algebra Subprograms) are routines that provide standard building blocks for performing basic vector and matrix operations. The Level 1 BLAS perform scalar, vector and vector-vector operations, the Level 2 BLAS perform matrix-vector operations, and the Level 3 BLAS perform matrix-matrix operations. Because the BLAS are efficient, portable, and widely available, they are commonly used in the development of high quality linear algebra software

LAPACK++ – Linear Algebra PACKage(LAPACK) extensions for high performance linear algebra computations. This version includes support for solving linear systems using LU, Cholesky, and QR matrix factorizations.

Intel MKL – Intel Math Kernel Library (in C++), a library of optimized math routines for science, engineering, and financial applications. Intel Math Kernel Library (Intel® MKL) accelerates math processing and neural network routines that increase application performance and reduce development time. It includes highly vectorized and threaded Linear Algebra, Fast Fourier Transforms (FFT), Neural Network, Vector Math and Statistics functions.

Blitz++ – Blitz++ is a C++ class library for scientific computing which provides performance on par with Fortran 77/90. It uses template techniques to achieve high performance. Blitz++ provides dense arrays and vectors, random number generators, and small vectors (useful for representing multicomponent or vector fields).

Dlib -Dlib is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real world problems. It is used in both industry and academia in a wide range of domains including robotics, embedded devices, mobile phones, and large high performance computing environments.

Shark – Shark is a fast, modular, feature-rich open-source C++ machine learning library. It provides methods for linear and nonlinear optimization, kernel-based learning algorithms, neural networks, and various other machine learning techniques. Shark depends on Boost and CMake. It is compatible with Windows, Solaris, MacOS X, and Linux

Mlpack is a C++ machine learning library with emphasis on scalability, speed, and ease-of-use. MLPack provides functionalities like Collaborative filtering, Density estimation trees, k-Means clustering, Principal Components Analysis, Gaussian mixture models, Hidden Markov models, Perceptrons, Linear regression and many more Machine learning algorithms.

ALGLIB – is a cross-platform numerical analysis and data processing library. It supports several programming languages (C++, C#, Pascal, VBA) and several operating systems (Windows, Linux, Solaris). ALGLIB features include:

Data analysis (classification/regression, including neural networks)
Optimization and nonlinear solvers
Interpolation and linear/nonlinear least-squares fitting
Linear algebra (direct algorithms, EVD/SVD), direct and iterative linear solvers, Fast Fourier Transform and many other algorithms (numerical integration, ODEs, statistics, special functions)

Alglib comes under both free and commercial editions.

TA-Lib – TA-Lib is widely used by trading software developers requiring to perform technical analysis of financial market data.Includes 200 indicators such as ADX, MACD, RSI, Stochastic, Bollinger Bands etc. Candlestick pattern recognition. It comes as Open-source API for C/C++, Java, Perl, Python and 100% Managed .NET and even Excel Add-ins are available

In case if i missed any of the popular quant c++ library do comment here to let us know things more better.

Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

Amibroker Vs Tradingview Vs Python Which One to Use…

When choosing a platform for systematic trading, there are a few key factors to consider, including the features and capabilities of the platform, the...
Rajandran R
1 min read

Mini Certification on Automated Trading using Amibroker

If you are new to Automated trading? This certification course will help you to kickstart your automated trading with your broker and get to...
Rajandran R
1 min read

Finfolab Technologies developed API Solutions for Goodwill

Finfolab Technologies developed Arrow API solutions for Goodwill. Our API solutions enable retail traders and Goodwill commodities partners to design and deploy advanced algorithmic...
Rajandran R
32 sec read

One Reply to “Top Quant C++ library for Quantitative Finance”

  1. Sir,
    I am new to algo trading and looking for a system for auto trading with set of instruction.
    I have tried one robo trading software with mt4. can you suggest me better system and from where i can get the same.

    Regards

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More