27
$\begingroup$

I heard about MetaTrader from http://www.metaquotes.net. Is there any other framework or program available? Do you use different software for backtracking and running your trading algorithms?

Thank you guys for your great answers. I will check out the posted applications.

$\endgroup$
0

8 Answers 8

25
$\begingroup$

I am a big believer in do-it-yourself (DIY) backtesting and data analysis, that is, obtaining your own data and writing your own code. I use my own simple Python scripts to process, test, analyze, and backtest, starting with text-input data files (either OHLC bars or tick data). The reason for DIY: in order to have an effective backtest, analysis, etc., you must completely understand all the assumptions, explicit and implicit, that go into the test or analysis. You must understand how that relates to the trading algorithm you implement.

As a quick example, people commonly say you must take off a tick or two in backtest results to account for slippage. However, I have found that for several of my backtest methods, I can actually count on getting better entries, on average, than the backtest. Whatever the case, I can sleep at night without worrying about someone changing something in the way the software works, which would throw off my tests without me knowing about it.

For algorithm execution, I also use a DIY Java API and Java applications build on the TWS API. However, the reason for that is just to save a few bucks.

Edit: Not sure I got this point across, but there is an intimate connection between back-test code, historical data, execution code, and real-time data. The relationship is different depending on what you are doing and what you are using, but it always important to understand the relationship.

$\endgroup$
7
  • $\begingroup$ Thanks Pete, I'm actually also interesting in doing it myself later on. What kind of database system are you using? Maybe there is a even a specialized version of a standard dbs available. $\endgroup$
    – Sebo
    Commented Feb 2, 2011 at 17:12
  • 2
    $\begingroup$ PostGreSQL. Not sure why I use it over MySQL. Both are freely available. $\endgroup$
    – Pete
    Commented Feb 2, 2011 at 19:14
  • $\begingroup$ @Pete What kind of visualization do you use, to better understand what your script is doing? Do you generate a R script end render it afterwards with R? $\endgroup$
    – Sebo
    Commented Feb 3, 2011 at 15:05
  • 2
    $\begingroup$ I use Matplotlib (matplotlib.sourceforge.net), a Python library, for most visualization. The exception is when using JMP for data analysis, it has its own plots. JMP is a commercial product that I happen to have a license for through my company, and use it for convenience. There are plenty of numpy/scipy/etc. packages available for Python to do the same stuff. In fact I code stuff up in Python once it becomes part of a process. $\endgroup$
    – Pete
    Commented Feb 3, 2011 at 16:51
  • $\begingroup$ Hi Pete. What do you exactly mean by "...,I can actually count on getting better entries, on average, than the backtest.". I would also expect to take off some slippage ticks. In which case can you avoid that? $\endgroup$
    – user256
    Commented Feb 8, 2011 at 14:42
13
$\begingroup$

Some of us see this as a data-driven, empirical problem. And for Programming with Data, you could do a lot worse than picking R which was made for the task.

The CRAN Task View on Finance lists a number of relevant packages. For trading strategies in particular, the quantstrat and blotter packages --which are both still on R-Forge in the TradeAnalytics bundle--are a very good start and are often discussed on the R-SIG-Finance mailing list.

$\endgroup$
0
9
$\begingroup$

I develop strategies for a lot of these different platforms and the one that I feel offers the most is NinjaTrader. It uses C# which is a bit slower than MetaTrader, which if I remember correctly uses a variant of C++, in fact in MT5 there should be almost no difference. However, it makes up for the slowness in spades with the freedom it allows you. Not only that, but I've had the least problems with it, contrast that with MetaTrader, which I absolutely dread coding in because everything feels like a hack and the historical backtester is just terrible. And if memory serves they don't have near the charting capabilities and they only offer a few periods with which to view the data.

One thing to note, NinjaTrader isn't free like MetaTrader. (You can't trade live without paying for it, however everything else is free) It's \$1000/lifetime or \$180/quarter, and they don't offer refunds so be sure you find a brokerage with a free trial before you go paying for it.

If you're looking for a free alternative, I have played a little with OpenECry, and they seem to do a lot of things right that NinjaTrader does wrong, but it doesn't offer near the freedom that Ninja does either. So it's really a trade off and I feel Ninja wins.

$\endgroup$
1
  • $\begingroup$ Cool, I will check out Ninjatrader $\endgroup$ Commented Feb 2, 2011 at 3:20
5
$\begingroup$

We use intensively MetaTrader but it has a lot of problems... we waste a lot of time with turnarounds and dirty tricks to make things work.

Now we're moving some developments to Matlab because it is stable and great for quick prototiping, also you can use free software like Octave, R, Maxima and Sagemath (wich I think englobes all these others applications).

$\endgroup$
5
$\begingroup$

Like @Pete mentioned; knowing what assumptions you are making in your testing and what impact those assumptions could have on your algorithm's results are one of the major drivers to rolling your own trading simulation engine.

The framework listed below is based on daily bar needs. Your mileage may vary if you're focused on intra-day.

  • Good data. If your trading rules are mid to long-term in nature; you'll need a data provider that has a) true dividend-adjusted data (know of only 2 at this time: CSI Data & FastTrack) and b) delisted data. CSI is the data provider I currently use. Know of others that offer true dividend-adjusted data? Please comment.

  • Language choice. I've prototyped the simulation engine in various languages over the years. R Language was a true winner for awhile until my data needs grew too large. But, if you don't have big data needs...R is really hard to beat for time series analysis. Like @Dirk mentioned; check out the R-SIG-Finance listserv (many gems in there). In the end, I went with Python. Though, the speed can be an issue at times.

  • Database. I've also used quite a few database backends for the simulation engine. Could spend pages and pages on what to do here. But, if you don't have big data needs - just go with simple CSV files and use the file system as your index structure. Or if you must have a SQL hammer...give SQLite a shot. Due to big data needs, I had to roll my own here.

  • I also use Python's matplotlib for charting. Really nice. But, currently reviewing other charting packages such as Protovis.

  • Use DataTables for displaying the results of large simulations.

$\endgroup$
1
  • $\begingroup$ I used Protovis (outside finance) earlier this year. It works fine on Chrome browser for mid-sized data, but not so much on Firefox. May have perf issues with large data. Working with Javascript (in addition to one more language) is an additional overhead. $\endgroup$
    – amit kumar
    Commented Oct 25, 2011 at 4:41
1
$\begingroup$

Marketcetera. I haven't tried it yet, so I can't personally comment on its quality. But the website looks great, plus it's an open source. You can download it for free and make some modifications. The platform supports Java, Ruby, and Python.

$\endgroup$
0
$\begingroup$

I have found NinjaTrader to be a very powerful free platform, but as I needed to add support for options, I ended developing and backtesting strategies. I haven't gotten to the point of doing to automated trading yet, but I have read it is possible.
Brian

$\endgroup$
-1
$\begingroup$

I have worked with First Futures at the time developing their Strategy Studio against our platform, has back testing and algo tuning possibilities: http://www.firstfuturessoftware.com/products/strategystudio.php

$\endgroup$

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.