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

I am looking to start developing a trend following strategy and have been looking to do something in either C# or Java and wondered if there was a library or framework out there that would make backtesting a bit easier?

I have looked at NinjaTrader(NT7) and it has some good API methods to allow you to run say a Donchian Channel/ATR on the stock data and use the values in your calculations of order entries and I wondered if there were similar libraries around that would do this in the programming world outside of an application like NT7?

I know about things like quantlib but these are more mathematical based and I know these can be programmed in but I didn't want to reinvent the wheel if there was already a chunk of these indicator style things already written somewhere?

Thanks in advance and I hope this question is within the guidelines for posting here.

share|improve this question
I ended up looking towards python and some of the more open source frameworks, I think there are a lot of great opportunities there but less User friendliness in UI area. You have to be comfortable using command lines and script output but I think its well worth the (initial) hassle/learning curve. Thanks for all the answers. – MJB Jun 8 at 3:08

Yes, there are.

For pure technical indicator libraries I would first check out:


Its open source and they provide APIs for both C# and Java among others.

Let me know if you look for commercial ones but this one is definitely the most comprehensive in terms of open source code.

share|improve this answer
Do you have a sample project on how to use it ? I am lost in their details.. – Jeson Martajaya Aug 13 '15 at 19:14
The C# version is buried in their sourceforge link. Its here: sourceforge.net/projects/ta-lib/files/ta-lib/0.4.0/… – Jeson Martajaya Aug 13 '15 at 23:55
What are you stuck with? – Matt Wolf Aug 14 '15 at 5:40
The solution is in C++. I wonder how to have a C# project load a simple indicator (i.e. bollinger band) out from it. – Jeson Martajaya Aug 14 '15 at 16:00

You might have a look into the CRAN's "Empirical Finance" task view. It lists a whole bunch of R packages for time-series analysis and construction of automatic trading rules.

Link: http://cran.r-project.org/web/views/Finance.html

share|improve this answer

I believe the R library quantmod has some pre-packaged tools.

share|improve this answer

RightEdge offers a C#/VB (.net) framework with backtesting that might have what you want: http://www.rightedgesystems.com/ It attaches to a number of broker APIs including the one offered by Interactive Brokers.

share|improve this answer
Are you affiliated with RightEdge? This is the second answer of yours that links to them. – chrisaycock Feb 4 '13 at 12:34

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.