Skip to content
All library documents

C++ Libraries and Tools for Trading Strategy Analysis

Article Quant Q&A · Author: sharpeRatio

Summary

The document surveys software options for developing and evaluating trading strategies in C++. It names QuantLib, Boost, Armadillo, Intel MKL, Eigen, and TA-Lib for quantitative, numerical, and technical-analysis work. It also mentions TradeStation for reviewing equity curves, maximum drawdown, and maximum adverse and favorable excursion, and suggests using R’s PerformanceAnalytics for testing.

The replies are recommendations rather than a detailed comparison or implementation guide. They do not show how to calculate volatility forecasts or trade-level metrics, and one broad claim about QuantLib’s capabilities is not supported with examples. A cited critique of automated strategy reports highlights that performance summaries need careful interpretation; tool choice alone does not establish that a backtest is reliable.

Key ideas

  • The responses list QuantLib, Boost, Armadillo, MKL, and Eigen as C++ quantitative or numerical tools.
  • TA-Lib is suggested for technical analysis, while R’s PerformanceAnalytics is mentioned for testing.
  • TradeStation is described as reporting equity curves, drawdown, and MAE or MFE measures.
  • The recommendations provide little implementation detail, and generated performance reports require critical interpretation.

Tags

Full text
# Trading C++ Libraries


# Trading C++ Libraries












Are there any free c++ libraries that would have some of the functions that would be used in developing a trading strategy. For instance, calculating drawdown, Volatility Forecasting, MAE, MFE....etc.

I know I could code these but this would help me save some time and focus on the strategy and not the report generations.

## Answer by rajah9 (score 8)

https://quant.stackexchange.com/a/884

Here are some suggestions.

Search Amazon (or your favorite bookseller) for books concerning "C++ quantitative finance." I found several titles that look promising.

I went to SourceForge (searching on "Trading Systems") and saw several promising systems that might give you a leg up in drawdown, MAE, etc.

I use TradeStation 9.0 for comparing various trading strategies. It will provide MAE/MFE graphs, trade equity curves, and rank strategies based on maximum drawdown. But be sure to read Trading Systems That Work: Building and Evaluating Effective Trading Systems by Thomas Stridsman for an apt critique of TradeStation's generated reports.

## Answer by Theodore (score 6)

https://quant.stackexchange.com/a/41016

These are the libraries I most prominently use for C++:

- QuantLib

- Boost C++ Libraries

- This is not specifically a library however it is extremely helpful, the Anaconda Compiler Tools.

- The Armadillo C++ library for linear algebra & scientific computing.

- The Intel Math Kernel Library for C++ (MKL).

- The Ta_Lib Technical Analysis Library has an API for C/C++.

- Eigen is a "C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms" as per their website. Eigen allows you to to do all sorts of computations with matrices of any size. It doesn't need anything other than the standard library, and the library tiself is standard with 98 to technically any C++m compiler should work (I use clang rather than GCC for the record, which you can install with `sudo apt-get install clang`).

As far as

> calculating drawdown, Volatility Forecasting, MAE, MFE....etc.

goes, QuantLib does all of that and more! It is an extremely powerful library that can do a lot of things.

## Answer by babelproofreader (score 5)

https://quant.stackexchange.com/a/886

For actually creating your trading strategy, you could use the open-source TA-Lib (written in C/C++) available here. To test it, you could use R and the PerformanceAnalytics package.

## Answer by phil (score 2)

https://quant.stackexchange.com/a/885

QuantLib is widely used

http://quantlib.org/docs.shtml

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.