speed backtesting

Jul 17, 2013 at 10:14
Vues 1,278
3 Replies
Membre depuis Nov 18, 2009   posts 18
Jul 17, 2013 at 10:14
When you compare backtesting for Ctrade, MT4, FXCM Trading Station, Amibroker - which is fastest?

ie. Optimise an EA, three or four indicator deviations , different profit targets, different trailing, with/without filter, something, something
combination can be 2000 different runs - maybe 20000 if your taking tomorrow off.......
data length can be 1 month or 4 months or more of 1 min bars
etc

(I thought about avail multicore + MT5 = speed - but exclude this because WINE is not fully multicore)

So if you forget about achieving 99% data quality, 1000's of avail indicators etc.
If you accept a nominal spread of 10, and are happy to use ever tick but work on data available..........
If you assume that the EA is written well - indicators used as as efficient as possible.
But EA is not simple and will use datetime to record last trade, has martingale option, MM options etc. etc.

Say
i.e. not icustom() but rather the EA has i_rawindicator() + logic that an icustom() indicator would use.

And just look at speed in crunching optimisation parameters for X number of bars, which app is it that saves you the most time?
Which out of the 4 apps is fastest in optimisation?
Membre depuis Nov 18, 2009   posts 18
Jul 17, 2013 at 15:28 (édité Jul 17, 2013 at 15:29)
hell if it were possible to speed up just 50 I'd be happy

Membre depuis Mar 28, 2011   posts 86
Jul 17, 2013 at 17:09
You can rule MT4 out because it is definitely the slowest one.
And it gets exponentially slower when you have more open trades.

I use Forex Tester 2 and my robots are coded in C#.
I use only M1 close data and for example my basket close strategy has typically about 5-30 open trades per symbol.
As a rule of thumb my Core i7 laptop run 1 year test data for single pass in about one hour.
I use 2-3 indicators (moving averages mostly) and check most of the values just once in an hour on new hour bar.
My system is not optimal because call trade api (Forex Tester 2) requires socket call that is quite costly compared to normal function call.

My system is about 100x faster compared to MT4 when I have just few open trades.
If I have about 100 open trades then performance drops to 10-20 times faster than MT4.
And if you do multicurrency testing performance drops linearly as symbol count increases!

I think all other systems should have better performance if they have decently implemented backtester because everything runs in a single process.

BTW, Asirikuy project has testing and execution systems but I haven't personally tried them. And it's not free.

cTrader/cAlgo is free so it is easy to try and check its performance quite easily.
There is one drawback, you can't use your own data. You have to stick to the data your broker provides to you.

I did consider using cTrader/cAlgo to some simple data visualization tasks to test and verify ideas for robots.
Unfortunately only graphics primitive it can draw is 'line object'.
Lets hope it gets better in that area as well.
Being Bearish or Bullish Makes No Difference
Membre depuis Nov 18, 2009   posts 18
Jul 17, 2013 at 19:26 (édité Jul 17, 2013 at 19:46)
5 table solution..........PostgreSQL ...........
feed
table#1 - ticks data
into
table#2 - realtime 1min + columns for indicators values (or 5min or 15min)
table#3 - optimisation parameter settings and ranges
table#4 - buy + sell signals + drawdown + profitloss
table#5 - report accumulated profit and drawdown , start time , end time

One script. Use indexing.
Then convert to inmemory.
 
Se connecter / S’inscrire to comment
You must be connected to Myfxbook in order to leave a comment
*Lutilisation commerciale et le spam ne seront pas tolérés et peuvent entraîner la fermeture du compte.
Conseil : Poster une image/une url YouTube sera automatiquement intégrée dans votre message!
Conseil : Tapez le signe @ pour compléter automatiquement un nom dutilisateur participant à cette discussion.