Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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.

share|improve this answer

QuantLib is widely used


share|improve this answer
Sorry, this doesn't answer the question: QuantLib is not for trading strategies but for derivative pricing. – vonjd Apr 1 '11 at 17:20
@vonjd to me, derivative pricing is one of the part in the process of developing a trading strategy. – phil Apr 1 '11 at 17:47
The question gives examples of what is meant: "calculating drawdown, Volatility Forecasting, MAE, MFE" - QuantLib can't do any of these. – vonjd Apr 1 '11 at 18:30

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

share|improve this answer
Sorry, but this is a clear -1: TAlib is written in C and is, for better or worse, or technical analysis library. Why do you equate that to trading strategy? TAlib has nothing on drawdowns, vol forecasting etc pp. – Dirk Eddelbuettel Apr 2 '11 at 21:09
The OP wanted "some of the functions that would be used in developing a trading strategy." Although I cannot quote any evidence in support, I am pretty sure that the tools of technical analysis are/can be used in developing such strategies. As to whether TAlib is written in C or C++, well I stand corrected. – babelproofreader Apr 3 '11 at 14:37
C or C++? It is not the same – RockScience Apr 4 '11 at 8:26
TAlib source is written in C, C++ Cli and Java – ali_bahoo Apr 7 '11 at 10:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.