Which hardware specifications are important for faster back testing?

 

Hello friends,

Let's say I have an EA, the code is already optimized for back test speed and I do not want to change the code,

1. Which hardware specifications are important for back test speed?

2. My EA is coded in mql4, it is trading all 28 major and cross currency pairs at the same time. Of course you know mt4 tester just can process 1 pair at a time. So I removed the piece of codes which connects currency pairs together, to be able to just see the back test speed.
I back tested a couple of symbols from 2010 to now, with historical real tick data from Dukascopy. It took 4-6 hours for each currency pairs. I believe the connection between currency pairs in my code would double or more the time...
So if the mt5 tester speed would be the same as mt4 tester, my laptop needs to process the back test for like 5(average of 4-6)*2(for Currency pairs connection)*28(all major and cross pairs) ~ 280 hours :|
The back test should be integrated, not 1 year by 1 year. Because my EA needs data from past orders.
I know it is not possible for my laptop to process 280 hours at once. But what is the solution? By knowing it that this back test should be done at once.

 
Anybody knows?
 
Use the MQ-Cloud it's faster than any local pc.
 
  1. HosseinKOGO #: Anybody knows?

    Don't ping your posts.

  2. HosseinKOGO: the code is already optimized for back test speed and I do not want to change the code,

    What, exactly did you do?

    1. EAs : Don't do per tick what you can do per bar, or on open.
      If you are waiting for a level, don't reevaluate, wait until price reaches it (or a new bar starts, and you recalculate.)
      If you are waiting for an order to close, only look when OrdersTotal (or MT5 equivalent) has changed.
                How to get backtesting faster ? - MT4 - MQL4 programming forum (2017)

    2. Indicators: Code it properly so it only recomputes bar zero (after the initial run).
                How to do your lookbacks correctly. (2016)
                3 Methods of Indicators Acceleration by the Example of the Linear Regression - MQL5 Articles. (2011)
      Or, reduce Tools → Options (control+O) → Charts → Max bars in chart to something reasonable (like 1K.)

 
Carl Schreiber #:
Use the MQ-Cloud it's faster than any local pc.
Thank you Carl.
I have read how the MQL cloud work, however I did not understand how it exactly does. I'm not a programmer. I'm just a creative director learnt mql.
For example I have 28 currency pairs, for 13 years of historical data. Does MQL cloud do such this thing?: Distribute 28 currency pairs to 28 agents, each agent 1 pair for 13 years.
Or distribute 13 years to 13 agents, each agent 28 pairs for 1 year. So when the agent turns off, the other one gather the data and keep processing?

1. Is it "only" time-based and the new agent definitely process newer periods after finishing the older period by last agent?
2. What would happen to GVs. I do not want them to be written on agents PCs. Should I remove them or the MQL cloud would ignore those lines of codes automatically?
3. I have no clue, is it affordable? Or renting a good enough server for back test is more affordable?
 
William Roeder #:
  1. Don't ping your posts.

  2. What, exactly did you do?

Thank you William.
Yes I have done all those things wherever were possible. Also,
Deleted any Print()/Comment() too,
Minimizes use of for/while loops,
No showing object,
etc.
What about setting GVs? Should I go for deleting those lines? Does it take much time to set a GV? (My GVs are only set after position close, and my EA closes around 1200-1400 positions in a month. I have tested it on demo account)
 
HosseinKOGO:

Hello friends,

Let's say I have an EA, the code is already optimized for back test speed and I do not want to change the code,

1. Which hardware specifications are important for back test speed?

2. My EA is coded in mql4, it is trading all 28 major and cross currency pairs at the same time. Of course you know mt4 tester just can process 1 pair at a time. So I removed the piece of codes which connects currency pairs together, to be able to just see the back test speed.
I back tested a couple of symbols from 2010 to now, with historical real tick data from Dukascopy. It took 4-6 hours for each currency pairs. I believe the connection between currency pairs in my code would double or more the time...
So if the mt5 tester speed would be the same as mt4 tester, my laptop needs to process the back test for like 5(average of 4-6)*2(for Currency pairs connection)*28(all major and cross pairs) ~ 280 hours :|
The back test should be integrated, not 1 year by 1 year. Because my EA needs data from past orders.
I know it is not possible for my laptop to process 280 hours at once. But what is the solution? By knowing it that this back test should be done at once.

280 hours for one pass per currency per year ? (so one pass of each would take 280hours)

You can pick one and attack it maybe get a fighter in the arena , so to speak.

 
Lorentzos Roussos #:

280 hours for one pass per currency per year ? (so one pass of each would take 280hours)

You can pick one and attack it maybe get a fighter in the arena , so to speak.

No bro, no one wants the smoke of 280 hours one run :D
I said, 280 hours for all 28 currency for all 13 years.

In addition my configuration is Intel Core i7, RAM 6GB. belongs to old ages :)

 
HosseinKOGO #:

No bro, no one wants the smoke of 280 hours one run :D
I said, 280 hours for all 28 currency for all 13 years.

In addition my configuration is Intel Core i7, RAM 6GB. belongs to old ages :)

ehehe

So it takes 280 hours to arrive at the end of the optimization for all 28 pairs for 13 years essentially ? So your system will be optimized for 28 pairs after 12 days ? that would not be so bad.

 
Lorentzos Roussos #:

ehehe

So it takes 280 hours to arrive at the end of the optimization for all 28 pairs for 13 years essentially ? So your system will be optimized for 28 pairs after 12 days ? that would not be so bad.

That poor laptop...

Use a VPS server, rent it for the time required.

Run it there. Your notebook will suffer very much from that abusive usage
 
Lorentzos Roussos #:

ehehe

So it takes 280 hours to arrive at the end of the optimization for all 28 pairs for 13 years essentially ? So your system will be optimized for 28 pairs after 12 days ? that would not be so bad.

It is not optimization. It is just parallel currency pairs integrated back test.
I believe an EA which needs optimization to make profit would lose money sooner or later.
Reason: