Backtesting tick error

All posts which do not fit into any other sections of the forum.

Moderator: admin

Backtesting tick error

Postby Loggy48 » Fri Jun 03, 2016 5:57 am

I have noticed an error in the reporting of the MarketScope backtester.

Approximately twice the number of simulated ticks are reported. This occurs both in the current production version 01.14.112415 and the development version 01.15.041816.

For example when testing over a year, as ticks are simulated at 8 a minute (7 with 8 second intervals, one with 4 second interval) the expected number of ticks should of the order 52*5*1440*8 = 2995200, about 3 million. I confirmed this by writing out a trace file at every tick.

However in the statistics panel, the number of ticks for both versions is given as about 6 million.

It may just be that the counter is being updated at entry and exit but it may be something deeper in the coding.

In the real world, ticks are not simulated so the results are always different anyway but can you check this please?
Loggy48
 
Posts: 89
Joined: Tue Jun 24, 2014 8:39 am
Location: Manchester, UK

Re: Backtesting tick error

Postby Julia CJ » Fri Jun 03, 2016 8:18 am

Hi Loggy,

It happens in the specific situations. For example, the backtesting is at EUR/USD instrument, but the account is AUD. The backtester activates USD/AUD pair automatically.
Julia CJ
 

Re: Backtesting tick error

Postby Loggy48 » Fri Jun 03, 2016 8:47 am

Yulia

Ah I see.

This is because everything is converted to and from the account currency at each trade - my account is in GBP and I was looking at EUR/USD.

This of course means that the GBP/USD spread should be added to the EUR/USD spread when calculating the profit as money has to be changed at each buy and sell.

If I am always working on EUR/USD for example, is there any way after the first purchase (say of a single lot) of holding the account in EUR or USD as appropriate?

Or is there any way I can have a EUR account for this particular pair? Obviously it would have to be a separate account completely.

This would save a lot when there are many transactions.

Or should I stick to a trade where one side is in GBP?
Loggy48
 
Posts: 89
Joined: Tue Jun 24, 2014 8:39 am
Location: Manchester, UK

Re: Backtesting tick error

Postby Julia CJ » Mon Jun 06, 2016 5:33 am

Hi Loggy,

Could you please tell, what exactly does it prevent you from?
Julia CJ
 

Re: Backtesting tick error

Postby Loggy48 » Tue Jun 07, 2016 11:06 am

Julia

TS2 interrogates both EUR/USD and GBP/USD at each tick presumably to be able to report on the desktop but I don't think an automatic strategy actually needs to know the GBP/USD except at entry and exit points - maybe just in case there is a margin call I suppose. Is this why you need 6 million ticks a year?

Anyway, if a trade is opened say from a GBP account long in EUR/USD, this means that the account purchases Euros with USD but to be able to do that, it has to convert some GBP in the account into USD. When the trade is closed, the dollars are returned to the account which then need to be turned back into the account currency. Therefore there is the purchase price of dollars from GBP and the sale price back into GBP with any GBP/USD movement as well. Conversely for short of course.

But what prices between account and underlying currency are used (GBP and USD in this example)? Are they the Ask/Bid prices that are used for trading (ie as shown on TS2) or are they some spot price?

In the first case, if cable were absolutely level, to get the trading cost, we need to add the cable spread to the EUR/USD spread, plus commission. But in the real world, cable will be all over the place so that needs adding as well, which can all amount to quite a lot.

If so, then opening a dollar account to trade in EUR would be the best way but then I don't know whether (a) that is allowed and (b) whether such an account would be subject to SEC conditions - FIFO, no stoploss/limit and other issues, apart possibly from any US tax liability.

Or is that not how it works?
Loggy48
 
Posts: 89
Joined: Tue Jun 24, 2014 8:39 am
Location: Manchester, UK

Re: Backtesting tick error

Postby Julia CJ » Wed Jun 08, 2016 7:36 am

Hi Loggy,

I think FXCM has information about it. I would recommend you to contact FXCM support concerning these questions.

Thank you.
Julia CJ
 


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 9 guests