14
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$
    – MJB
    Commented Jun 8, 2016 at 3:08

6 Answers 6

10
$\begingroup$

Yes, there are.

For pure technical indicator libraries I would first check out:

http://www.ta-lib.org/

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.

$\endgroup$
6
5
$\begingroup$

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

$\endgroup$
4
$\begingroup$

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

$\endgroup$
1
$\begingroup$

The largest C# technical indicator library so far is at https://github.com/ooples/OoplesFinance.StockIndicators

The full list of technical indicators is extremely large and they are all at https://ooples.github.io/OoplesFinance.StockIndicators/indicators

There are over 350 unique technical indicators and it is by far the easiest to use. You can make an indicator out of any other indicator and you can customize the moving average to use for any indicator such as a RSI or a MACD.

Full Disclosure: I'm the author of this open-source library

$\endgroup$
1
$\begingroup$

I'm using Skender Stock Indicators (https://www.nuget.org/packages/Skender.Stock.Indicators). Built some back-tests for my experimental algorithms using 1 minute OLHC data downloaded from CryptoDataDownload (https://www.cryptodatadownload.com/data/gemini/). Note: free account is needed to download!

$\endgroup$
-2
$\begingroup$

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.

$\endgroup$
1
  • 3
    $\begingroup$ Are you affiliated with RightEdge? This is the second answer of yours that links to them. $\endgroup$ Commented Feb 4, 2013 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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