Backtesting using LIVE or DEMO history data?

Aug 08, 2010 at 11:05
1,130 zobrazení
4 Replies
Členem od Nov 30, 2009   149 příspěvků
Aug 08, 2010 at 11:05
These days I'm backtesting an EA using Alpari UK live and demo history data. The results I get are not comparable. This makes me believe that if the aim is running an EA in a live account there is no advantage backtesting it using history data from a demo account. So, what's the point on running testing or optimising an EA using a demo data feed?
exquisite entries with calculated exits
Členem od Oct 28, 2009   1424 příspěvků
Aug 08, 2010 at 21:10
There is no such thing as demo and live data for backtesting, as far as I am aware. There is only the one set of data which I believe comes from MetaQuotes themselves.

Here are some things to be aware of when backtesting.

The spread is fixed at the point you start the test, not quite after the start button is pressed, I think it's after it's finished spooling through the history file. So start a test on a variable spread broker and you'll get differing results depending on what the spread was at that instant. If you are scalping small targets or using small stop losses this can make a world of difference.

If you are using Alpari to backtest be aware that the demo account uses the spread from their pro accounts, which are smaller spreads than a standard live account.

Also, minute history is the smallest you can get from MetaQuotes, not tick data. So ticks are interpolated within each minute bar. I think from one backtest to the next this can vary slightly as well. So, again if you are dealing with smaller pip sizes then you will get different results.

There are also gaps in the data where some date ranges are missing. The gaps can vary between brokers for some reason. This will affect backtesting with pretty much any indicator and will give false results over some periods. For example using a large moving average such as 200 day moving average is quite frankly pointless in backtesting.

I'm sure there are other issues with backtesting that I'm not aware of but these are the main ones I can think of.

I always say that backtesting is a good start point and I ditch an EA if it isn't profitable over a long backtest period. If it works over backtest then forward test to ensure the EA trades correctly live.

Of course there is then no replacement for a live account.
11:15, restate my assumptions: 1. Mathematics is the language of nature. 2. Everything around us can be represented and understood through numbers. 3. If you graph these numbers, patterns emerge. Therefore: There are patterns everywhere in nature.
Členem od Nov 30, 2009   149 příspěvků
Aug 09, 2010 at 22:03
Hi Steve,

Thanks for such a master class on MT4 back testing! 😉

I understand that I can get any history dataset but its better to do the backtesting in my MT4 terminal logged in a live account so it will use the spread from it.

I just started collecting M1 data from the live trade server and simultaneously testing the EA. Later I can backtest the EA using the collected data an compare the trades to those already done in real time. Dunno if its worth the hassle, I believe this way I can check that the backtested EA is performs the same way as it did in real time.

Regarding parameter optimisation, what is the best way to select the right EA setup resulted from the optimisation? I know that I have to discard the extreme results with high/low yields, but the middle yet contains lots of useful results with dozens of variations. In all, it could take many months analysing and testing the results 😲 ... thinking now to spend that time learning manual trading instead 😁
exquisite entries with calculated exits
Členem od Apr 20, 2010   814 příspěvků
Aug 10, 2010 at 02:25
Running back test can give you the possibility outcome might happened in live account EA.

But of course, there are exception as also depend on your EA how it feed on Data and able give you the closest accuracy of outcome.

Here is an example of 9 year back test result of my favorite Martingale EA, which have the potential to survive over years.

https://www.myfxbook.com/community/trading-systems/seeker-skyline-alpari-uk/35829,2#?pt=2&p=1&o=35829
Information is Gold when come to organised.
Členem od Oct 28, 2009   1424 příspěvků
Aug 10, 2010 at 07:32
With regards to optimisation, the one thing to be aware of is that you haven't curve fitted the results. Always ensure that you can get similar results with slightly different settings.

Say for example you are using a moving average and you work out that a 34 period MA works the best. Make sure you check a 32, 33, 35 and 36 MA and if you get widely different results then it's curve fitted and your good results are a fluke. This means that going forward the EA probably will not work.

Also make sure that you run the optimised settings on there on and check the equity curve to again ensure that is is smooth and has decent drawdown.

You should definitely learn to trade manually anyway. It helps in EA development
11:15, restate my assumptions: 1. Mathematics is the language of nature. 2. Everything around us can be represented and understood through numbers. 3. If you graph these numbers, patterns emerge. Therefore: There are patterns everywhere in nature.
You must be connected to Myfxbook in order to leave a comment
*Komerční použití a spam nebudou tolerovány a mohou vést ke zrušení účtu.
Tip: Zveřejněním adresy URL obrázku /služby YouTube se automaticky vloží do vašeho příspěvku!
Tip: Zadejte znak @, abyste automaticky vyplnili jméno uživatele, který se účastní této diskuse.