Dukascopy
 
 
Wiki JStore Search Login

Using the Historical Tester
 Post subject: Using the Historical Tester Post rating: 1   New post Posted: Wed 14 May, 2014, 09:44 

User rating: 1
Joined: Mon 21 Jan, 2013, 09:11
Posts: 51
Location: New ZealandNew Zealand
Hi.
When using the Historical Tester a Period option is available, and there are 4 options to choose from, Ticks, 1 minute, 1 hour, or 1 Day.

In my strategy there is also a Period option, with 18 to choose from, Ticks, 1sec, ...30secs, ...minutes, ...hours, Days, Weeks, Months Years.
If I want the strategy to run every 30 minutes, I set the Strategy Period to 30 minutes.
But what do I set the Historical Period to? There is no 30 minute option.
If I set it to 1 minute I get a different result to that if I set it to 1 Hour.

I want the Strategy Period to predominate, so that I can set it to various values, and I don't want the Historical Tester Period to intervene.
Can the Historical Tester Period be turned off?
Or is there some other way I can get around this problem?

Thank you for your help.
Ted


 
 Post subject: Re: Using the Historical Tester Post rating: 1   New post Posted: Wed 14 May, 2014, 13:03 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Greetings,

There is two essential parameters in strategy programming, the strategy default period and testing interpolation period
basically your understanding is correct regarding the strategy period, while the interpolation period is related to the prices retrieved by time. If you set it as ticks, your strategy will go through every single tick price within the selected range of time (a week, a year ...) ; if you set this parameter to 5 mn for instance and you define the interpolation period as 4 ticks OHLC, then your strategy will go through the Open, High, Low and Close prices in each 5 min candle but your trading period is still untouched and remain as defined. Obviously having a default trading period of 10 sec and interpolation of 5 mn OHLC is indeed obsolete.

Please check our wiki page for more information: https://www.dukascopy.com/wiki/#

Hope this helps.

Rgds


 
 Post subject: Re: Using the Historical Tester Post rating: 0   New post Posted: Thu 15 May, 2014, 09:59 

User rating: 1
Joined: Mon 21 Jan, 2013, 09:11
Posts: 51
Location: New ZealandNew Zealand
Hi.
Thank you for your response, I do appreciate your help.
But I am finding it difficult to comprehend the reason, or need, for the interpolation.
When I set the Strategy's period to 30 min, I would expect that it would run every 30 min, and then to be idle between.

Compounding my confusion in regards interpolation are the wildly varying results that can be obtained, depending on which of the 4 options is selected, that is, '4 Ticks on OHLC', or 'Cubic Spline' or 'Tick on Open' or 'Tick on Close'.
For example, with Strategy set at 5 min, Interpolation at 1 min, all 4 of those options produced a loss in the account, ranging from 30% to 66%.
Again, strategy set to 5 min, Interpolation at 1 Hour, then both '4 Ticks' and 'Cubic' virtually wiped out the account, 'Open' gave a loss of about 30%, and 'Close' produced a profit of nearly 200%.

This is bordering on the bizarre. The system is not making any sense. How can the Historical Tester have any validity when such diverse results are obtained, without changing any of the strategy's parameters.

As you can see, I need your help. I have a strategy, which I think is a good strategy potentially, but I do not have a way to reliably test it, and to optimize the parameters.

Thanks,
Ted


 
 Post subject: Re: Using the Historical Tester Post rating: 1   New post Posted: Thu 15 May, 2014, 13:11 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi;

I totally understand your opinion but there is an essential element in here which is your strategy: the result of the historical tester (taking into account the interpolation method) depend on the strategy variables. Let me breakdown this in a simple example:
If your strategy uses only Open and close candle prices of 1 mn candles for instance, in order to speed up the test it would be useless to take the interpolation method in ticks, it is more efficient to take 4 ticks OHLC so that the historical tester retrieves only the needed prices and again this is essentially for test speed performance needs. Accordingly, the result of the historical tester in this example should exactly the same in both 4ticks OHLC and All ticks interpolation methods the only difference is that the first method would be quicker.

In your case, if your strategy if you're using tick prices as variables inside the strategy and you 'overwrite' this by retrieving only 4 ticks or cubic spline prices, it is then normal to get different results in terms of final P&L.

I recommend you to read the following links in order to understand the mathematics behind the spline method:
https://en.wikipedia.org/wiki/Spline_%28mathematics%29

For more accurate information related to this topic, please check the following link:
https://www.dukascopy.com/wiki/#Historical_Tester

Thanks


 
 Post subject: Re: Using the Historical Tester Post rating: 0   New post Posted: Fri 16 May, 2014, 05:59 

User rating: 1
Joined: Mon 21 Jan, 2013, 09:11
Posts: 51
Location: New ZealandNew Zealand
Hi.
I sorry, but I still do not understand why there is a need for interpolation, it sounds like manipulating or massaging the data.
If I want to run the strategy with a period of 1 hour, then the prices between each hour are of no concern. I only want to know the closing price at the end of each hour. What happens between the hours is totally irrelevant.

I had the impression that the Historical Tester uses a recording of the actual ticks from last year, so that when using it, it is the same as trading live, just a little quicker.
But it seems this is not so.

Nevertheless, all may not be lost.
In the Tester I can select 'Ticks' (instead of 1 Minute, 1 Hour or 1 Day), then select 'Process ticks with the specified', then select 'Hours' from the options(Seconds, Minutes, Hours, Days), and then finally set the number for the Hours. I selected 1, in the presumption that only the tick on the hour would be processed.
Can you tell me if this will give me a more realistic representation of trading live.

Thanks,
Ted


 
 Post subject: Re: Using the Historical Tester Post rating: 1   New post Posted: Fri 16 May, 2014, 13:06 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

A explained, interpolation is about speeding historical tester. Concretely it eliminate useless data that the strategy wont need. In case you need to replicate perfectly Live market then you should execute your historical tests with 'process all Ticks'; it is as simple as that.

...Yes the historical tester uses the recorded data which is a replication of Live market data feed.

Thanks


 

Jump to:  

cron
  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com